Aurelia is a collection of Modern JavaScript modules, which when used together, function as a powerful platform for building browser, desktop and mobile applications, all open source and built on open web standards.
Aurelia MCQs: This section contains multiple-choice questions and answers on the various topics of Aurelia. Practice these MCQs to test and enhance your skills on Aurelia.
List of Aurelia MCQs
1. Aurelia is an ____ framework.
- JavaScript
- Node.js
- React
- Angular
Answer: A) JavaScript
Explanation:
Aurelia is a JavaScript framework.
2. We use the Aurelia framework for ____.
- Testing applications
- Web and mobile development
- Object-relational mapping
Answer: B) Web and mobile development
Explanation:
We use the Aurelia framework for web and mobile development.
3. Is the Aurelia framework open-source?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, the Aurelia framework is open-source.
4. In Aurelia, a ____ is a reusable, self-contained portion of an application’s UI and functionality.
- View
- View-Model
- Component
Answer: C) Component
Explanation:
In Aurelia, a component is a reusable, self-contained portion of an application’s UI and functionality.
5. A ____ is a template that specifies the look of a component.
- View
- Component
- Model
- Modules
Answer: A) View
Explanation:
A view is a template that specifies the look of a component.
6. ____ are in charge of processing user input, updating the model, and doing any other required logic.
- View
- View-Model
- Component
- Modules
Answer: B) View-Model
Explanation:
View models are in charge of processing user input, updating the model, and doing any other required logic.
7. A component’s view and view model are connected using ____ in Aurelia, which allows for automatic view updates whenever the model data changes.
- Router
- Injection
- Modules
- Data binding
Answer: D) Data binding
Explanation:
A component’s view and view model are connected using data binding in Aurelia, which allows for automatic view updates whenever the model data changes.
8. In Aurelia, a ____ is a unit of organization for the application’s code.
- Module
- Router
- Injection
Answer: A) Module
Explanation:
In Aurelia, a module is a unit of organization for the application’s code.
9. Component dependencies are handled using ____ in Aurelia.
- Module
- Dependency Router
- Dependency Injection
- Attributes
Answer: C) Dependency Injection
Explanation:
Component dependencies are handled using dependency injection in Aurelia.
10. The ____ in Aurelia is a component that handles client-side routing and navigation.
- Module
- Router
- Dependency Injection
- Attributes
Answer: B) Router
Explanation:
The router in Aurelia is a component that handles client-side routing and navigation.
11. It is the ____ method that is used to initialize an object created with a class.
- Constructor
- Binding
- Attaching
- Updating
Answer: A) Constructor
Explanation:
It is the constructor method that is used to initialize an object created with a class.
12. Which of the following decorators is used to define the dependencies that a component requires when using dependency injection in Aurelia?
- @depend
- @inject
- @dependency
Answer: B) @inject
Explanation:
To utilize dependency injection in Aurelia, use the @inject decorator to define the dependencies required by a component.
13. The data binding system’s behavior can be configured using which of the following configuration in Aurelia?
- DataBinding
- Binding
- DataEngine
- BindingEngine
Answer: D) BindingEngine
Explanation:
The data binding system’s behavior can be configured using the bindingEngine configuration in Aurelia.
14. To configure plugins in Aurelia, which of the following command is used?
- App.use
- Aurelia.Plugin
- Aurelia.use
- Plugin.use
Answer: C) Aurelia.use
Explanation:
You may use aurelia.use the command to setup plugins in Aurelia.
15. The ____ idea in Aurelia refers to the rate at which a function is performed or data is updated.
- Constructor
- Aurelia.use
- Debounce
- Throttle
Answer: D) Throttle
Explanation:
The “throttle” idea in Aurelia refers to the rate at which a function is performed or data is updated.
16. Are Throttle and debouncing exactly the same?
- Yes
- No
Answer: B) No
Explanation:
No, Throttle and debouncing are not exactly the same.
17. ____ is the process of postponing the execution of a function until a certain amount of time has elapsed without it being invoked.
- Constructor
- Aurelia.use
- Debouncing
- Throttling
Answer: C) Debouncing
Explanation:
Debouncing is the process of postponing the execution of a function until a certain amount of time has elapsed without it being invoked.
18. Which of the following method is used to connect data from a view model to a view?
- Attached
- Bind
- Unbind
- Connect
Answer: B) Bind
Explanation:
The bind method is used to connect/bind data from a view model to a view.
19. When a component is connected to the DOM, which of the following function is invoked?
- Attached
- Bind
- Unbind
- Connect
Answer: A) Attached
Explanation:
When a component is connected to the DOM, the attached function is invoked.
20. ____ method is used to turn on a view model.
- Attached
- Bind
- Activate
- Connect
Answer: C) Activate
Explanation:
Activate method is used to turn on a view model.
21. Which of the following function is used to remove the ties that attach a view model to a view?
- Attached
- Bind
- Unbind
- Detached
Answer: C) Unbind
Explanation:
Unbind function is used to remove the ties that attach a view model to a view.
22. How many binding modes are there in aurelia?
- 2
- 4
- 5
- 3
Answer: D) 3
Explanation:
In Aurelia, there are three binding modalities:
- One-way binding
- Two-way binding
- One-time binding
23. Which of the following is the default binding mode?
- One-way binding
- Two-way binding
- One-time binding
Answer: A) One-way binding
Explanation:
One-way binding is the default binding mode.
24. Which of the following binding mode indicates that the binding’s value will be assessed once and will not be modified again?
- One-way binding
- Two-way binding
- One-time binding
Answer: C) One-time binding
Explanation:
The One-Time binding mode indicates that the binding’s value will be assessed once and will not be modified again.
25. Which of the following binding mode means that the value in the view model and the value in the view are always in sync?
- One-way binding
- Two-way binding
- One-time binding
Answer: B) Two-way binding
Explanation:
Two-way binding means that the value in the view model and the value in the view are always in sync.
26. ____ in Aurelia are functions that are used to convert values from one format to another.
- Rectifiers
- Converters
- Adapters
- Injectors.
Answer: B) Converters
Explanation:
Converters in Aurelia are functions that are used to convert values from one format to another.
27. Which of the following HTTP method is used to gather data without altering it in any way?
- GET
- POST
- PUT
- PATCH
Answer: A) GET
Explanation:
GET HTTP method is used to gather data without altering it in any way.
28. Which of the following HTTP method is employed in the creation of new resources as well as the update of current ones?
- GET
- POST
- PUT
Answer: B) POST
Explanation:
POST HTTP method is employed in the creation of new resources as well as the update of current ones.
29. Which of the following HTTP method is used to swap out an existing resource with a new one?
- GET
- POST
- PUT
Answer: C) PUT
Explanation:
The PUT methid is used to swap out an existing resource with a new one.
30. Which of the following HTTP methods would you use if you wanted to make multiple updates to a resource?
- PUT
- PATCH
Answer: B) PATCH
Explanation:
You would use the HttpClient.patch function to make several modifications to a resource.
31. Which of the following HTTP method is used to permanently remove a resource?
- GET
- POST
- PUT
- DEL
- DELETE
Answer: E) DELETE
Explanation:
The DELETE method is used to permanently remove a resource.
32. How many router classes does Aurelia has?
- 4
- 5
- 3
- 2
Answer: D) 2
Explanation:
Aurelia has two router classes, AppRouter and Router.
33. Which of the following is a router instance function that allows you to construct a URL for a given route depending on its settings and any arguments you supply?
- Router
- New
- Generate
- Start
Answer: C) Generate
Explanation:
Generate is a router instance function that allows you to construct a URL for a given route depending on its settings and any arguments you supply.
34. Which of the following function on the router instance allows you to re-activate the component and update its data by refreshing the current route?
- Refresh
- Restart
- Update
- Re-install
Answer: A) Refresh
Explanation:
Refresh function on the router instance that allows you to re-activate the component and update its data by refreshing the current route.
35. Does Aurelia provide a built-in testing framework?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Aurelia provides a built-in testing framework.
36. The ____ plugin is an Aurelia framework plugin that allows you to manage your browser’s history.
- App.history
- History
- Aurelia.his
- aurelia-history
Answer: D) aurelia-history
Explanation:
The aurelia-history plugin is an Aurelia framework plugin that allows you to manage your browser’s history.
37. A ____ is a type of modal window that can show material or request the user for input.
- dialog
- Module
- Component
- Unit
Answer: A) dialog
Explanation:
A dialog is a type of modal window that can show material or request the user for input.
38. Which of the following plugin provide Aurelia’s internationalization and localization capability?
- i18n
- Templating
- Validation
- Store
Answer: A) i18n
Explanation:
i18n plugin provides Aurelia’s internationalization and localization capability.
39. Which of the following plugin allows you to validate forms and display error warnings for incorrect inputs?
- i18n
- Templating
- Validation
- Store
Answer: C) Validation
Explanation:
The aurelia-validation plugin allows you to validate forms and display error warnings for incorrect inputs.
40. Which of the following plugin is used for authentication and authorization in your application?
- Auth
- Authorization
- Authen
- Authentication
Answer: A) Auth
Explanation:
Auth plugin is used for authentication and authorization in your application.
41. Aurelia’s ____ feature allows you to manage event handlers at a higher level of the DOM structure rather than creating separate handlers for each component.
- Event Trigger
- Event Aggregator
- Event delegation
Answer: C) Event delegation
Explanation:
Aurelia’s Event Delegation feature allows you to manage event handlers at a higher level of the DOM structure rather than creating separate handlers for each component.
42. aurelia-fetch is used to only fetch the plugin details of forms? True or False
- True
- False
Answer: B) False
Explanation:
aurelia-fetch is used to make HTTP requests through the Fetch API.
43. Does aurelia-HTTP-client allow you to send HTTP requests to a server?
- Yes
- No
Answer: A) Yes
Explanation:
aurelia-HTTP-client allows you to send HTTP requests to a server.
44. Which of the following plugin is used for testing your Aurelia components and applications?
- Test
- Testing
- Aurelia.Test
Answer: B) Testing
Explanation:
Testing plugin is used for testing your Aurelia components and applications.
45. Which of the following are the alternatives of Aurelia?
- React
- Angular
- Ember.js
- All of the above
Answer: D) All of the above
Explanation:
React, angular, ember.js, Vue.js can be used as alternatives to aurelia.