Lecture 01 - Multilayered Architecture PDF
Document Details
Belgium Campus iTversity
Tags
Summary
This lecture provides an introduction to multilayered architecture for computer science students. The presentation discusses the core concepts of layers vs tiers and the benefits of utilizing a layered architecture in software development.
Full Transcript
PRG 2X2 Multilayered Architecture www.belgiumcampus.ac.za Learning objectives In this presentation we will be looking at: Layers vs Tiers What is multilayered architecture? What are the benefits of using m...
PRG 2X2 Multilayered Architecture www.belgiumcampus.ac.za Learning objectives In this presentation we will be looking at: Layers vs Tiers What is multilayered architecture? What are the benefits of using multilayered software architecture? When to use multilayered architecture? 2 www.belgiumcampus.ac.za Layers vs. Tiers We need to be able to discuss the overall structure for applications, in terms of the logical grouping of components into separate layers or tiers that communicate with each other and with other clients and applications. Layers are concerned with the logical division of components and functionality Tiers are concerned with the physical distribution of components and functionality 3 www.belgiumcampus.ac.za Implementing Multilayered Architecture Organization of the project structure into different categories. 4 www.belgiumcampus.ac.za Implementing Multilayered Architecture Presentation services. These are the user-oriented services responsible for managing user interaction with the system, and generally consist of components located within the presentation layer. They provide a common bridge into the core business logic encapsulated in the business services. Business services. These services implement the core functionality of the system, and encapsulate the relevant business logic. They generally consist of components located within the business layer, which may expose service interfaces that other callers can use. Data services. These services provide access to data that is hosted within the boundaries of the system, and data exposed by other back-end systems; perhaps accessed through services. The data layer exposes data to the business layer through generic interfaces designed to be convenient for use by business services. 5 www.belgiumcampus.ac.za Three Tier Architectur e Layers are the logical groupings of the software components that make up the application or service. 6 www.belgiumcampus.ac.za How to Implement Layered Architecture? Step 1: Create separate folders for each layer : 7 www.belgiumcampus.ac.za How to Implement Layered Architecture? Step 2: Add file into Presentation Layer: Identify the classes and create it 8 www.belgiumcampus.ac.za How to Implement Layered Architecture? Presentation layer: This is the first and topmost layer which is present in the application. This tier provides presentation services, that is presentation, of content to the end user through GUI. This tier can be accessed through any type of client device like desktop, laptop, tablet, mobile, thin client, and so on. For the content to the displayed to the user, the relevant web pages should be fetched by the web browser or other presentation component which is running in the client device. To present the content, it is essential for this tier to interact with the other tiers that are present preceding it. 9 www.belgiumcampus.ac.za How to Implement Layered Architecture? Step 3: Add files into Business Logic Layer: Identify the classes and create it 10 www.belgiumcampus.ac.za How to Implement Layered Architecture? Business Logic layer: This is the middle tier of this architecture. This is the tier in which the business logic of the application runs. Business logic is the set of rules that are required for running the application as per the guidelines laid down by the organization. The components of this tier typically run on one or more application servers. 11 www.belgiumcampus.ac.za How to Implement Layered Architecture? Step 4: Add files into Data Access Layer: : Identify the classes and create it 12 www.belgiumcampus.ac.za How to Implement Layered Architecture? Data layer: This is the lowest tier of this architecture and is mainly concerned with the storage and retrieval of application data. The application data is typically stored in a database server, file server, or any other device or media that supports data access logic and provides the necessary steps to ensure that only the data is exposed without providing any access to the data storage and retrieval mechanisms. This is done by the data tier by providing an API to the application tier. The provision of this API ensures complete transparency to the data operations which are done in this tier without affecting the application tier. For example, updates or upgrades to the systems in this tier do not affect the application tier of this architecture. 13 www.belgiumcampus.ac.za Communication Between Layers In a system utilizing Multi Layered Architecture approach, it is vital to have communication between the layers which will make the system loosely coupled. Each layer must be independent of other, but still be able to communicate with the layer below or above it so as to share information. 14 www.belgiumcampus.ac.za Example: No Layers 15 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Presentation Layer 16 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Presentation Layer 17 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Presentation Layer 18 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Business Logic Layer 19 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Data Layer 20 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Main Program 21 www.belgiumcampus.ac.za Example: Communication between : Presentation Layer (PL), Business Logic Layer (BL), Data Access Layer Main Program 22 www.belgiumcampus.ac.za Advantages of Layered Architecture Objects Layered architecture enables teams to work on different parts of the application parallel with minimal dependencies on other teams. Layered architecture enables develop loosely coupled systems. Different components of the application can be independently deployed, maintained, and updated, on different time schedules. Layered architecture also makes it possible to configure different levels of security to different components deployed on different boxes. Layered architecture, enables you to secure portions of the application behind the firewall and make other components accessible from the Internet. Layered architecture also helps you to test the components independently of each other. 23 www.belgiumcampus.ac.za THANK YOU /belgiumcampusSA #Belgium Campus [email protected] +27 10 593 53 68 /belgiumcampus 24 www.belgiumcampus.ac.za