1 / 27

Architectural Patterns

Support Lecture. Architectural Patterns. Software Architecture. Architecture is OVERLOADED System architecture Application architecture Architecture for this presentation is The modules, processes, interconnections, and protocols which constitute the deployed software system.

donaldwing
Download Presentation

Architectural Patterns

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Support Lecture Architectural Patterns

  2. Software Architecture • Architecture is OVERLOADED • System architecture • Application architecture • Architecture for this presentation is • The modules, processes, interconnections, and protocols which constitute the deployed software system. • Different from the behavioral architecture which describes how the business classes execute the business processes.

  3. Architecture Specification • Document which defines in text and diagrams the design, flow and technologies of the design. • Shows how persistence, communication, and behavior are to be implemented in the system.

  4. Architectural Layers - Patterns • Presentation • interactions with the user – HTML, thick client, MVC, web services • Domain (Logic) • Business rules, validations, calculations, verifications • Data Storage • database • Environmental • Session management, messaging

  5. Presentation Architectural Patterns • Presentation interactions with the user • No Client • Thick Client (rich client) • Thin Client

  6. Presentation Architectural Patterns • Model View Controller • Application Controller • Input Controller • Page Controller • Front Controller • View Controller • Template View • Transform View • Two Step View

  7. Model View Controller Separation of Presentation (View/Controller) from Domain (Model) Separation of View and Controller Model – Domain object View – Presentation object Controller – Controller object to handle user request/response

  8. Application Controller A centralized point for handling screen navigation and flow of an application. Application Controller – determines which type of input is needed or which screen. Input Controller Application Controller Domain Layer View

  9. Application Controller

  10. Application Controller • A single point of control to change program flow and navigation • May be in mediating layer between the presentation and the domain • May be reusable across various presentations • Testable outside the UI framework.

  11. Front Controller

  12. Page Controller

  13. Front vs Page Controller • Front Controller • Single point for adding behavior • Can add behavior dynamically (filter pattern) • Use with more complex applications • Page Controller • Simple - Input controller per page • Don’t put controller logic into scriplets – use separate classes • More prone to duplicate code with this controller

  14. Template View

  15. Transform View

  16. Example

  17. Data Storage • Need mechanisms to allow RDBMS to communicate in the OO world. • With OO databases none of these patterns necessary. • Useful even if non-OO language wants to communicate with RDBMS to make the DB flexible to change in type and to make the data representation protected.

  18. Data Storage Patterns • Table Data Gateway • Row Data Gateway • Active Record • Data Mapper • Structural Patterns • Foreign Key Mapping, Identify Field Association, Table Mapping, Single Table Inheritance.

  19. Table Data Gateway

  20. Row Data Gateway

  21. Row Data Gateway (2)

  22. Active Record

  23. Data Mapper

  24. Distribution Patterns • Remote Façade • Data Transfer Object

  25. Remote Facade

  26. Data Transfer Object

  27. Summary • No one patterns is an end all • Patterns are mechanisms to help decompose applications into reusable, maintainable, modules. • The layers of development help to define the needed patterns • No pattern is always correct -- fit the application.

More Related