What are Software Patterns?
Standard solution to a recurring problem.
These solutions are successful and patch common problems.
This discipline emerged from the Object oriented community
What are the essentials of a software pattern?
What are the classifications of Software patterns
Explain the Factory design pattern
intent, structure, interface
Useful when base class of object is known but the subclass it belongs to is only known at run time when user provides input.
Structure: a superclass specifies all standard and generic behaviour. Delegates creation details to subclasses.
Interface: Client code needs an object of particular class. Calls a method known as factory class that instantiates the object.
Explain the Abstract Factory design pattern
intent, structure, interface
Provide interface for creating families of related or dependent objects without specifying concrete classes.
Structure: Uses a class to collect coordinated factory methods in one place, one class per style. Base class is named abstract factory, each subclass interprets its factory methods to produce objects of a single style.
Interface: client only interacts with abstract classes and never create objects directly.
Explain the Observer pattern
Underlying data is known as the observable and the views are known as the observers.
Define Software Architecture
High level design enabling engineers to understand overall structure of a project.
Define Architectural Patterns
Description of a set of predefined subsystems and their responsibilities.
Rules and guidelines for organizing the relationship among subsystems
Explain the Layered Architectural pattern
Structure applications that can be decomposed to subtasks. Each task an abstraction, each layer a service to the next layer. Each higher service uses a layer directly below.
Benefits of Layered Architectural pattern
Explain the Client-Server Architectural Pattern
Server component provides services to many clients.
Client requests services from server.
Server always listening for requests from client.
Ex: remote DB access, web based apps.
What are some limitations of Client-Server Pattern
- Could require data transformation between data layer and server.
What are the different sessions of a Client-Server setup?
Stateless Server: Session state managed by client.
Stateful Server: Session state maintained by the server, associated with a client id.
Explain the Master-Slave Architectural Pattern
Ex: Process control, Embedded systems
Explain the Broker Architectural Pattern
Think about CORBA and other web services.
Benefits of using Broker Pattern
Explain the Peer-to-Peer Architectural Pattern
Explain the Model-View-Controller Architectural Pattern
Limitations of using patterns