Patrones de Acciones y Comando.pptx

11
PATRONES DE ACCIONES/COMANDOS

Transcript of Patrones de Acciones y Comando.pptx

Page 1: Patrones de Acciones y  Comando.pptx

PATRONES DE ACCIONES/COMANDOS

Page 2: Patrones de Acciones y  Comando.pptx

PATRÓN DE DISEÑO

ES UNA DESCRIPCIÓN DE CLASES Y OBJETOS COMUNICÁNDOSE ENTRE SI ADAPTADA PARA RESOLVER UN PROBLEMA DE DISEÑO EN UN CONTEXTO PARTICULAR

Page 3: Patrones de Acciones y  Comando.pptx

DEFINICION(patrón de comando)

PATRON DE DISEÑO EN EL QUE LOS OBJETOS PRESENTAN ACCIONES QUE SERAN CONSUMIDAD POR ALGUIEN.

Page 4: Patrones de Acciones y  Comando.pptx

DESCRIPCION( patrón de comando).

ENCAPSULA UNA PETICION COMO UN OBJETO.

Page 5: Patrones de Acciones y  Comando.pptx

UTILIDAD

NOS SIRVE CUANDO NECESITAMOS DESACOPLAR UN OBJETO.

PERMITE GESTIONAR COLAS O REGISTRO DE MENSAJES O DESHACER.

Page 6: Patrones de Acciones y  Comando.pptx

ELEMENTOS DE LA ESTRUCTURA

INVOCADOR. CLIENTE. RECEPTOR. COMANDO. COMANDO CONCRETO.

Page 7: Patrones de Acciones y  Comando.pptx

El usuario abre su programa favorito

http://www.youtube.com/

Page 8: Patrones de Acciones y  Comando.pptx
Page 9: Patrones de Acciones y  Comando.pptx

Click sobre el archivo para buscar

Page 10: Patrones de Acciones y  Comando.pptx

Se abre el archivo

Page 11: Patrones de Acciones y  Comando.pptx

EJEMPLO DE USO DE PATRÓN.

EL CONSUMIDOR(cliente). DA ORDENES(comandos). MESERO(Invocador),ENLISTA LAS

ORDENES. COCINERO(receptor-realiza acción).