IN4MATX 43 Week 4 Notes PDF

Summary

This document is a set of lecture notes for an IN4MATX 43 class, or a similar course, focused on software architecture. The document explores fundamental concepts and architectural styles used in software design. Topics discussed include functional specifications, architectural styles, and different design approaches. The document is suitable for undergraduate students studying computer science or related fields.

Full Transcript

10/17/2024 - thursday Lecture 5 parts 1- 4 Software Architecture vs. building Architecture software serves a broader range of purposes software is more malleable software is a machine software is invisible software architect: usually most senior developer architecture in software: th...

10/17/2024 - thursday Lecture 5 parts 1- 4 Software Architecture vs. building Architecture software serves a broader range of purposes software is more malleable software is a machine software is invisible software architect: usually most senior developer architecture in software: the blueprint for a software systems construction and evolution Intellectual control conceptual integrity effective project communication reusability maintainability Functional specification: emails: send and receive message get your own messages(addressing scheme) store messages electronic block spam WWW(the web): a collection of resources each of which has a unique name(URL) there is no single piece of code that implements the architecture REST reference architecture - WWW architecture URL: used to determine the identify of a machine on the internet form which the resource may be obtained Clients(user agents/web browsers): make requests of servers for their resources clients manipulate representations of resources all communication between user agents and origin servers must be performed by a simple generic protocol(http) all communication must be fully self-contained Software Architecture elements: components connectors which are arranged into configurations Prescriptive architecture : as designed/ as intended architecture Descriptive architecture: as implemented/ as realized architecture Architectural erosion: when a system evolves, ideally its prescriptive architecture is modified first. Descriptive architecture is often directly modified. Software Architecture discussion notes - 10/21/2024 The architect: guides technical direction ○ defines the system’s structure, ensures alignment of goals, creates a clear roadmap for engineers to follow broad knowledge and domain expertise ○ combines cross-disciplinary knowledge with knowledge of software patterns facilitates communication ○ bridges engineering teams and stakeholders, ensues requirements are clear high-level decision making ○ architectural choices, ensures long term system integrity and adaptability connects with stakeholders ○ gathers business requirements, ensures architecture supports product and user goals. Software architecture: set of principal design decisions about the systems. The blueprint for system’s construction and evolution Architectural Styles: collection of architectural design decisions that apply in given context, constrain architectural design decisions, and result in beneficial qualities in each resulting system. Object-Oriented : organizes code into reusable objects with attributes and behaviors. Model-View-Controller(MVC): separates data(model), user interface(view), and control logic( controller) client-server: divides functionality between client that requests services and server that provides them. (only two steps) layered: organizes software into hierarchical layers(presentation, business, data) peer-to-peer(P2P): distributions tasks and services among multiple peers without central coordination. ** A system will often use multiple styles Client Server architecture: the most common distributed system architecture. clients make requests of servers centralized: data, security, access client sends request → internet → server Example: online games peer-to-peer: players are connected to each other directly(good for 1v1 fighting games) client-server: players are connected to server(complicated, interactivity between game world and player) 10/22/2024 Tuesday : Lecture 6 - p1-p4 memorize for quiz: 1. software architecture: a software system’s architecture is the set of principal design decisions about the system. - Structure - behavior - interaction - non-functional properties 2. client - server: instance of layered architecture ( two - layers). 3. MVC: three layers Software architecture: the blueprint for a software system’s construction and evolution Architectural erosion: when a system evolves, ideally its prescriptive architecture is modified first. The system is often directly modified. Because: developer sloppiness short deadlines lack of documented prescriptive architecture code optimizations inadequate techniques or tool support Architectural Styles: 7 main ones Architectural styles: a named collection of architectural design decisions that are applicable in a given development context constrain architectural design decisions result in beneficial qualities in each resulting system other definition: A named commonly used set of components/connectors/configurations 1. object-oriented: decompose, break down system into objects Key benefits of Object Oriented: more productive more stable for decomposition example: Goals of Uber: ride-sharing app with navigation understandability, simplicity 2. Model - View - Controller(MVC): separation of concerns. Three layer architecture. model: all objects that hold access to data. Not allowed to interact with user view: only part allowed to interact with the outside world, User Interface. controller: Knows all important information. Knows the rules: tell each model and view what to do. key benefits of MVC: example: Goals of ATM: withdrawals, deposits, transfers, balance checks separation of concerns ○ want to experiment with different UIs ○ isolate business rules (due to frequent changes) 3. Client - Server: two layered architecture client: any instance of browser or app you run server: any server that runs somewhere in cloud Cloud computing changed client-server. most modern client-server applications run on servers in the cloud software developers no longer manage physical servers managed by a third party Cloud computing: started by amazon web services(AWS) benefits: scalability more computing power cost-effective can use lots of redundancy so if one servers failures, there are backups drawbacks: security/privacy may not be cost/effective example: video game goals: multi-player, online control access to data and players 4. Layered: there can be as many layers as needed. Interaction is between interactive layers but usually not allowed to go across layers. key benefits: example: goals of restaurant: prepare and serve food to customers enforce specific protocol of interaction ○ no irrelevant details ○ minimize effects of changes separate concerns: keep each part focused on a specific task layers: customer ↔ server ↔ chef ↔ garden/food source 5. peer - to - peer: direct. benefits: clear fast easy to understand example: skype goals: online (multi-person) video chat and voice calls share same functionality between multiple people without slowing down video/audio streaming 6. Pipe and filter: sequential benefits: improve performance scalability reusability example: compiler goals: translate high-level programming languages into a low-level one that computer can execute separate different steps of translation so i can add/edit/remove/replace steps easily 7. publish and subscribe: a big publisher(one entity usually but multiple are allowed) like stock market, news, and the client side(trader) who subscribes Component is not same as connector connector has substance example: stock market ticker goals: filter through enormous amounts of info(stock prices) and only broadcast info that a subscriber is interested in. From Dec 2007 → Dec 2015 > 1000x growth in monthly streaming hours Evolution: all successful software evolves essential part of software development must be accommodate/planned as much as possible Architecture is a key tool in accommodating evolution Architectural styles are good at evolution, adapting to change because the styles are discovered, not invented. They have been used so many times because it works. Trend : switch from monolithic to microservices. microservices: broken into layers, into services. Recurring fundamental principles: direct connection to architecture Rigor and formality separation of concerns(MVC) ○ modularity ○ divide and conquer ○ abstraction anticipation of change (all styles) generality incrementality

Use Quizgecko on...
Browser
Browser