Modeling/DesignPattern
-
FluxModeling/DesignPattern 2020. 4. 11. 08:47
1. Overview Flux is a new application architecture from Facebook that promises the same as MVC, but with a different approach that focuses on unidirectional data flow. 2. MVC In MVC design good as separation of each layer, as view, model, controller, Though many of them has modified the actual principal, some came up with MVVM and MV* kind of architectures, but the focus was on MVC and that’s wh..
-
Model View Presenter (MVP)Modeling/DesignPattern 2020. 4. 10. 23:57
1. Overview 2. Description 2.1 Model In an application with good layered architecture, this model would only be the gateway to the domain layer or business logic. See it as the provider of the data we want to display in the view. Model’s responsibilities include using APIs, caching data, managing databases and so on. 2.2 View The View, usually implemented by an Activity, will contain a reference..
-
MediatorModeling/DesignPattern 2020. 3. 1. 19:07
1. Overview Mediator encapsulates how a set of objects interact with each other. Due to this encapsulation, there is a loose coupling between the interacting objects. Typically an object explicitly knows about other objects to which it wants to interact i.e. to call a method. In mediator pattern this interaction is within the mediator object and interacting objects only know about the mediator o..
-
MementoModeling/DesignPattern 2020. 3. 1. 19:07
1. Overview When we want to store an object's state without exposing internal details about the state then we can use memento design pattern. The main intent behind saving state is often because we want to restore the object to a saved state Using memento we can ask an object to give its state as a single, sealed object and store it for later use. This object should not expose the state for modi..
-
CompositeModeling/DesignPattern 2020. 2. 29. 19:09
1. Overview Composite pattern is a partitioning design pattern. The composite pattern describes a group of objects that are treated the same way as a single instance of the same type of object. We have a part-whole relationship or hierarchy of objects and we want to be able to treat all objects in this hierarchy uniformly. This is not a simple composition concept from object-oriented programming..
-
Chain of responsibilityModeling/DesignPattern 2020. 2. 29. 19:06
1. Overview We need to avoid coupling the code which sends a request to the code which handles that request. Typically the code which wants some request handled calls the exact method on an exact object to processing it, thus the tight coupling. Chain of responsibility solves this problem by giving more than one object, chance to process the request. We create objects which are chained together ..
-
VisitorModeling/DesignPattern 2020. 2. 29. 19:02
1. Overview Visitor pattern allows us to define new operations that can be performed on an object without changing the class definition of the object Think of this pattern as an object visitor that visits all nodes in an object structure. Each time our visitor visits a particular object from the object structure, that object calls a specific method on a visitor, passing itself as an argument. Ea..
-
IteratorModeling/DesignPattern 2020. 2. 29. 19:01
1. Overview Iterator allows a way to access elements/children of an aggregate object in sequence while hiding the actual internal data structure used. In Java language, iterators are an integral part of collection frameworks and they are implementations of this design pattern. Iterators are stateful, meaning an iterator object remembers its position while iterating Iterators can become out of sy..