Architectural Patterns

Document Sample
Architectural Patterns Powered By Docstoc
					  Another group of Patterns



Architectural Patterns




                              1
  Patterns

Pattern: A representation of a proven solution.



                        Problem

                            Applicable Forces

                          Solution

       Benefits         Consequences
                                                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
           Types of Patterns

• Lowest Level – Programming Patterns
  – Iterator, if, while
• Design Level – Design Patterns
  – Factory, builder, --- gang of 4
• Before Design – Architectural Patterns
  – Martin Fowler- presentation, domain, data
    storage, environment
• Analysis Patterns –
  – used in requirements analysis
                                          5
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

                                                    6
Presentation Architectural Patterns

• Presentation   interactions with the user


• No Client

• Thick Client (rich client)

• Thin Client
                                        7
Presentation Architectural Patterns

• Model View Controller
• Application Controller
• Input Controller
  – Page Controller
  – Front Controller

• View Controller
  – Template View
  – Transform View
  – Two Step View

                             8
            Model View Controller

                                      Model – Domain object
                                      View – Presentation object
                                      Controller – Controller
                                      object to handle user
                                      request/response



Separation of Presentation (View/Controller) from Domain (Model)
Separation of View and Controller

                                                            9
                   Application Controller

Input Controller
                     Application
                      Controller
                                   Domain Layer
                                                  Application
                                                  Controller –
                                                  determines which
     View
                                                  type of input is
                                                  needed or which
                                                  screen.



A centralized point for handling screen navigation and flow of an
   application.

                                                               10
Application Controller




                         11
     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.

                                12
Front Controller




                   13
Page Controller




                  14
             Front vs Page Controller


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




                                                              15
Template View




                16
Transform View




                 17
Template vs Transform vs Two Step

• Template View
  – Follows natural editing notions
  – Supports non=programmer editors of HTML
  – Needs discipline to avoid scriplets

• Transform View
  – Can test without server
  – Works well with XML

• Two Step View
  – Easy to make global appearance changes
  – Easy to support multiple appearances
  – Complex
                                              18
Example




          19
               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.


                                       20
           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.



                                              21
Table Data Gateway




                     22
Row Data Gateway




                   23
Row Data Gateway (2)




                       24
Active Record




                25
Data Mapper




              26
          Distribution Patterns

• Remote Façade
• Data Transfer Object




                                  27
Remote Facade




                28
Data Transfer Object




                       29
                 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.

                                      30
                           Computing Degrees at FSU-Panama City
 Information System Degrees                                                                                                  Scientific Degrees


Management Information Systems (BS)                                                                                 Computer Science (MS, Web-BS)
     . Advisor Jeanne Dexter – jdexter@mail.pc.fsu.edu                                                                     . Advisor Sara Stoecklin stoeckli@cs.fsu.edu

      Systems Analysis                                                                                                   Operating Systems
      IT Management                                                                                                      Systems Programming
      Computer Consulting                                                                                                Applications Programming
      Application Programming                                                                                            Database Administration
                                                                                                                          Systems Administration



Information Studies (Web – BS,MS)                                                                                  Computer Engineering (BS, Web-MS)
     . Advisor Alan Stromberg sdytomnrty@mail.pc.fsu.edu                                                              . Advisor Kamran Imen kimen@mail.pc.fsu.edu

      Web Development                                                                                                    Embedded Systems
      Network Management                                                                                                 Image Processing
      Information Systems                                                                                                Electronics and Electromagnetics
      Management of Information                                                                                          Signals and Systems
       Services
                                                                                                                          Communications
      Social Informatics
                                                                                                                          Microprocessors
      Information and Communication
       Technologies                                                                                                       Computer Architecture
                                                                                                                                                      31
                                                           . Degree Programs http://www.pc.fsu.edu/degreeplansheets/default.asp

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:2/8/2012
language:English
pages:31