1 / 24

Logical Architecture

Logical Architecture. http://flic.kr/p/7wicbp. What are you going to learn about today?. How to organize your code—that is, how to design a logical architecture How to diagram logical architectures How to apply analysis artifacts (Domain Model and SSDs) to software design.

tillotsonr
Download Presentation

Logical Architecture

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. Logical Architecture http://flic.kr/p/7wicbp

  2. What are you goingto learn about today? • How to organize your code—that is, how to design a logical architecture • How to diagram logical architectures • How to apply analysis artifacts (Domain Model and SSDs) to software design http://flic.kr/p/8JpkTg

  3. Recall: Iterative development process We are here http://en.wikipedia.org/wiki/File:Iterative_development_model_V2.jpg

  4. Software architecture An architecture is the set of significant decisions about the organization of a software system, the selection of the structural elements and their interfaces by which the system is composed, together with their behavior as specified in the collaborations among those elements, the composition of these structural and behavioral elements into progressively larger subsystems, and the architectural style that guides this organization—these elements and their interfaces, their collaborations, and their composition. [Booch et al., 1999]

  5. Logical Architecture • Defines packages within which software classes are defined • Large-scale organization • Logical because no decision about how to deploy across different OS process or physical computers

  6. Example: Layered Architecture package package name nestedpackage dependency

  7. UML package notation details: Namespaces • UML package provides namespace • Examples: • UI::Swing • UI::Web • More examples: • java::util::Date • java::lang::System Note: Java uses dots; e.g., java.lang.System

  8. UML package notation details:Three ways to denote nesting :: :: ::

  9. Layered Architecture • Common architectural style • Layer: • Coarse-grained grouping of classes, packages, subsystems • Has cohesive responsibility for a major aspect of system • Higher layers call upon lower layers • But not vice versa • Client/Supplier pattern • Lower layers more general, higher more app specific

  10. CommonLayers User InterfaceLayer Application Logic Layer (aka Domain Layer) Technical Services Layer

  11. Activity: Create a layered architecture for your team project • Create UML package diagram • Compare your current architecture to an ideal layered architecture • Pay attention to dependencies between packages! http://flic.kr/p/5dfuqL

  12. Note: Larman focuses on the domain layerRationale: Other layers tend to depend heavily on a particular technology (e.g., .NET)

  13. Benefits of Layered Architecture • Separates concerns • Complexity is contained • Some layers may be replaceable/reusable • Some layers may be distributed • Prevents changes from rippling through system • Changes bubble up? • Breaks up work for developers

  14. More examples of common layers (cont’d next slide)

  15. Still more examples of common layers

  16. Mapping layers to Java code // UI LAYER com.mycompany.nextgen.ui.swing com.mycompany.nextgen.ui.web // DOMAIN LAYER com.mycompany.nextgen.domain.sales com.mycompany.nextgen.domain.payments // TECHNICAL SERVICES LAYER com.mycompany.service.persistence // Third-party packages org.apache.log4j org.apache.soap.rpc // FOUNDATION LAYER com.mycompany.util

  17. What’s the relationship between theDomain Layer and the Domain Model?ORHow do we designapplication logic with objects? http://flic.kr/p/9ksxQa

  18. Answer: Create software objects with names and info similar to the real-world domain DomainModel SoftwareClasses in theDomainLayer

  19. Pitfall: Don’t mix architectural views! Worse! Better! No! Bad! Don’t show external resources as the bottom layer

  20. Guideline: Model-View Separation Principle • Do not connect or couple non-UI objects directly to UI objects • Do not put application (domain) logic in UI methods Model View Separation http://flic.kr/p/7iRwYr http://flic.kr/p/4EW6q8

  21. Why would it be bad to leta Sale software classhave a reference toa JFrame window object? http://flic.kr/p/9ksxQa

  22. We’ve already discussed how theDomain Model influences designHow do think SSDs might influence design? http://flic.kr/p/9ksxQa

  23. System operations in an SSD suggest operation calls on the Domain Layer from the UI Layer System operations …………….… inspire ………………… these operations

  24. Summary • UML package diagrams • Layered architectures • Model-View Separation Principle • Domain Model suggests Domain Layer classes • System operations suggest Domain Layer operations http://flic.kr/p/YSY3X

More Related