Week 6 Flashcards
(14 cards)
What is system decomposition
It is the process of breaking down complex systems into smaller and more manageable components
- How do we break the system up into parts?
- What functionality/behavior to include?
- Do we have all the necessary parts?
- How do the parts interact?
3 key principles in system decomposition
- Modularity (divide and conquer)
- Abstraction (reusing solutions)
- Encapsulation (decoupling unrelated parts)
What is software architecture
Set of high level decisions that determine the structure of a software solution
( made early and difficult to change later as they affect large parts of the system)
How to know if something is an architectural decision
if in its scope, it has high impact and hight priority areas.
double story vs room paint colour
What are cross cutting concerns
there are the non functional requirements of a system
security, performance etc
Architecture vs Design
Architecture focuses on the system decomposition and the non functional requirements
Design is implementing the functional requirements
e commerce - orders, cart, logging in vs nw actually figuring our how orders needs to be structured.
then you code the design
you need big info to describe the architecture
- Each component must be identified, and its interface
described. Interfaces must be: - Fully documented
- Semantics, not just syntax
- Understandable
- Unambiguous
- Precise
What is an architectural view
Blueprint for the system
different blueprints for different views - different interest
plumbing vs building vs electrical for a pozi
what are the views in 4+1 model
Logical
Development
Process
Physical
Scenario
What is the scenario view about
diagrams - use case diagram
Purpose is that it describes the architecture through key use cases
( interactions between actors and the system)
helps demonstrate how the other 4 views work together to satisfy functional requirements
E-commerce Example:
Actors:
-Customer
-Administrator
-WarehouseStaff
-PaymentGateway (external system)
Use Cases:
For Customer: Browse Products, Search for Product, View Product Details, Add to Shopping Cart, Place Order, View Order History, Manage Account.
For Administrator: Manage Products, Manage User Accounts, View Sales Reports.
What is first order LOGICAL view
purpose:
- focuses on the functionality the system provides to end users
- shows how the system is decomposed into the key objects or system entities
( for designers and devs)
Diagrams:
Class diagram - shows classes in the system ( attributes and operations) and the relationship between classes
State diagrams - shows the dynamic behaviour of an object over time, the different states and transitions
E-commerce Example (Logical View):
Class Diagram:
Classes:
- Customer
attributes: customerID, name, email, address;
operations: login(), updateProfile() - Product
attributes: productID, name, description, price, stockLevel;
operations: getProductDetails(), updateStock()
State Diagram (for an Order object):
States: Cart, PendingPayment, PaymentConfirmed, AwaitingShipment, Shipped, Delivered, Cancelled, Returned.
Transitions:
Cart -> PendingPayment (Trigger: checkout())
PendingPayment -> PaymentConfirmed (Trigger: paymentSuccess [Guard: paymentValid])
what is the development view about
Purpose:
focuses on the organisation of software modules, components and subsystems from programmers perspective
(devs to use)
Diagrams: component diagrams
- shows the systems components ( blocks of software)
- Illustrates the interfaces which are what components provide ( the ball) and they they require ( socket)
- shows dependencies between sockets
-ports can be used to group interfaces on a component
E-commerce Example (Development View)
InventoryService (provides IInventoryCheck; requires an interface from a database component)
OrderProcessingService (provides IOrderManagement; requires IProductCatalog, IInventoryCheck, IPaymentGateway)
What is the process view about
purpose:
focuses on the dynamic aspects of the system.
(processes, threads and their interactions)
addresses concurrency, synchronisation, performance, scalability
( for system engineers, testers)
Uses activity and sequence diagrams
activity diagrams - show work of activities like actions ( rectangles), decisions (diamonds) and forks or joins ( bars)
sequence diagrams - shows interactions over time, has lifelines, activation bars, messages, loops etc
E-commerce Example (Process View):
Activity Diagram (for “Customer Checkout” process):
Start -> Customer views cart -> Customer proceeds to checkout -> Enter Shipping Info -> Select Payment Method -> (Decision: Payment Type)
If Credit Card: Enter Card Details -> Validate Payment -> …
If PayPal: Redirect to PayPal -> User Authenticates on PayPal -> …
-> (Join) -> Confirm Order -> Display Order Confirmation -> End.
Could have concurrent activities like Update Inventory and Send Order Confirmation Email after payment is confirmed (using Fork/Join).
Sequence Diagram (for “Placing an Order”):
Lifelines: :CustomerBrowser, :WebServer, :OrderService, :InventoryService, :PaymentService.
Messages:
CustomerBrowser -> :WebServer: submitOrder(orderDetails)
:WebServer -> :OrderService: createOrder(orderDetails)
:OrderService -> :InventoryService: checkStock(productID, quantity)
:InventoryService –> :OrderService: stockAvailabilityResponse
(If stock available) :OrderService -> :PaymentService: processPayment(paymentDetails)
:PaymentService –> :OrderService: paymentStatusResponse
(If payment successful) :OrderService -> :OrderService: saveOrder()
:OrderService –> :WebServer: orderConfirmation
:WebServer –> :CustomerBrowser: displayConfirmationPage()
Physical view
Describes how software is deployed onto hardware infrastructure
addresses issues like system installation, availability
Deployment Diagrams
- Show Nodes (physical hardware like servers, computers, mobile devices,
- Show Artifacts (the physical pieces of software that are deployed, like .exe files, .jar files, web applications, database schemas).
Show how artifacts are deployed onto nodes and the communication paths (e.g., network connections, protocols) between nodes.
E-commerce Example (Physical View)
Node:
Customer’s PC/Mobile Device (Device Node)
Running a :Browser (Execution Environment Node - EEN)
Deploying WebApp.html/js/css (Artifacts)
Connection:
Customer’s PC/Mobile Device connects to WebServerCluster via HTTPS.