CSC207 Midterm 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

28 Terms

1
New cards

View

Framework and drivers

Displays audio-visual information such as buttons, graphics, and sound effects. The user interacts directly with the View.


Dependencies

  • ViewModel: View reads display data from ViewModel. View rerenders alongside ViewModel updates

  • Controller: user interaction with View causes Controller to react, Controller decides what View does with user input


2
New cards

View Model

Interface Adapters

Information that View will display.

3
New cards

Presenter

Interface Adapters

Receives information (from the Use Case Interactor using the Output Data Object) and puts readable strings and values into the ViewModel to be displayed in the View.

Dependencies

  • Output Data: needs to receive Output Data object created by User Case Interactor

  • ViewModel: updates ViewModel with what to be displayed

Implementations

  • Output Boundary: Presenter fills formatting logic defined by Output Boundary


4
New cards

Controller

Interface Adapters

Converts raw user input into usable pieces of data in the format described by the Input Data, then invokes the Use Case Interactor to actually carry out the user request.

Dependencies:

  • Input Data: creates and populates an input data obj. to pass to Use Case Interactor

  • Input Boundary: Controller calls its methods to trigger use case logic


5
New cards

Input Data

Application Business Rules

Object created by Controller passed to Use Case Interactor. Is in most optimal format for the interator.

6
New cards

Input Boundary

Applications Business Rules

Interface implemented by a Use Case Interactor that provides decoupled way for Contorller to execute business logic (dependency inversion principle)

7
New cards

Use Case Interactor

Application Business Rules

Contains main logic for executing a specific use case.

Dependencies:

  • Input Data: uses input data to execute use case

  • Output Boundary: calls methods in this class to push results to Presenter

  • Output Data: packages result of use case into an Output Data object

  • Data Access Interface: use to look up/store information in the database

  • Entities: operates on entities to carry out business logic

Implementations:

  • Input Boundary: executes what controller called into


8
New cards

Output Data

Application Business Rules

Object created by the Use Case Interactor to pass results of the use case to the Presenter.

9
New cards

Output Boundary

Application Business Rules

Interface implemented by a Presenter class. Gives Use Case Interactor a way to send results outwards.

10
New cards

Data Access Interface

Application Business Rules

Interface implemented by the Data Access class. Gives Use Case Interactor decoupled way to read/write data (dependency inversion principle).

11
New cards

Data Access

Frameworks and Drivers

Reads and writes persistent data to a file/database outside the program.

Dependencies:

  • Database: talks directly to underlying data

  • Entities

Implements:

  • Data Access Interface: provides data to and saves info from Use Case layer


12
New cards

Database

Frameworks and Drivers

Data store. External detail every inner layer is unaware of.

13
New cards

Entities

Enterprise Business Rules

Class storing information about program’s building blocks.

14
New cards

S in SOLID

Single Responsibility Principle

A class should only have one reason to change

  • Separate things that change for different reasons

  • Actors cause change

High cohesion (deg. to which elements in module belong tgthr), low coupling (deg. of interdependence among modules)

15
New cards

O in SOLID

Open/Closed Principle

A class should be open for extension but closed for modification

Often done using interfaces or inheritances to keep functionality stable

16
New cards

L in SOLID

Liskov Substitution Principle

Subclasses should be substitutable for their base classes

Well documented interfaces to be clear about expected behaviour

17
New cards

I in SOLID

Interface Segregation Principle

Interfaces should not force classes to implement unnecessary methods

18
New cards

D in SOLID

Dependency Inversion Principle

High lvl. modules should not depend on low lvl. modules (high coupling); both instead depend on abstractions (via interfaces)

High lvl. → core level goals of program

Low lvl. → details of implementation (volatile, ext. influences)

Modules → class/set of closely related classes

19
New cards

Frameworks and Drivers

Lowest lvl:

View

Data Access

Database

20
New cards

Interface Adapters

Controller

Presenter

View Model

21
New cards

Application Business Rules

AKA Use Case layer

Use Case Interactor

Input Data

Input Boundary

Output Data

Output Boundary

Data Access Interface

22
New cards

Enterprise Business Rules

AKA Enterprise Business Rules

highest-level policies

Entity

23
New cards

User story

Describes feature from POV of user

As a … I want to … so I can …

24
New cards

Use case

How an actor and system interact to accomplish a goal


Name, primary actor, preconditions, trigger, success outcome, main success scenario, extensions

25
New cards

Event driven programming

Programs react to events (user actions)

Event occur → trigger event listener method → method receives event object containing details abt. interaction → listener calls other methods to handle event → chain of method calls across objects forms network of objects

at runtime: call stacks create method calls

26
New cards

Model View Controller

  • The user interacts with the View, which creates an event

  • The Java system calls a listener method in a View object

  • The View immediately calls a method in the Controller to handle the event

  • The Controller manipulates the Model

  • The Model fetches any necessary data from the database

  • The Model calls a method in a View object to let it know that there's been an update

  • The Controller decides which screen to display

  • The View calls getter methods on the Model and updates the UI


<ul><li><p>The user interacts with the View, which creates an event</p></li><li><p>The Java system calls a listener method in a View object</p></li><li><p>The View immediately calls a method in the Controller to handle the event</p></li><li><p>The Controller manipulates the Model</p></li><li><p>The Model fetches any necessary data from the database</p></li><li><p>The Model calls a method in a View object to let it know that there's been an update</p></li><li><p>The Controller decides which screen to display</p></li><li><p>The View calls getter methods on the Model and updates the UI</p></li></ul><p></p>
27
New cards

Model View Presenter

  • The user interacts with the View, which creates an event

  • The Java system calls a listener method in a View object

  • The View immediately calls a method in the Presenter to handle the event

  • The Presenter manipulates the Model

  • The Model fetches any necessary data from the database

  • The Model calls a method in a Presenter object to let it know that there's been an update

  • The Presenter calls methods in the View to update the user interface


<ul><li><p>The user interacts with the View, which creates an event</p></li><li><p>The Java system calls a listener method in a View object</p></li><li><p>The View immediately calls a method in the Presenter to handle the event</p></li><li><p>The Presenter manipulates the Model</p></li><li><p>The Model fetches any necessary data from the database</p></li><li><p>The Model calls a method in a Presenter object to let it know that there's been an update</p></li><li><p>The Presenter calls methods in the View to update the user interface</p></li></ul><p></p>
28
New cards

Design Process

Noun Verb Analysis (UML Class Diagram)

Scenario Walkthroughs

User stories

Use cases

UML Sequence Diagrams