Page 173 -
P. 173

156   Chapter 6   Architectural design



                                                  Controller                        View
                                                                    View
                                             Maps User Actions    Selection  Renders Model
                                             to Model Updates                Requests Model Updates
                                             Selects View                    Sends User Events to
                                                                  User Events
                                                                             Controller
                                                                        Change
                                                                     Notification
                                                  State                               State
                                                Change                                Query
                                                                    Model
                                                             Encapsulates Application
                                                             State
                                                             Notifies View of State
                  Figure 6.3 The                             Changes
                  organization of the MVC



                                    Appleton, 2002), and so on. Architectural patterns were proposed in the 1990s under
                                    the name ‘architectural styles’ (Shaw and Garlan, 1996), with a five-volume series of
                                    handbooks on pattern-oriented software architecture published between 1996 and
                                    2007 (Buschmann et al., 1996; Buschmann et al., 2007a; Buschmann et al., 2007b;
                                    Kircher and Jain, 2004; Schmidt et al., 2000).
                                       In this section, I introduce architectural patterns and briefly describe a selection
                                    of architectural patterns that are commonly used in different types of systems. For
                                    more information about patterns and their use, you should refer to published pattern
                                    handbooks.
                                       You can think of an architectural pattern as a stylized, abstract description of good
                                    practice, which has been tried and tested in different systems and environments. So,
                                    an architectural pattern should describe a system organization that has been success-
                                    ful in previous systems. It should include information of when it is and is not appro-
                                    priate to use that pattern, and the pattern’s strengths and weaknesses.
                                       For example, Figure 6.2 describes the well-known Model-View-Controller pattern.
                                    This pattern is the basis of interaction management in many web-based systems. The
                                    stylized pattern description includes the pattern name, a brief description (with an
                                    associated graphical model), and an example of the type of system where the pattern
                                    is used (again, perhaps with a graphical model). You should also include information
                                    about  when  the  pattern  should  be  used  and  its  advantages  and  disadvantages.
                                    Graphical models of the architecture associated with the MVC pattern are shown in
                                    Figures 6.3 and 6.4. These present the architecture from different views—Figure 6.3
                                    is a conceptual view and Figure 6.4 shows a possible run-time architecture when this
                                    pattern is used for interaction management in a web-based system.
                                       In a short section of a general chapter, it is impossible to describe all of the
                                    generic patterns that can be used in software development. Rather, I present some
                                    selected examples of patterns that are widely used and which capture good architec-
                                    tural design principles. I have included some further examples of generic architec-
                                    tural patterns on the book’s web pages.
   168   169   170   171   172   173   174   175   176   177   178