-
Notifications
You must be signed in to change notification settings - Fork 0
Software Achitectures
In 1-Tier Architecture the database is directly available to the user, the user can directly sit on the DBMS and use it that is, the client, server, and Database are all present on the same machine. For Example: to learn SQL we set up an SQL server and the database on the local system. This enables us to directly interact with the relational database and execute operations. The industry won’t use this architecture they logically go for 2-tier and 3-tier Architecture.
IT is similar to a basic[ client-server model] The application at the client end directly communicates with the database on the server side. APIs like ODBC and JDBC are used for this interaction. The server side is responsible for providing query processing and transaction management functionalities. On the client side, the user interfaces and application programs are run. The application on the client side establishes a connection with the server side to communicate with the DBMS.
N-tier architecture is also called multi-tier architecture because the software is engineered to have the processing, data management, and presentation functions physically and logically separated. That means that these different functions are hosted on several machines or clusters, ensuring that services are provided without resources being shared and, as such, these services are delivered at top capacity. The “N” in the name n-tier architecture refers to any number from 1.
● The most common type of Layered Architecture is a 3-Layered Architecture. ● 3-Layered Architecture consists of:
- Presentation layer
- Application layer
- Data layer
Presentation Layer ● Presentation Layer is our connection to the outside world. This is where we handle all the incoming requests to our application and return a response. ● This layer is also the first line of defense in our application because this is where we do authorization checks. ● One layer below Presentation Layer is Application Layer. ● Presentation Layer relies upon Application Layer to do all the functions the system should provide. Thus Presentation Layer has dependency only on the Application Layer
Application Layer ● Application Layer is where we develop all the functions our application should provide. So in terms of a Web Shop, this is where we implement functions for addArticleToBasket, proceedToCheckout, cancelOrder ...etc ● This is also where we do all our validations. For example, before adding an article to the customer's basket we can check that the customer has enough money to pay for the article. ● Application Layer relies upon Data Layer to save all the data for later use or fetch some previously-saved data. Thus Application Layer has dependency only on Data Layer. ● Application Layer returns the result of its calculations back to the Presentation Layer
Data Layer ● Data Layer handles the persisting of our data. It communicates with the Database and has no further dependencies. ● Data Layer returns its data back to the Application Layer