Untitled document (2)
Untitled document (2)
Architectural styles define a system's structural organization, influencing how components interact and
communicate. Here are explanations of the specified styles:
2. Object-Oriented Architecture
● Definition: Based on objects, which are instances of classes encapsulating data and behavior.
● Key Characteristics:
○ Promotes reusability and modularity.
○ Communication occurs via method calls between objects.
● Benefits:
○ Easy to maintain and extend.
○ Aligns closely with real-world modeling.
● Example: A GUI application where buttons, text fields, and windows are objects interacting with
each other.
3. Layered Architecture
● Definition: The system is organized into layers, each providing services to the layer above it and
depending on the layer below it.
● Key Characteristics:
○ Clear separation of concerns.
○ Each layer has a specific role (e.g., presentation, business logic, data access).
● Benefits:
○ Scalability and maintainability.
○ Layers can be replaced or updated independently.
● Example:
○ 4-Layer Architecture:
1. Presentation Layer: Handles the user interface.
2. Business Logic Layer: Processes the application's core functionality.
3. Data Access Layer: Manages database interactions.
4. Database Layer: Stores data.
● Use Case: Web applications (e.g., MVC framework).
4. Data-Centered Architecture
● Definition: Focuses on a central data store that all components interact with.
● Types:
○ Repository Model: All components read/write to a shared data repository.
○ Blackboard Model: Components share a common data structure, actively modifying and
reacting to data changes.
● Key Characteristics:
○ Centralized data management.
○ Loose coupling between components.
● Benefits:
○ Simplifies data consistency and integration.
● Example:
○ Repository Model: Version control systems like Git.
○ Blackboard Model: AI systems for problem-solving.
● Definition: Follows a hierarchical control structure where modules call subordinate modules and
return control to the caller.
● Types:
○ Main-Subroutine: Centralized control with a main program calling subroutines.
○ Remote Procedure Call (RPC): Calls are made to remote services as if they are local
subroutines.
● Key Characteristics:
○ Emphasizes control flow.
○ Modules can be reused easily.
● Benefits:
○ Clear execution flow.
○ Simplifies debugging.
● Example: A program where a main function orchestrates calls to helper functions (e.g., a
calculator application).