0% found this document useful (0 votes)
13 views

Layered Architecture

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Layered Architecture

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Layered Architecture

A layered software architecture organizes components into horizontal layers with clear interfaces. This promotes
modularity, scalability, and maintainability by separating concerns and enforcing dependencies.
Architecture Description
Layers Separation of Concerns Responsibilities

Typical layers include Components in each layer only Each layer is responsible for a
presentation, business, handle logic for that layer, specific set of tasks, like
persistence, and database. making the architecture modular. displaying data or executing
business rules.
Closed Layers
1 Layer Isolation
Changes in one layer don't impact other layers, enabling flexibility and easier refactoring.

2 Request Flow
Requests must flow through each layer sequentially, preventing direct access between layers.

3 Governance
Closed layers help control and restrict access to shared services and resources.
Open Layers
Exceptions
Open layers allow requests to bypass certain layers when needed, like accessing shared services.

Flexibility
Open layers provide more architectural flexibility to accommodate evolving requirements.

Documentation
Clearly documenting open and closed layers is crucial for understanding the architecture.
Pattern Analysis

Security Ease of maintenance Testability


layered architecture can improve maintenance becomes more High - Layers can be easily
security by restricting access to manageable mocked and tested.
sensitive functionality or data
Pattern Analysis (cont.)

Flexibility Scalability Reusability


Layered architecture allows for This allows for easier scalability Components within a layer can be
flexibility in technology choices reused across different parts of the
within each layer system
Pattern Analysis (cont.)

Over head Complexity Increased Latency


can add overhead in terms of Layered architectures can become Communication between layers
performance and resource overly complex can introduce latency
consumption
Have you ever wondered
how Google makes Gmail
work in different languages
all over the world?
Google has engineered Gmail to seamlessly serve users across the globe in their
native languages, without creating separate applications for each country.
Google developed the Gmail application in different
layers:

Internal Layer External Layer Database Layer

The core processing engine that The user-facing interface that The storage system that securely
powers Gmail's functionality. communicates with users in their houses millions of user email
preferred languages. messages.
Layered Architecture in Action
User Request

User initiates a request to view customer data.

Presentation Layer
Handles the UI and forwards the request.

Business Layer
Aggregates customer and order data.
Layered Architecture in Action (cont.)
Persistence Layer
Retrieves data from the database using SQL.

Database Layer
Stores and returns the requested customer data.

Response
Data flows back up the layers to the user.
Amaze: Seamless Project
Management Across
Devices
Amaze, a project
management software
company, aims to provide a
single application that works
seamlessly across all popular
devices, minimizing software
maintenance costs.
Business Problem: -
Amaze, a project management software company, faces the challenge of ensuring their
product works seamlessly across various devices
- The goal is to have a single software application that supports all popular devices
without exceptions
- Minimizing software maintenance costs is a priority
Solution Approach: -
Layered Architecture:
• Amaze adopts a layered architecture to address the problem
Amaze Basic Rules Layer:
• Contains critical rules governing the entire application's behavior
• Examples include enforcing constraints like "Project schedules require a defined project scope
• Houses intelligence derived from decades of project experience
Application Core Layer:
• Represents the most significant part of the application code
• Integrates business logic and core functionality
• Orchestrates interactions between different layers.
Database Layer:
• Manages data storage and retrieval
• Ensures data consistency and integrity
Conclusion
The layered architecture pattern is a well-established design that separates
concerns and enables modular development. While it has some limitations, it
remains a popular choice for many business applications.

You might also like