O GoConqr está de visual novo! Conte para nós o que você achou.

Notas

Design patterns

Suhas S Inglês 6 páginas

Conteúdo das notas (6)

Página 1

There are 3 types:

Creational - Singleton, Factory, Abstract Factory, Builder, Prototype

Structural - Adapter , composite, Proxy, Flyweight, Facade, Bridge, Decorator

Behavioral - Temp;ate Method, Mediator, Chain of Responsibility, Observer, Strategy, Command, State, Visitor, Interpreter, Iterator, Mememto

Página 2

Singleton: Singleton pattern restricts the instantiation of a class and ensures that only one instance of the class exists in the java virtual machine

The singleton class must provide a global access point to get the instance of the class.

Singleton pattern is used for logging, drivers objects, caching and thread pool.

Singleton design pattern is also used in other design patterns like Abstract Factory, Builder, Prototype, Facade etc.

Página 3

Factory Method

Return one of serveral classes that share a common super class

Página 4

Strategy Pattern:

crate interface with a method, create classes implementing them.

create an object of interface type in a class

subclasses can instantiate interface type by calling classes which implement interface method in their own way.

Check this out

http://www.newthinktank.com/2012/08/strategy-design-pattern-tutorial/

Página 5

Observer pattern:

observer(subsciber) - interface

subject(publisher) - interface

subject will add, delete observer

create class implementing subject with list of observers.

Página 6

Abstract Factory:

Like a factory, but everything is encapsulated.

Informações

Descrição
Notas sobre Design patterns, criado por Suhas S em 30-03-2018.
Criado por
Suhas S
Visualizações
1
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?