Software design pattern
A general reusable solution to a commonly occurring problem within a given context in software design
Algorithm strategy patterns
High-level strategies describing how to exploit application characteristics on a computing platform
Computational design pattern
Key computation identification
Reader
Used to read from the keyboard or from disk files or other media, or to obtain information over the net
StringTokenizer
To separate a larger string into different token
BufferedReader
2. Provide any other reader with the ability to buffer its input
Java Input
Strategy Pattern
Decorator Pattern
Composite Pattern
Panel
2. A container that contains things that implement the same interfaces
Iterator Pattern
An iterator is used to traverse a container and access the container’s element
Model-View-Controller
Model (Component)
The application’s behavior in terms of the problem domain, independent of the user interface
View (Component)
Any output representation of information, such as a chart or a diagram. Multiple view of the same information are possible, such as a bar chart for management and a tabular view for accountants
Controller (Component)
Accepts input and converts it to commands for the model or view
Model (Interactions)
Stores data that is retrieved according to commands from the controller and displayed in the view
View (Interactions)
Generates new output to the user based on changes in the model
Controller (Interactions)
Send commands to the model to update the model’s state. It can also send commands to its associated view to change the view’s presentation of the model
Simultaneous development
Because MVC decouples the various components of an application, developers are able to work in parallel on different components without impacting and/or blocking one another
Code reuse
By creating components that are independent, developers are able to reuse components quickly and easily in other applications
MVC (Advantage)
MVC (Disadvantage)
Code navigability
Multi-artifact consistency
Pronounced learning curve
Separation of concerns
2. Discourages “cut-&-paste” repetition of code, streamlining upgrade & maintenance tasks