Presentation is loading. Please wait.

Presentation is loading. Please wait.

BTS530: Major Project Planning and Design

Similar presentations


Presentation on theme: "BTS530: Major Project Planning and Design"— Presentation transcript:

1 BTS530: Major Project Planning and Design
Architectural Patterns / Principles References and Material From: Applying UML and Patterns, 3rd Edition, chapters 26 and 13

2 Architectural Patterns/Principles
Layers Separation of Concerns Model-View Separation Principle

3 Layers The Layers Pattern:
Organize large-scale logical structure of a system into discrete layers of responsibilities lower layers are low-level general services, higher layers more application specific collaboration and coupling is from higher to lower layers lower to higher coupling is avoided Benefits helps isolate application logic from UI for reusability isolates source code changes—eases maintainability keeps coupling between areas of concern (e.g. layers) low lower layers contain reusable functions some layers can be distributed….etc… Applying UML and Patterns P. 203

4 Applying UML and Patterns Fig. 13.4

5 Separation of Concerns
responsibilities of objects in a layer should be strongly related to each other and not mixed with responsibilities of other layers =>UI objects should not do application logic =>application object should not do DB logic Applying UML and Patterns P. 203

6 Model-View Separation
Do not connect or couple non-UI objects directly to UI objects. Do not put application logic (e.g. tax calculations) in the UI object methods. UI object should only: initialize UI elements receive UI events (e.g. mouseclick) delegate requests for application logic on to non-UI objects (e.g. facades) Applying UML and Patterns P. 209

7 Model-View Separation
domain object should not have direct knowledge of UI objects, at least as view objects E.g. Sale should not directly send a message to a GUI window ProcessSaleFrame asking it to display something Relaxation of this principle: Observer pattern—domain objects send messages to UI objects viewed only in terms of an interface such as a PropertyListener. Applying UML and Patterns P. 209/210

8 Applying UML and Patterns Fig. 13.8


Download ppt "BTS530: Major Project Planning and Design"

Similar presentations


Ads by Google