mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 02:14:45 +00:00
docs: Content SEO updates (#2990)
* update yaml frontmatter format * update abstract document * update abstract factory * use the new pattern template * acyclic visitor seo * adapter seo * ambassador seo * acl seo * aaa seo * async method invocation seo * balking seo * bridge seo * builder seo * business delegate and bytecode seo * caching seo * callback seo * chain seo * update headings * circuit breaker seo * client session + collecting parameter seo * collection pipeline seo * combinator SEO * command seo * cqrs seo * commander seo * component seo * composite seo * composite entity seo * composite view seo * context object seo * converter seo * crtp seo * currying seo * dao seo * data bus seo * data locality seo * data mapper seo * dto seo * decorator seo * delegation seo * di seo * dirty flag seo * domain model seo * double buffer seo * double checked locking seo * double dispatch seo * dynamic proxy seo * event aggregator seo * event-based asynchronous seo * eda seo * event queue seo * event sourcing seo * execute around seo * extension objects seo * facade seo * factory seo * factory kit seo * factory method seo * fanout/fanin seo * feature toggle seo * filterer seo * fluent interface seo * flux seo * flyweight seo * front controller seo * function composition seo * game loop seo * gateway seo * guarded suspension seo * half-sync/half-async seo * health check seo * hexagonal seo * identity map seo * intercepting filter seo * interpreter seo * iterator seo * layers seo * lazy loading seo * leader election seo * leader/followers seo * lockable object seo * rename and add seo for marker interface * master-worker seo * mediator seo * memento seo * metadata mapping seo * microservice aggregator seo * api gw seo * microservices log aggregration seo * mvc seo * mvi seo * mvp seo * mvvm seo * monad seo * monitor seo * monostate seo * multiton seo * mute idiom seo * naked objects & notification seo * null object seo * object mother seo * object pool seo * observer seo * optimistic locking seo * page controller seo * page object seo * parameter object seo * partial response seo * pipeline seo * poison pill seo * presentation model seo * private class data seo * producer-consumer seo * promise seo * property seo * prototype seo * proxy seo * queue-based load leveling seo * reactor seo * registry seo * repository seo * RAII seo * retry seo * role object seo * saga seo * separated interface seo * serialized entity seo * serialized lob seo * servant seo * server session seo * service layer seo * service locator seo * service to worker seo * sharding seo * single table inheritance seo * singleton seo * spatial partition seo * special case seo * specification seo * state seo * step builder seo * strangler seo * strategy seo * subclass sandbox seo * table module seo * template method seo * throttling seo * tolerant reader seo * trampoline seo * transaction script seo * twin seo * type object seo * unit of work seo * update method seo * value object seo * version number seo * virtual proxy seo * visitor seo * seo enhancements * seo improvements * SEO enhancements * SEO improvements * SEO additions * SEO improvements * more SEO improvements * rename hexagonal + SEO improvements * SEO improvements * more SEO stuff * SEO improvements * SEO optimizations * SEO enhancements * enchance SEO * improve SEO * SEO improvements * update headers
This commit is contained in:
1 parent
cb946c0cdc
commit
6cd2d0353a
219 files changed
+3308
-2819
No files matched your search
@@ -1,28 +1,30 @@
|
||||
---
|
||||
title: Layered Architecture
|
||||
title: "Layered Architecture Pattern in Java: Building Scalable and Maintainable Applications"
|
||||
shortTitle: Layered Architecture
|
||||
description: "Explore the Layered Architecture design pattern in Java. Learn its benefits, real-world examples, use cases, and how it enhances maintainability and scalability in enterprise applications."
|
||||
category: Architectural
|
||||
language: en
|
||||
tag:
|
||||
- Abstraction
|
||||
- Decoupling
|
||||
- Enterprise patterns
|
||||
- Layered architecture
|
||||
- Scalability
|
||||
- Abstraction
|
||||
- Decoupling
|
||||
- Enterprise patterns
|
||||
- Layered architecture
|
||||
- Scalability
|
||||
---
|
||||
|
||||
## Also known as
|
||||
|
||||
* N-Tier Architecture
|
||||
|
||||
## Intent
|
||||
## Intent of Layered Architecture Design Pattern
|
||||
|
||||
The Layered Architecture pattern helps organize applications into groups of subtasks at different levels of abstraction, facilitating independent development and maintenance of each layer.
|
||||
The Layered Architecture design pattern helps organize applications into groups of subtasks at different levels of abstraction, facilitating independent development and maintenance of each layer.
|
||||
|
||||
## Explanation
|
||||
## Detailed Explanation of Layered Architecture Pattern with Real-World Examples
|
||||
|
||||
Real-world example
|
||||
|
||||
> Imagine constructing a modern high-rise building, which is analogous to using the Layered Architecture pattern in software development. Just as a building is divided into layers such as the foundation, structural floors, residential floors, and the rooftop, each with specific functions and built using different materials and techniques, a software application can be similarly structured.
|
||||
> Imagine constructing a modern high-rise building, analogous to using the Layered Architecture design pattern in software development. This pattern allows each software layer, such as the data layer, service layer, and presentation layer, to support seamless interaction while maintaining independence, enhancing maintainability and scalability. Just as a building is divided into layers such as the foundation, structural floors, residential floors, and the rooftop, each with specific functions and built using different materials and techniques, a software application can be similarly structured.
|
||||
>
|
||||
> In this analogy, the foundation represents the data layer, responsible for managing database operations. The structural floors are akin to the service layer, which contains business logic and rules. The residential floors parallel the presentation layer, which deals with user interfaces and interactions. Finally, the rooftop could be seen as the API layer, allowing external systems to communicate with the application.
|
||||
>
|
||||
@@ -36,7 +38,7 @@ Wikipedia says
|
||||
|
||||
> In software engineering, multitier architecture (often referred to as n-tier architecture) or multilayered architecture is a client–server architecture in which presentation, application processing, and data management functions are physically separated.
|
||||
|
||||
**Programmatic Example**
|
||||
## Programmatic Example of Layered Architecture in Java
|
||||
|
||||
On the data layer, we keep our cake building blocks. `Cake` consist of layers and topping.
|
||||
|
||||
@@ -84,11 +86,11 @@ public class CakeViewImpl implements View {
|
||||
}
|
||||
```
|
||||
|
||||
## Class diagram
|
||||
## Detailed Explanation of Layered Architecture Pattern with Real-World Examples
|
||||
|
||||

|
||||
|
||||
## Applicability
|
||||
## When to Use the Layered Architecture Pattern in Java
|
||||
|
||||
This pattern is suitable for structuring applications that can be divided into groups where each group has a specific role or responsibility. Common in enterprise applications, it simplifies dependencies, enhances maintainability, and supports scaling and technology stack segregation.
|
||||
|
||||
@@ -98,12 +100,12 @@ Use the Layers architecture when
|
||||
* You want to prevent a change from propagating throughout the application.
|
||||
* You want to make your application more maintainable and testable.
|
||||
|
||||
## Known Uses
|
||||
## Real-World Applications of Layered Architecture Pattern in Java
|
||||
|
||||
* Web applications where the presentation, business logic, and data access layers are distinctly separated.
|
||||
* Enterprise systems where core functionalities are isolated from interface applications and databases.
|
||||
|
||||
## Consequences
|
||||
## Benefits and Trade-offs of Layered Architecture Pattern
|
||||
|
||||
Benefits
|
||||
|
||||
@@ -117,12 +119,12 @@ Trade-offs
|
||||
* Complexity in layer management
|
||||
* Challenges in designing an effective layer distribution.
|
||||
|
||||
## Related Patterns
|
||||
## Related Java Design Patterns
|
||||
|
||||
* [Model-View-Controller](https://java-design-patterns.com/patterns/model-view-controller/): Shares separation of concerns by dividing application into input, processing, and output. Layered Architecture often implements an MVC within its presentation layer.
|
||||
* Service-Oriented Architecture (SOA): Both patterns emphasize modularization but SOA focuses more on distributed services that can be reused across different systems.
|
||||
|
||||
## Credits
|
||||
## References and Credits
|
||||
|
||||
* [Clean Architecture: A Craftsman's Guide to Software Structure and Design](https://amzn.to/3UoKkaR)
|
||||
* [Java Design Pattern Essentials](https://amzn.to/4drLhHU)
|
||||
|
||||
Reference in new issue
Block a user