Architectural Styles, Patterns, and Frameworks Table 43: Architectural Styles, Patterns, and Frameworks Name Description Benefits, Costs, and Limitations 3-tier Separate the application Using web browser allows the user to use any devices that architecture into 3 tiers: the they want, resulting in no need to maintain users’ devices. presentation tier using a Any change made in the application in the server will be web browser, a logic tier automatically presented to the users. with Node.js server, and There is no cost for adopting the architecture. a data tier with MySQL. Need to acquire servers for application and database. Also, the database might be deployed on the same server if needed. Repository This design pattern is Repository mediates between the domain and data “A used to encapsulate the mapping layers, acting like an in-memory domain object logic to access the collection. Client objects construct query specifications database. declaratively and submit them to Repository for satisfaction.” () Repository encapsulates the set of objects persisted in “A a data and the operations performed over them, providing a more object-oriented view of the persistence layer.” () REST The Smart App exposes State Transfer (REST) is an “Representational RESTful services to architectural style that specifies constraints, such as the access and perform an uniform interface, that if applied to a web service induce operation on the locks. desirable properties, such as performance, scalability, and modifiability, that enable services to work best on the Web.” () Node.js The backend of the Node.js is an open-source, cross-platform JavaScript application uses Node.js. environment for executing JavaScript code It operates on a single thread, using non-blocking I/O calls, allowing it to support tens of thousands of concurrent connections without incurring the cost of thread context switching. built-in support for package management using NPM. Several free and open-source packages available. AngularJS AngularJS is a web AngularJS provides an easy way to render user interface. application framework Writing unit tests in AngularJS is easy based on JavaScript. It makes the code organized and easy to maintain.
Architectural Styles, Patterns, and Frameworks Table 43: Architectural Styles, Patterns, and Frameworks Name Description Benefits, Costs, and Limitations 3-tier architecture Separate the application into 3 tiers: the presentation tier using a web browser, a logic tier with Node.js server, and a data tier with MySQL. Using web browser allows the user to use any devices that they want, resulting in no need to maintain users’ devices. Any change made in the application in the server will be automatically presented to the users. There is no cost for adopting the architecture. Need to acquire servers for application and database. Also, the database might be deployed on the same server if needed. Repository This design pattern is used to encapsulate the logic to access the database. “A Repository mediates between the domain and data mapping layers, acting like an in-memory domain object collection. Client objects construct query specifications declaratively and submit them to Repository for satisfaction.” () “A Repository encapsulates the set of objects persisted in a data and the operations performed over them, providing a more object-oriented view of the persistence layer.” () REST The Smart App exposes RESTful services to access and perform an operation on the locks. “Representational State Transfer (REST) is an architectural style that specifies constraints, such as the uniform interface, that if applied to a web service induce desirable properties, such as performance, scalability, and modifiability, that enable services to work best on the Web.” () Node.js The backend of the application uses Node.js. Node.js is an open-source, cross-platform JavaScript environment for executing JavaScript code It operates on a single thread, using non-blocking I/O calls, allowing it to support tens of thousands of concurrent connections without incurring the cost of thread context switching. built-in support for package management using NPM. Several free and open-source packages available. AngularJS AngularJS is a web application framework based on JavaScript. AngularJS provides an easy way to render user interface. Writing unit tests in AngularJS is easy It makes the code organized and easy to maintain.