Class announcements

Notes

Assignment 1 is out. Due Oct 14 (during reading week)

  • can the user put their hand in when it is dispensing hot coffee? (get burnt)
  • can the user access their cup at all while it is dispensing hot coffee? (no..?)
  • visual paradigm likely has a template very close to a vending machine

Note

Midterm will be be on Oct 22

Architectural design

Note

Starting from week 4 slide 16

Architectural views

In many cases, patterns are used to simplify & standardize the development.

  • accepted (approved in industry, “pretty much bulletproof”)
  • work in many situations
    • can be ported to new developments easily
  • in most cases, patterns form a hybrid (2 or more are combined to form solution)

Architectural patterns

Model view controller (MVC) pattern

  • Model: encapsulation of application state, notifies view of state changes
  • View: renders model, requests model updates, sends user events to controller
  • Controller: maps user actions to model updates, selects view
  • 99.9% of systems use this pattern
  • each component can run independently of the others
graph LR
   Interactions
  C -- View selection --> V
  V -- User events --> C
  C -- State change --> M
  V -- State query --> M
  M -- Change notification --> V

Web application architecture using MVC pattern

graph TD
   Browser interactions
  B --> C
  V --> B

   Controller ↔ Model
  C -- Update request --> M

  %% View ↔ Model
  V -- Refresh request --> M
  M -- Change notification --> V

Layered pattern/architecture

  • used to model the interfacing of sub systems
  • set of layers (abstract machines), each of which provide a set of services (promotes independence)
  • when a layer interface changes, only the adjacent layer is affected
  • each layer relies on the previous layer for the input, output is sent via an API to the next layer
  • some of the functionality can be implemented and left unused for future expansion of the system
  • drawbacks is inefficiency
    • because of layer to layer communications, data and control must pass through those regardless if processing is needed or not
  • e.g. TCP IP addresses, Java JRE, operating systems

Repository architecture

  • pool of info, videos, sound, text (central database)
    • used by clients
    • e.g. brightspace, IDE, google drive
graph TD
    Project["Project repository"]

    Translator["Design translator"]
    UML["UML editors"]
    Generator["Code generators"]
    Java["Java editor"]
    Python["Python editor"]
    Analyzer["Design analyzer"]
    Reporter["Report generator"]

    Translator <--> Project
    UML <--> Project
    Generator <--> Project
    Analyzer <--> Project
    Reporter <--> Project
    Project --> Java
    Project --> Python
    

Note

Ended slide 32 (week 4 slides)