User Tools

Site Tools


why_can_t_i_reuse_a_role_across_multiple_contexts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

why_can_t_i_reuse_a_role_across_multiple_contexts [2014/01/26 21:28]
jcoplien [Why can't I reuse a role across multiple contexts?]
why_can_t_i_reuse_a_role_across_multiple_contexts [2014/03/11 12:59] (current)
gazoot Linked to mailing list
Line 3: Line 3:
  
  
-This has been discussed many times on the Email list; a review of the treatment of the topic there might also be informative.+This has been discussed many times on the [[https://​groups.google.com/​forum/#​!forum/​object-composition|Email list]]; a review of the treatment of the topic there might also be informative.
  
 A //Role// is a name with associated responsibilities. That name makes sense only in a Context. A Shape can move and draw in a graphical context; a Cowboy can move, draw and shoot in a Western movie context. Having a role — named however you like — that can draw and shoot does not make it a candidate for reuse in another context. A //Role// is a name with associated responsibilities. That name makes sense only in a Context. A Shape can move and draw in a graphical context; a Cowboy can move, draw and shoot in a Western movie context. Having a role — named however you like — that can draw and shoot does not make it a candidate for reuse in another context.
Line 15: Line 15:
 Trygve writes: Trygve writes:
  
-> //Reuse implies, IMO, that a Role (or at least a Role Method) has a meaning independent of Context. So I challenge you to define the concept independently of the Context it appears in. I'm sure it can be done, but then we probably also have to redefine the semantics of Context.//+> //​Reuse ​[of a Role] implies, IMO, that a Role (or at least a Role Method) has a meaning independent of Context. So I challenge you to define the concept independently of the Context it appears in. I'm sure it can be done, but then we probably also have to redefine the semantics of Context.//
  
 > //OOram synthesis lurks in the background here. OOram synthesis explicitly defines how roles can be composed of several roles taken from different role models. (E.g. see figure 3.11 on p. 75 in my OOram book. Rickard: I'll be happy to send you a copy if you haven'​t already got one) The fundamental point is that I can only combine complete role models, not individual roles.// > //OOram synthesis lurks in the background here. OOram synthesis explicitly defines how roles can be composed of several roles taken from different role models. (E.g. see figure 3.11 on p. 75 in my OOram book. Rickard: I'll be happy to send you a copy if you haven'​t already got one) The fundamental point is that I can only combine complete role models, not individual roles.//
  
 ---- ----
why_can_t_i_reuse_a_role_across_multiple_contexts.1390771690.txt.gz · Last modified: 2014/01/26 21:28 by jcoplien