Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE360 Flipped Lecture 08

CSE360 Flipped Lecture 08

Introduction to Software Engineering
Software Architecture
(202010)

Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. CSE 360
    Introduction to Software Engineering
    Lecture 08: Software Architecture
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View full-size slide

  2. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 2
    We are here

    View full-size slide

  3. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 3
    We are here
    Java.util
    javax.swing
    java.awt

    View full-size slide

  4. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 4
    Next
    Class
    + method_1()
    + method_2()
    + method_3()
    void method_1() {
    // for, if
    // variables
    // instructions
    // call()
    }

    View full-size slide

  5. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 5
    Next
    Class
    + method_1()
    + method_2()
    + method_3()
    void method_1() {
    // for, if
    // variables
    // instructions
    // call()
    }
    Algorithms Architecture

    View full-size slide

  6. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 6
    Homework for this Week
    Regarding Algorithms:
    1. Decision tables and Decision Trees
    2. Nassi-Schneiderman Diagrams
    3. Flowchart Diagram
    4. Pseudocode

    View full-size slide

  7. Software Architecture

    View full-size slide

  8. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 8
    Definition
    • software design is responsible for the code level
    design: what each class is doing, its relationships,
    and scope.
    • software architecture is responsible for the skeleton
    and the high-level organization of a software. It
    identifies the main structural modules (or
    components) in a system and the relationships
    between them.

    View full-size slide

  9. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 9
    An Assignment
    Hardware
    OS
    Java VM
    Apache Log4J
    SLF4J
    Hadoop
    Spark
    nd4j
    deeplearning4J

    View full-size slide

  10. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 10
    Architectural Decisions
    Is there a generic application
    architecture that can act as a
    template for the system that is
    being designed?
    How will the system be
    distributed across hardware
    cores or processors?
    What architectural patterns or
    styles might be used?
    What will be the fundamental
    approach used to structure
    the system?
    How will the structural
    components in the system be
    decomposed into
    sub-components?
    What strategy will be used to
    control the operation of the
    components in the system?
    What architectural organization
    is best for delivering the
    non-functional requirements
    of the system?
    How should the architecture
    of the system be
    documented?
    ?

    View full-size slide

  11. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 11
    Architecture Goals
    • “horizontal” and “vertical” partitioning
    • define separate branches for each major function
    • coordinate communication between modules
    • design so that decision-making, and work are
    stratified
    • results in propagation of fewer side effects
    • results in software that is easier to extend

    View full-size slide

  12. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 12
    Architectural Patterns
    1. Model-View-Controller (MVC)
    2. Layered Architecture
    3. Repository Architecture (Blackboard)
    4. Client-Server architecture

    View full-size slide

  13. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 13
    Architectural Representations
    • Simple, informal block diagrams showing entities
    and relationships are the most frequently used
    method for documenting software architectures.
    • But these have been criticized because they lack
    semantics, do not show the types of relationships
    between entities nor the visible properties of entities
    in the architecture.

    View full-size slide

  14. 1. Model-View-Controller
    Architecture Pattern

    View full-size slide

  15. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 15
    Model-View-Controller

    View full-size slide

  16. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 16
    Model-View-Controller
    browser

    View full-size slide

  17. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 17
    Model-View-Controller
    Description Separates presentation and interaction from the system data into three
    logical components:
    • Model component manages the system data and associated operations
    on that data.
    • View component defines and manages how the data is presented to the
    user.
    • Controller component manages user interaction (e.g., key presses,
    mouse clicks, etc.) and passes these interactions to the View and the
    Model.
    When
    Used
    Used when there are multiple ways to view and interact with data. Also
    used when the future requirements for interaction and presentation of data
    are unknown.
    Advantages Allows the data to change independently of its representation and vice
    versa. Supports presentation of the same data in different ways with
    changes made in one representation shown in all of them.
    Disadvantages Additional code and complexity when the data model and interactions are
    simple.

    View full-size slide

  18. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 18
    Simplest Implementation
    Subject Observer

    View full-size slide

  19. 2. Layered Architecture
    Architecture Patterns

    View full-size slide

  20. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 20
    A generic layered architecture

    View full-size slide

  21. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 21
    Layered Architecture

    View full-size slide

  22. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 22
    Layered Architecture
    Description Organizes the system into layers with related functionality associated with
    each layer.
    A layer provides services to the layer above it so the lowest-level layers
    represent core services that are likely to be used throughout the system.
    When used Used when :
    • building new facilities on top of existing systems;
    • the development is spread across several teams with each team
    responsibility for a layer of functionality;
    • there is a requirement for multi-level security.
    Advantages Allows replacement of entire layers so long as the interface is maintained.
    Redundant facilities (e.g., authentication) can be provided in each layer to
    increase the dependability of the system.
    Disadvantages In practice, providing a clean separation between layers is often difficult
    and a high-level layer may have to interact directly with lower-level layers
    rather than through the layer immediately below it.
    Performance can be a problem because of multiple levels of interpretation
    of a service request as it is processed at each layer.

    View full-size slide

  23. 3. Blackboard
    Architecture Patterns

    View full-size slide

  24. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 24
    Blackboard

    View full-size slide

  25. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 25
    Blackboard
    Description All data in a system is managed in a central repository
    Components do not interact directly, only through the repository.
    When used when you have a system in which large volumes of information are
    generated that has to be stored for a long time.
    When the inclusion of data in the repository triggers an action or tool.
    Advantages Components can be independent—they do not need to know of the
    existence of other components.
    Changes made by one component can be propagated to all
    components.
    Disadvantages The repository is a single point of failure so problems in the repository
    affect the whole system.
    May be inefficiencies in organizing all communication through the
    repository.

    View full-size slide

  26. 4. Client-Server
    Architecture Patterns

    View full-size slide

  27. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 27
    Client-Server

    View full-size slide

  28. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 28
    Client-Server
    Description The functionality of the system is organized into services.
    Each service delivered from a separate server.
    Clients are users of these services and access servers to make use of
    them.
    When used Used when data has to be accessed from a range of locations.
    May also be used when the load on a system is variable.
    Advantages Distributed system
    Disadvantages Each service is a single point of failure so susceptible to denial of service
    attacks or server failure.
    Performance may be unpredictable because it depends on the network as
    well as the system.

    View full-size slide

  29. Put all together

    View full-size slide

  30. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 30
    What architecture to use here?

    View full-size slide

  31. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 31
    Homework
    Complete This Week’s Hybrid Activities

    View full-size slide

  32. CSE360 – Introduction to Software Engineering
    Javier Gonzalez-Sanchez
    [email protected]
    Summer 2017
    Disclaimer. These slides can only be used as study material for the class CSE360 at ASU. They cannot be distributed or used for another purpose.

    View full-size slide