Ver Mensaje Individual
  #11 (permalink)  
Antiguo 24/12/2010, 02:12
miktrv
 
Fecha de Ingreso: julio-2008
Ubicación: Barcelona
Mensajes: 2.100
Antigüedad: 15 años, 9 meses
Puntos: 165
Respuesta: de donde sacar contenido

Cita:
Iniciado por JaimeSavines Ver Mensaje
Hmmmm.. Hijo te voy a dar un consejo si bien este es un foro abierto, por lo menos respeta a los que te contestan no hay necesidad de risas, por que en tu caso preguntas algo que es basico en la programacion orientada a objetos y va relacionado con las responsabilidades de tu clase. Hay dos patrones sencillos que te resulven tu duda.

Expert

Who, in the general case is responsible?

Assign a responsibility to the information expert -- the class that has the information necessary to fulfill the responsibility.


Pure Fabrication

Who, when you are desperate, and do not want to violate High Cohesion and Low Coupling?

Assign a highly cohesive set of responsibilities to an artificial class that does not represent anything in the problem domain, in order to support high cohesion, low coupling, and reuse.


Aqui puede leer un poco mas de los Grasp patterns
[URL="http://web.cs.wpi.edu/~gpollice/cs4233-a05/CourseNotes/maps/class4/InformationExpert.html"]http://web.cs.wpi.edu/~gpollice/cs4233-a05/CourseNotes/maps/class4/InformationExpert.html[/URL]
Tambien puedes leer los siguientes libros:
[URL="http://www.amazon.com/Applying-UML-Patterns-Introduction-Object-Oriented/dp/0131489062/ref=sr_1_1?s=books&ie=UTF8&qid=1293170409&sr=1-1"]Applying Uml and patterns[/URL]
[URL="http://www.amazon.com/Object-Design-Roles-Responsibilities-Collaborations/dp/0201379430/ref=sr_1_1?s=books&ie=UTF8&qid=1293170491&sr=1-1"]Object Design: Roles, Responsibilities, and Collaborations
[/URL]

Saludos
Jajajaja,

Para mi una risa no es una falta de respeto, si no tienes sentido del humor o te sientes ofendido por una risa... es tu problema ;)

Y por cierto, en ningún momento he dicho que lo que pregunto sea o no básico, eso no quiere decir que busque un código re-utilizable que también lo es.

Muchas gracias por la información.