Common Pattern:
Layered architecture, also known as n-tier, is widely used in Java EE applications.
Organizes components into layers, like presentation, business, persistence, and database.
Organization and Roles:
Each layer has a specific role (e.g., presentation shows info, business executes rules).
Typically four layers but can vary based on application size and complexity.
Separation of Concerns:
Components within a layer focus on specific tasks, making it easy to manage and understand.
Promotes effective role models and facilitates development, testing, and maintenance.
Closed Layers:
Requests move sequentially through layers, ensuring they pass through each layer.
Prevents direct access from presentation to persistence or database layers.
Open Layers:
Allows certain layers to bypass others for specific functions, adding flexibility.
Useful when integrating shared services while maintaining access restrictions.
Example:
Illustrates how a request for customer info flows through layers, showing independence and responsibilities.
Components in each layer handle specific tasks, ensuring a structured process.
Considerations:
Watch out for the architecture sinkhole (too simple logic passing through layers).
Tends towards monolithic applications, which may impact deployment, robustness, and scalability.
Analysis:
High testability and ease of development.
Lower ratings for overall agility, ease of deployment, performance, and scalability.
Solid choice for general-purpose applications, especially when specific requirements are not fully defined.
Comments
Post a Comment