Hi, On Nov 7, 2007 11:23 PM, loproman <[EMAIL PROTECTED]> wrote: > On my class example, if I might defend my thinking a bit it seems like in > larger systems, the loosely typed nature of JCR objects (in particular > Node and Property) could become a problem. Unless these are wrapped > with objects, I could imagine there being many references to the same > node in many places.
Sounds like another case of the classical strong/loose typing debate. You make a good point and I agree that strong typing certainly has lots of value (I'm still a Java weenie :-), but there's also a downside of requiring extra code whenever you want to introduce a new field or some new access pattern. A fixed data access layer can easily become a bottleneck for many features like search, versioning, unstructured content, etc. There's no single correct way to solve that tradeoff for all people and projects. > Aside from being strongly typed, I feel like it presents opportunities to > build in domain logic on top of my nodes. Agreed, but then you're already moving from a pure data layer closer to the logic or control layer. In fact I believe that for many MVC applications you can use JCR as-is as the model, i.e. have both the view and controller parts use the JCR API directly without a separate layer on top of it. PS. There's been some related debate on the mailing list of the incubating Sling project. BR, Jukka Zitting
