Hello, > 2. do you plan to support only a single resource/node and it's properties. what's with sub tree structures, that are supported by JCR CND definitions? more complex data models like forms are unlikely to be represented by a single resource. or maybe that is already covered with the property handlers although the name does not indicate it.
So far I just don't see a need to define the sub tree explicitly. In the end the PropertyHandler will handle the retrieval/persistent to the persistence later. See [TextPropertyImpl] for example. I think this is good because the underlying persistence can be changed by swapping the PropertyHandler implementations. Cheers, Christanto [TextPropertyImpl] https://github.com/christanto/sling-whiteboard/blob/08fd3637c4045470e2b2ba8f8d9bbf4fcf82c211/modeling/src/main/java/org/apache/sling/modeling/data/commons/impl/TextPropertyImpl.java#L51 On Tue, Jan 8, 2019 at 6:44 PM Stefan Seifert <[email protected]> wrote: > hello christanto. > > thanks for bringing this up! some first questions after a first read: > > 1. why defining a new "DSL" to describe the model metadata? what's with > existing things like json schema. defining a completely new DSL often has > the risk of not getting it "right" in the first place. > > 2. do you plan to support only a single resource/node and it's properties. > what's with sub tree structures, that are supported by JCR CND definitions? > more complex data models like forms are unlikely to be represented by a > single resource. or maybe that is already covered with the property > handlers although the name does not indicate it. > > 3. one of the reasons why sling is why it is (without an explicit modeling > capability) is the rule #1 of david's model "Data First, Structure Later. > Maybe." [1]. this was stated a very long time ago. would be nice if you can > add a reference to your explainer page to it as well and explain why you > think different nowadays (i think there are good reasons for it, but it > always depends on the use cases). > > 4. the name "Models" can be mixed up with "Sling Models" [2] which points > somewhat into the same direction but is currently based on different > concepts and is already used much. but i suppose this can be sorted out > later to decide if this new approach can be "Sling Models 2.0" or the new > things should get a different name (like Type System). still it would make > sense to also add a reference to sling models to the explainer. > > 5. you describe it should be possible to derive data models from JCR CND > definitions. do you think this should be the major use case? JCR CND > definitions are quite out-of-fashion nowadays, and used more for historical > reasons (or for performance optimizations because oak indexes are based on > them). the tooling around them is not good (e.g. difficult to > update/replace them in a running system). > > 6. you describe some "other models" like FormModel, ActionsModel which > sound like hypermedia support. i do not fully understand how hypermedia > support fits into the other parts you describe which primarily describe the > data model and not the actions for them. where does this hypermedia > metadata come from? > > stefan > > [1] https://wiki.apache.org/jackrabbit/DavidsModel > [2] https://sling.apache.org/documentation/bundles/models.html > > > > >-----Original Message----- > >From: Christanto Leonardo [mailto:[email protected]] > >Sent: Tuesday, January 8, 2019 4:03 AM > >To: [email protected] > >Subject: Re: Sling Type System: started a wiki page for concepts, ideas, > >motivation > > > >Hello, > > > >I am currently working on the proposal to introduce the concept of > modeling > >in Sling. See it at < > >https://github.com/christanto/sling-whiteboard/tree/master/modeling>. > >One is especially encouraged to read the explainer at < > >https://github.com/christanto/sling- > >whiteboard/blob/master/modeling/docs/explainer.md > >>. > > > >My hope is that the Sling Modeling Framework can provide the ability to > >model many concepts in the application, starting with the typing system of > >the resource (i.e. the resource type definition) as the lowest layer. > > > >Please let me know what you think. I plan to continue developing this > >proposal. > > > >Cheers, > >Christanto > > > >On 2018/10/02 11:59:08, Bertrand Delacretaz <[email protected]> wrote: > >> Hi,> > >> > >> Recent discussions with a number of people from the Sling community> > >> [1] have helped clarify my thoughts about this, I have started a wiki> > >> page at > > > https://cwiki.apache.org/confluence/display/SLING/Sling+Type+System%3A+moti > >vation+and+requirements> > > > >> and feedback is welcome, on that page or here.> > >> > >> Roughly, the goal is to create a Sling Type System that defines much> > >> more precisely what the various Resource Types can contain, how they> > >> work together, etc. with the goal of generating self-describing> > >> interfaces.> > >> > >> Let's see where this leads, it's just rough ideas so far but it feels> > >> like a useful unifying concept for Sling.> > >> > >> -Bertrand> > >> > >> [1] along with reading "a conversation with Alan Kay, creator of> > >> Smalltalk" - https://queue.acm.org/detail.cfm?id=1039523> > >> >
