Modeling
-
StrategyModeling/DesignPattern 2020. 2. 26. 00:42
1. Overview Strategy pattern allows us to encapsulate an algorithm in a class. So we can configure our context or main object with an object of this class, to change the algorithm used to perform given operation. This is helpful if you have many possible variations of an algorithm. A good indication for the applicability of strategy pattern is if we find different algorithms/behaviors in our met..
-
PrototypeModeling/DesignPattern 2020. 2. 26. 00:41
1. Overview We have a complex object that is costly to create. To create more instances of such class, we use an existing instance as our prototype. Prototype will allow us to make copies of the existing objects and save us from having to recreate objects from scratch. 2. Description 2.1 Implementation Prototype class must implement Cloneable interface Prototype Class should override the clone m..
-
FacadeModeling/DesignPattern 2020. 2. 24. 22:03
1. Overview Facade is an object that serves as a front-facing interface masking more complex underlying or structural code. A facade can: Improve the readability and usability of a software library by masking interaction with more complex components behind a single (and often simplified) API Provide a context-specific interface to more generic functionality (complete with context-specific input ..
-
ObserverModeling/DesignPattern 2020. 2. 24. 22:01
1. Overview Observer pattern is used when there is a one-to-many relationship between objects such as if one object is modified, its dependent objects are to be notified automatically. Observer pattern falls under the behavioral pattern category. We are defining one-to-many dependency between objects, where many objects are listening for the state change of a single object, without tightly coupl..
-
BuilderModeling/DesignPattern 2020. 2. 24. 22:00
1. Overview The intent of the Builder design pattern is to separate the construction of a complex object from its representation. We have a complex process to construct an object involving multiple steps, then the builder design pattern can help us. In builder, we remove the logic related to object construction from client code and abstract it in separate classes. 2. Description 2.1 Motivation 2..
-
SingletonModeling/DesignPattern 2020. 2. 24. 14:05
1. Overview The singleton pattern is one of the simplest design patterns. Sometimes we need to have only one instance of our class, for example, a single DB connection shared by multiple objects as creating a separate DB connection for every object may be costly. Similarly, there can be a single configuration manager or error manager in an application that handles all problems instead of creatin..
-
Database ScalingModeling/TheoremParadigm 2020. 2. 23. 20:50
1. Methods of Scaling 1.1 Vertical Scaling (Scale-up) In Vertical Scaling, we increase the CPU, RAM, and Storage or buy a more robust server in order to support more traffic and load on our database server. 1.2 Horizontal Scaling (Scale-out) In Horizontal Scaling we add more systems with the smaller configuration in terms of CPU, RAM and Storage to distribute the traffic or load across these sys..
-
Model–view–controller (MVC)Modeling/DesignPattern 2020. 2. 23. 19:26
1. Overview Model–view–controller (usually known as MVC) is a software design pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of information from the ways information is presented to and accepted by the user. This kind of pattern is used for designing the layout of the..