Software Architecture CSC 440: Software Engineering Slide #1
Topics 1. What is software architecture? 2. Why do we need software architecture? 3. Architectural principles 4. UML package diagrams 5. Software architecture examples CSC 440: Software Engineering Slide #2
What is Software Architecture? Software architecture is the high level fundamental organization of a system. Division of system into a set of components. Defining relationships between those components. CSC 440: Software Engineering Slide #3
4+1 View Model Logical view focuses on functional for end users. Can model with SSDs. Development view is from programmer s perspective. Can model with package diagrams. Process view deals with dynamic aspects of system: concurrency, scalability, etc. Physical view illustrates how software components are deployed on physical machines. CSC 440: Software Engineering Slide #4
Architecture lets designers 1. Analyze effectiveness of design in meeting requirements. 2. Consider architectural alternatives before spending time designing and implementing them. 3. Reduce risks associated with implementing software. 4. Provide key abstractions for reasoning about design. CSC 440: Software Engineering Slide #5
Requirements to Architecture Nonfunctional requirements constrain architecture. Availability Ease of deployment Maintainability Modifiability Performance Reliability Security Usability CSC 440: Software Engineering Slide #6
Architectural Principles 1. Separation of concerns. Divide software into components with little functional overlap. Minimize interaction to enable reuse and redesign. 2. Single Responsibility. Each component should control only a single type of functionality. 3. Principle of Least Knowledge. Components should not know about internal details of other components. CSC 440: Software Engineering Slide #7
Separation of Concerns Example Model-View separation means No application logic in user interface classes. No user interface code in domain layer classes. Domain layer classes should not have UI objects as attributes and vice versa. Benefits of Model-View separation Enables separate development Localizes changes to interface requirements Can add new views (add mobile and CLI to web app) CSC 440: Software Engineering Slide #8
Architecture in the UP S a m p le U P A r tifa c t R e la tio n s h ip s D o m a in B u s in e s s M o d e l M o d e lin g * * R e q u ir e - U s e -C a s e M o d e l V is io n S upplem entary S pecification G lo s s a ry m e n ts T h e lo g ic a l a rc h ite c tu re is in flu e n c e d b y th e c o n s tra in ts a n d n o n -fu n c tio n a l re q u ire m e n ts c a p tu re d in th e S u p p. S p e c. D e s ig n M o d e l p a c k a g e d ia g r a m s UI o f th e lo g ic a l arch itectu re (a s ta tic v ie w ) D o m a in T e c h S e r v ic e s : R e g is te r : P ro d u c tc a ta lo g D e s ig n in te ra c tio n d ia g ra m s (a d y n a m ic v ie w ) e n te rite m (ite m ID, q u a n tity ) s p e c = g e tp ro d u c ts p e c ( ite m ID ) R e g is te r P roductc atalog c la s s d ia g ra m s (a s ta tic v ie w )... 1 1... m a k e N e w S a le () e n te rite m (...)... g e tp ro d u c ts p e c (...)... Slide #9
Package Diagrams UI S w in g n o t th e J a v a S w in g lib ra rie s, b u t o u r G U I c la s s e s b a s e d o n S w in g W e b D o m a in S a le s P a y m e n ts T a x e s T e c h n ic a l S e rv ic e s P e rs is te n c e L o g g in g R u le s E n g in e Slide #10
Nested Packages UI D o m a in S w in g W e b S a le s UI UI::S w in g UI::W e b D o m a in ::S a le s S w in g W e b D o m a in S a le s CSC 440: Software Engineering Slide #11
Layered Architectures A layered architecture hides implementation details of lower layers from higher levels. Layers interact only with adjacent layers. The OSI (Open System Interconnect) Reference Model is a network model consisting of seven layers
Example of Layered Architecture Slide #13
Layers and Partitions D o m a in P O S In v e n to ry T a x V e rtic a l L a y e rs T e c h n ic a l S e rv ic e s P e rs is te n c e S e c u rity L o g g in g H o riz o n ta l P a rtitio n s CSC 440: Software Engineering Slide #14
Mapreduce Architecture CSC 440: Software Engineering Slide #15
Service-Oriented Architecture CSC 440: Software Engineering Slide #16