M12 MVC Architectural Design Pattern & Java Generic

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

flashcard set

Earn XP

Description and Tags

Flashcards covering the MVC architectural pattern, its benefits, components, and examples, along with Java generics and type parameters.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

MVC Architectural Pattern

A relatively old pattern introduced in the Smalltalk programming language that divides the application into three subsystems: model, view, and controller.

2
New cards

Model

Passive object which stores the data.

3
New cards

View

Renders model into specified format.

4
New cards

Controller

Captures user input and when necessary, issues method calls on the model to modify the stored data.

5
New cards

MVC Architectural Pattern Event Handling

User-generated events may cause a controller to change the model, or view, or both.

6
New cards

Cohesive modules (MVC Benefit)

Instead of putting unrelated code (display and data) in the same module, we separate the functionality so that each module is cohesive.

7
New cards

Flexibility (MVC Benefit)

The model is unaware of the exact nature of the view or controller it is working with. It is simply an observable. This adds flexibility.

8
New cards

Low coupling (MVC Benefit)

Modularity of the design improves the chances that components can be swapped in and out as the user or programmer desires. This also promotes parallel development, easier debugging, and maintenance.

9
New cards

Adaptable modules (MVC Benefit)

Components can be changed with less interference to the rest of the system.

10
New cards

Distributed systems (MVC Benefit)

Since the modules are separated, it is possible that the three subsystems are geographically separated.

11
New cards

Traffic Signal - MVC Component

Detects cars/pedestrians, regulates traffic, uses a timer, and allows manual override.

12
New cards

Java Generic (Before JDK 1.5)

LinkedList collection adds in Integer object and a Double object and valid type casting is required.

13
New cards

Java Generic (JDK 1.5)

Allows programmers to abstract over types, so a collection of objects can be restricted to contain a particular data type. Casting is not necessary because the type has been set to be a specific type.

14
New cards

Java Generic Benefits

Provides one single method to process any class types without a need of overloading or polymorphism.

15
New cards

Type parameter

A placeholder for a specific type, often indicated by a capital letter (E, K, V, T, S).

16
New cards

SquareInt

Integer Square

17
New cards

SquareFloat

Float Square

18
New cards

GenricMethod

genericDisplay

19
New cards

GenricMethod

Output