Software Engineering: Architectural Design - PDF

Document Details

ManeuverableHeliotrope1521

Uploaded by ManeuverableHeliotrope1521

Ninevah University

2024

Tags

software architecture software design architectural patterns software engineering

Summary

These lecture notes cover software engineering with a focus on architectural design. Topics covered include architectural patterns, models, and design decisions. There are questions throughout, prompting the student to think about the subject.

Full Transcript

Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Software Engineering : Architectural Design The big picture Architectural design is a process for identifying the sub-systems making up a system, and the framework...

Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Software Engineering : Architectural Design The big picture Architectural design is a process for identifying the sub-systems making up a system, and the framework for sub-system control & communication. The output of this design process is a description of the software architecture. Architectural design involves identifying major system components & their communications. What Architectural design includes/ involves? Software architectures can be designed at two levels of abstraction: (What?)  Architecture in the small is concerned with the architecture of individual programs. At this level, we are concerned with the way that an individual program is decomposed into components.  Architecture in the large is generally concerned with the architecture of complex enterprise systems that include other systems & program components. These enterprise systems are distributed over different computers, which may be managed by different companies. What are the main types of enterprise systems? knowledge management systems(KMS). Enterprise resource planning systems(ERPS). Customer relationship management systems(CRMS). Supply chain management systems (SCMS). Three advantages of designing and documenting software architecture:  Stakeholder communication: Architecture may be used as a focus of discussion by system stakeholders.  System analysis: Well-documented architecture enables the analysis of whether the system can meet its non-functional requirements. Question  Large-scale reuse: The architecture may be reusable across a range of systems or entire lines of products. Generally, the Software architecture is most often represented using(by?) simple informal block diagrams showing entities & relationships. In general, how should software architecture be represented? and Why? Pros: simple, useful for communication with stakeholders & for project planning. Cons: lack of semantics, types of relationships between entities, and visible properties of entities in the architecture. (1–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Uses of architectural models: Why? 1. As a way of facilitating discussion about the system design A high-level architectural view of a system is useful for communication with system stakeholders & project planning (Why?) because it is not crowded with details. Stakeholders can then discuss the system as a whole without being confused by details. (Why?) A high-level architectural view of a system is useful for communication with system stakeholders & project planning? 2. As a way of documenting an architecture that has been designed The aim here is to produce a complete system model that shows the different components, their interfaces & their connections in a system. (Why?) A high-level architectural view of a system is useful for documenting an architecture that has been designed Architectural design decisions: Architectural design is a creative process, so the process differs depending on the type of system being developed. However, a number of common decisions span all design processes and these decisions affect the non-functional characteristics of the system: (Q what are the Architectural design decisions?)  Is there a generic application architecture that can be used?  How will the system be distributed?  What architectural styles are suitable?  What approach will be used to structure the system?  How will the system be decomposed into modules?  What control strategy should be used?  How will the architectural design be evaluated?  How will the architectural design be documented? Discuss : The criteria used to assess the quality of an architectural design should be based on ----------------. A-accessibility. B-control. C-data. D-b&C Which of the following is not included in Architectural design decisions? a) type of application. b) distribution of the system. c) architectural styles. d) testing the system (2–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 The architectural style should depend on the non-functional system requirements: (Q: What are the non-functional system requirements ?)  Performance: minimize the number of dependencies.  Security: use a layered architecture with critical assets in the inner layers.  Safety: determine safety-critical features in a small number of sub-systems.  Availability: include mechanisms for fault tolerance.  Maintainability: use of replaceable components. mentioned in (SRS lecture). Architectural views: Each architectural model only shows one view or perspective of the system. It might show how a system is decomposed into modules, how the run-time processes interact, and the different ways in which system components are distributed across a network. Generally, you usually need to present multiple views of the software architecture. 4+1 view model of software architecture:  A logical view, It focuses on the H-level components, their interactions, and their relationships. The logical view helps architects understand how different components work together to achieve the desired functionality. Dr. Muyassar Dalli  A process view, It captures the dynamic aspects of the system Such as concurrency, performance. It helps in understanding the system’s behavior at runtime, that can handle high loads, unsure optimal performance, and meet N-functional requirements.  A development view, It addresses the software development process. It includes code, version control, development methodologies, and development environments. This helps to ensure that the software is developed efficiently. It's also known as the implementation view.  A physical view, It focuses on the system's infrastructure. It includes servers, networks, and hardware. It helps architects understand how the system is developed in different environments. Fig. Shows the 4+1 architectural view model (3–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Architectural patterns ? Patterns are a means of representing, sharing & reusing knowledge. An architectural pattern is a stylized description of a good design practice, which has been tried and tested in different environments. Patterns should include information about: when they are useful & when they are not useful. Patterns may be represented using tabular and graphical descriptions. (Q: How represents ? What include?) MVC Architecture Pattern: (Model-View-Controller MVC?) Model–view–controller (MVC) is a software design pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements (Model–view–controller). It is used for desktop graphical user interfaces (GUIs), this pattern became popular for designing web applications. MVC Architecture Pattern Serves as a basis of interaction management in many web- based systems. De-couples three major interconnected components: 1- The model is the central component of the pattern that directly manages the data, logic & rules of the application. It is the application's dynamic data structure, independent of the user interface. 2- A view can be any output representation of information, such as a chart or a diagram. Multiple views of the same information are possible. 3- The controller accepts input & converts it to commands for the model or view. Fig. : Shows Model-View-Controller Q: Draw? (4–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Pattern Model-View-Controller (MVC) name The system is structured into three logical components that interact with each other. The Model component manages the system data & associated Description operations on that data. The View component defines & manages how the data is presented to the user. The Controller component manages user interaction (e.g., key presses, mouse clicks, etc.) & passes these interactions to the View and the Model. Different users have different needs for how they want to view the Problem program or information. The system needs to reflect data changes to all users in description the way that they want to view them, while making it easy to make changes to the user interface. The solution involves separating‫ يتطلب فصل‬the data & the display Solution details using three components: Model (a problem-domain component with data description & operations, independent of the user interface), View (a data display component), and Controller (a component that receives & acts on user input). Advantages: Con- - views & controllers can be easily be added, removed, or changed; / X sequences - views can be added or changed during execution; - user interface components can be changed, even at runtime. Disadvantages: - views & controller are often hard to separate; - frequent updates slow data display & degrade user interface performance; - the MVC style makes user interface components (views, controllers) highly dependent on model components. What are the user interface components? ‫او على ماذا تعتمد ؟ مهم‬ Layered architecture (Q: what utility?) ‫ما الفائذة من عمل الطبقاث؟‬  Used to model the interfacing of sub-systems.  Organizes the system into a set of layers (or abstract machines) each layer provides a set of services.  Supports the incremental development of sub-systems in different layers. When a layer interface changes, only the adjacent layer is affected. /X (5–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Fig. : Shows Layered architecture Q: Draw? Name Layered architecture Organizes the system into layers with related functionality associated Description 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; when the development is spread (diffuse) across several teams with each team ‫لمارا نلجأ الستخذام معماريت‬ ‫الطبقاث‬ responsibility for a layer of functionality; when 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 there is a multiple levels of interpretation of a service ‫باالداء ؟‬ request, as it is processed at each layer. 2 questions here Distributed System A distributed system, also known as distributed computing, is a system with multiple components located on different machines that communicate and coordinate actions in order to appear as a single coherent system to the end-user. A distributed system allows resource sharing, including software by systems connected to the network. Examples : WWW, email. Telecommunication networks: Telephone networks. The client-server model is usually based on a simple request/reply protocol, implemented with send/receive primitives. The servers do? the work & return a result (e.g. the data requested) or an error code if the work could not be performed. (6–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Client-server architecture (example)( Distributed System) Client–Server model is a distributed system structure that divides tasks between the providers of a resource, (called Servers), and service requesters, (called Clients). Clients are connected to the Server over the internet using a computer network. Basic Components of client-server architecture are:  Set of stand-alone servers, which provide specific services such as printing, data management, etc.  Workstations are also called client computers, which call on these services.  Networking devices, which allow clients to access servers. Fig. : Shows Client-server architecture Name Client-server In a client-server architecture, the functionality of the system is organized Description into services, with 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 in a shared database has to be accessed from various locations. My also be used when the load on a system is variable. Principal The principal advantage of this model is: General functionality can be Advantages available to all clients and does not need to be implemented by all services. (e.g., printing service). (1) Every service is susceptible to failure. (2) Performance may be Disadvantages unpredictable because it depends on the network as well as the system. (3) May be management problems if servers are owned by different organizations. (7–8) Ninevah University, IT College, SWE Dept., 2nd Year, 2nd Semester, 2024-2025 Lec No. 7 & 8 & 9 Application architectures Application systems are designed to meet an organizational need(why). As businesses have much in common, their application systems also tend to have a common architecture that reflects the application requirements. A generic application architecture is an architecture for a type of software system that may be configured and adapted to create a system that meets specific requirements. application architectures can be used as a: 1. Starting point for architectural design. 2. Design checklist. 3. Way of organizing the work of the development team. 4. Means of assessing components for reuse. 5. Vocabulary for talking about application types. Examples of application types: 1. Data processing applications Data driven applications that process data in batches without explicit user intervention during the processing. 2. Transaction processing applications Data-centric applications that process user requests and update information in a system database. 3. Event processing systems Applications where system actions depend on interpreting events from the system's environment. 4. Language processing systems Applications where the users' intentions are specified in a formal language that is processed and interpreted by the system. (8–8)