Lecture 1: Architecture UML Principles Flashcards
Name an architectural design pattern.
layering
What is layering and what is it’s purpose?
Layering is separation of concerns so that each concern can be handled independently without affecting another
What are the different layers of layering?
UI, Service/Business Logic, Database Access, Database
What makes up the presentation layer in the multi-layer architecture used in CSE 136?
Two things: 1. The User Interface (which can contain ASP.NET MVC, Win Forms, WPF, and mobile) 2. The Presentation logic
What makes up the business layer of the multi-layer architecture used in CSE 136?
Four things: 1. Application Logic/Service Layer (WCF -> windows communication foundation and DTO Adapters) 2. Services 3. Workflows 4. Object/Domain Model (Design patterns)
What makes up the data access layer of the multi-layer architecture used in CSE 136?
The persistence layer (O/RM, custom data context, ADO.NET)
What makes up the database of the multi-layer architecture use in CSE 136?
The SQL server
How is data transferred between the presentation layer and the business layer?
A Data Transfer Object (DTO) in the form of xml or binary data communicates from the Presentation Layer’s Presentation Logic to the Business Layer’s Application Logic
How is data transferred between the business layer to the data access layer?
A DTO in the form of Object Relational Mapping communications from the Business Layer’s Application Logic to the Data Access Layer’s Persistence layer.
What are forms of Object Relational Mapping in the Data Access Layer and what does CSE 136 use?
- Unit of work - many updates to db in one atomic action 2. Repository - mock the database in memory 3. Data Mapper - map C# classes to database tables 4. Query Object - object-oriented query (entity framework which removes the need to learn SQL programming) 5. Lazy Loading - on-demand loading the detail data 6. CSE 136 uses ADO.NET and Entity Framework
What are some business/service layer patterns?
- Domain Model (object oriented) - inheritance, entities and relationships - POCO -> plain old class objects 2. Business Logic - Validation - Rules
What are some Web Presentation Patterns and what are the patterns covered in CSE 136?
Covered in CSE 136: - Model-View-Controller - Model-View View-Model (JavaScript/AJAX) Not covered: - Model-View-Presenter (ASP.NET webforms) - Front Controller - Page Controller
What is the Dependency Inversion Principle?
Two parts: A. High-level modules should not depend on low-level modules. Both should depend on abstractions. B. Abstractions should not depend on details. Details should depend on abstractions.
What is the Dependency Inversion Principle used for?
to integrate the layers together
Name two examples of use for the Dependency Inversion Principle.
- Ajax calls to service interface so we can return hard-coded value while developing business logic 2. Business layer calls repository interface so we can mock the database when unit testing business logic
What is UML?
The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language that is intended to provide a standard way to visualize the design of a system.
What are the 5 different UML diagram types used in CSE 136?
- Domain Model 2. Usage Diagram 3. Robust Diagram 4. Sequence Diagram 5. Class Diagram - Communicate with developers of your design
What are the uses for Domain Model Diagrams?
- Define high level entities and relationships - relationships can be is-a or has-a 2. Business terminologies
Draw a domain model diagram.
see slide 20.
Explain the example of domain model diagram on slide 20
○ Student has a student account ○ Staff has access to student account -> sees modification to address ○ Department chair has chair account and has access to courses ○ Pre requisite has access to course ○ Student has enrollment ○ Enrollment has a schedule ○ Instructor has account ○ Schedule has an instructor account ○ Cape belongs to schedule and student
What are the uses for Use Case Diagrams?
- identify what user is trying to do on the system (show users and system interaction)
Draw a Use Case Diagram
see slide 21.
What are the uses for a Use Case Package?
same as use case diagrams: - to identify what user is trying to do on the system - use it when circles get to pick on use case diagrams
Draw a Use Case Package
see slide 22.
What are the uses for a Robust Diagram?
- to show the “flow” or “process” of the system between entities - to show how the user interacts with the system
In Robust Diagrams, what are nouns and verbs? How can they be combined?
- Noun: user, page, data Verb: action 2. The pattern is noun verb* noun BUT must have at least one verb between nouns. CAN have more than one verb
Draw an example of a robust diagram for login activity
See slide 23.
Draw an example of a robust diagram for course planning
see slide 22
Explain the example of a Robust Diagram on slide 23.
○ User had to log in
○ Log in page
○ Somebody has to generate the page for user to see the page
○ Now user to see the page
○ User enter password
○ If it fails, go back to login
○ Success render homepage
○ User sees homepage ○ Always noun verb noun
Explain the example of a Robust Diagram on slide 24.
- Department chair wants to plan for next year
- Course page renders actual page
- Wants to create a course
- Gets list of current courses
- Drag and drop into quarters
- Add a course by dragging and drop into fall
- Writes into database
- When its done, it updates
- Drag and drop the other way, it’ll delete from course plan
- Then it’ll update the UI
What is the purpose of Sequence Diagrams?
to Identify class models - class objects - class methods
What do Sequence Diagrams show?
- show the detailed “flow” or “process” between layers - are the most detailed of the diagrams