| 
     
      
      
      From: Jeremy F. <jfi...@ma...> - 2002-11-01 14:49:06
      
     
   | 
Sean - I've jumped into this thing in midstream, so I'm wondering what =
you're referring to when you say "our system."=20
I appreciate your concern with the descriptor mixing display and data =
attributes. It seems like a few of the items in the descriptor right now =
are there just to make renderSimpleForm() work and may be superfluous to =
the actual object model. I know that Nathan has been pushing Modus to be =
a complete system, with form generation built, but the system may be =
losing some of its "lightness" in doing so. I look forward to seeing his =
reply.
As for clustering the XML descriptor for a group of objects I would say =
no. I think it's legitimate to reference other objects within a =
descriptor ( a forum has threads), but the descriptor should continue to =
describe one content type. It seems cleaner and much more manageable to =
have separate forum, thread, and message descriptors than to wrap them =
all together in one mega/meta-file.
And you have to consider embedded vs referenced. The latter acts like a =
foreign key relationship, the former gets you into the same 'mess' as =
trying to implement arrays natively (as does trying to implement nested =
structs natively as far as I can see).I've been playing with nesting =
content objects a lot and the method that seems to offer the best =
balance of efficiency and flexibility is a mix of embedded and =
referenced objects. The init method basically constructs a map of all =
nested objects or subcomponents (the reference part), and a call to =
retrieve a subcomponent will then instantiate it. What this affords a =
developer using the modus API is to do something like:
<cfset forum =3D =
createObject("component","path.to.forum").init(attributes.forumID)>
<cfset threads =3D forum.getObjects('threads')>
I've got an example that I'll email you off list.
-Jeremy
  ----- Original Message -----=20
  From: Sean A Corfield=20
  To: mod...@li...=20
  Sent: Friday, November 01, 2002 12:24 AM
  Subject: Re: [Modus-devs] Collections of content objects and =
performance
  On Thursday, Oct 31, 2002, at 14:52 US/Pacific, Nathan Dintenfass =
wrote:
    We are very much on the same track.  I agree that "join" is the =
wrong word in the OO context.  Collection is much better.  In fact, they =
probably should even be arrays, they should be structs (in CF terms).
  See my other comment about complex fields. That's where our system =
began to break down. Part of the issue seems to be around how 'holistic' =
you want the XML descriptor to be: in a forum application, for examples, =
we have multiple 'forum' objects, each 'forum' has zero or more 'thread' =
objects, each 'thread' has zero or more 'message' objects, a message =
object has zero or more replies which are themselves 'message' objects. =
Should there be a separate description for each object, or is one =
descriptor sufficient (or desirable) for that cluster of objects.
      <field name=3D"related"
        label=3D"Related Press Releases"
        type=3D"org.bacfug.modus.fields.contentObject"
        multiple=3D"yes">
       <objectType name=3D"modustest.contentObjects.pressRelease"/>
      </field> =20
  So this is an array of modustest.contentObjects.pressRelease? What has =
"type=3D..." got to do with this? What value has the type got to do with =
anything?
  "I can smell your brains!"
  -- Mittens the Kitten : http://www.matazone.co.uk/theotherside.html
 |