Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-13 Thread Christanto Leonardo
Hi, > Christanto's types know about "multiple" and "required" attributes Those are for AttributeDefinition. I don't think we need complex validation for Attribute. But for Property, pluggable validation is already supported by its API [1]. Cheers, Christanto [1]

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-13 Thread Christanto Leonardo
Hi, I extract out the module into API bundle and implementation bundle. I also provide an example based on SlingShot content to generate HAL response. See the details at https://github.com/christanto/sling-whiteboard/tree/master/modeling Cheers, Christanto On Thu, Jan 10, 2019 at 8:59 PM

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-10 Thread Bertrand Delacretaz
On Thu, Jan 10, 2019 at 3:36 PM Carsten Ziegeler wrote: > This seems to have a lot in common what we already tried with the > validator api/module. > > https://github.com/apache/sling-org-apache-sling-validation-api ... Indeed, thanks for pointing this out. I was planning to merge ideas once we

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-10 Thread Carsten Ziegeler
This seems to have a lot in common what we already tried with the validator api/module. https://github.com/apache/sling-org-apache-sling-validation-api Carsten Bertrand Delacretaz wrote On Thu, Jan 10, 2019 at 4:33 AM Christanto Leonardo wrote: ...BTW I rename things to use "type"

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-10 Thread Bertrand Delacretaz
On Thu, Jan 10, 2019 at 4:33 AM Christanto Leonardo wrote: > ...BTW I rename things to use "type" instead of "model"... Great! Would it be ok for you to extract the key interfaces into a separate module? I'm thinking of Types, DataType, AttributeDefinition and maybe a few others - just a

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-09 Thread Christanto Leonardo
BTW I rename things to use "type" instead of "model". See for example https://github.com/christanto/sling-whiteboard/blob/c8d06a5520bd89ecf97243088e37f75bacf96d38/modeling/src/main/java/org/apache/sling/types/TypeSystem.java Cheers, Christanto

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
Hi, On Wed, Jan 9, 2019 at 9:57 AM Jason E Bailey wrote: > > On Tue, Jan 8, 2019, at 7:43 PM, Christanto Leonardo wrote: > > > > ``` > > + /mycontent2 > > - jcr:primaryNodeType = "nt:unstructured" > > - sling:resourceType = "my/page" > > - my:created = "2019-01-01T00:00:00Z" > > -

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
Hi, On Tue, Jan 8, 2019 at 9:54 PM Bertrand Delacretaz wrote: > Hi, > > On Tue, Jan 8, 2019 at 2:15 PM Bertrand Delacretaz > wrote: > > ...That common ground might be a Java API used to access the underlying > > models, exposing their semantics in a way that clearly defines how > > they are

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Jason E Bailey
On Tue, Jan 8, 2019, at 7:43 PM, Christanto Leonardo wrote: > > ``` > + /mycontent2 > - jcr:primaryNodeType = "nt:unstructured" > - sling:resourceType = "my/page" > - my:created = "2019-01-01T00:00:00Z" > - my:title = "Title 1" > ``` > > Here, you simply define a DataModel for

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
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

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
ound 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

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Jason E Bailey
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? > > > &g

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
etadata 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:christanto.leona...@gmail.com] > >Sent:

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Bertrand Delacretaz
Hi, On Tue, Jan 8, 2019 at 2:15 PM Bertrand Delacretaz wrote: > ...That common ground might be a Java API used to access the underlying > models, exposing their semantics in a way that clearly defines how > they are used in Sling and possibly other applications I have had a closer look at

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
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:christanto.

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
gt; 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- >

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
port 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/

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Bertrand Delacretaz
Hi, Thank you Christanto for your suggestions - I'll take Stefan's questions as a basis to clarify my ideas around this. I think we can and should find a common ground between Christanto's (pretty concrete) proposal and the (more vague) ideas that I drafted at [0]. That common ground might be a

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
ribe 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 > > > > >

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Christanto Leonardo
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 > > > >

RE: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-08 Thread Stefan Seifert
/models.html >-Original Message- >From: Christanto Leonardo [mailto:christanto.leona...@gmail.com] >Sent: Tuesday, January 8, 2019 4:03 AM >To: dev@sling.apache.org >Subject: Re: Sling Type System: started a wiki page for concepts, ideas, >motivation > >Hello, > >I am

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2019-01-07 Thread Christanto Leonardo
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 <

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-12-03 Thread Robert Munteanu
Hi Jason, Top-posting to sort of give a summary of my personal opinion: it's absolutely fine to experiment with new resource providers and extensions to the resource provider API. Looking forward to a discussion when we have more concrete stuff to talk about :-) Thanks, Robert On Mon,

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-11-26 Thread Jason E Bailey
I see similarities between Sling and projects such as MySql and MongoDB. In both of these the code that actually persists the data is a separate application, sometimes maintained by completely different people. In the case of MySQL you had a choice between MyISAM and InnoDB and they had

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-11-20 Thread Robert Munteanu
On Wed, 2018-10-10 at 10:09 -0400, Jason E Bailey wrote: > On Wed, Oct 10, 2018, at 8:36 AM, Robert Munteanu wrote: > > > I think that's an important point, this should live on the Sling > > level. > > For the sake of being complete, there are also Oak restrictions > > that > > sort of overlap

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-10 Thread Jason E Bailey
On Wed, Oct 10, 2018, at 8:36 AM, Robert Munteanu wrote: > I think that's an important point, this should live on the Sling level. > For the sake of being complete, there are also Oak restrictions that > sort of overlap the scope of this initiative, see for instance [1]. > This is a side note.

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-10 Thread Robert Munteanu
On Wed, 2018-10-10 at 14:20 +0200, Bertrand Delacretaz wrote: > On Wed, Oct 10, 2018 at 2:12 PM Jason E Bailey > wrote: > ... > > 1. If a resource does not declare a type is there a default one? > > ... > > I don't have an opinion on this so far. > > > 2. How does the sling type differ from the

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-10 Thread Bertrand Delacretaz
On Wed, Oct 10, 2018 at 2:12 PM Jason E Bailey wrote: ... > 1. If a resource does not declare a type is there a default one? ... I don't have an opinion on this so far. > 2. How does the sling type differ from the jcr node types and how will they > co-exist? I think the Sling Type System

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-10 Thread Jason E Bailey
On Wed, Oct 10, 2018, at 5:54 AM, Bertrand Delacretaz wrote: > On Tue, Oct 9, 2018 at 6:34 PM Jason E Bailey wrote: > Good point, I think it's analogous to casting an object in Java and > should be subject to similar rules. Or how interfaces work in golang where you just need to meet the field

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-10 Thread Bertrand Delacretaz
On Tue, Oct 9, 2018 at 6:34 PM Jason E Bailey wrote: > ...in the RequestDispatcherOptions which is used by the sling:include taglib, > you can force an overwrite of a resourceType to something else... Good point, I think it's analogous to casting an object in Java and should be subject to

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-09 Thread Jason E Bailey
On Tue, Oct 9, 2018, at 8:46 AM, Bertrand Delacretaz wrote: > Not sure what you mean by "apply other resourceTypes", do you mean by > changing the sling:resourceType property? > Specifically, in the RequestDispatcherOptions which is used by the sling:include taglib, you can force an overwrite

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-09 Thread Bertrand Delacretaz
Hi Jason, On Wed, Oct 3, 2018 at 2:44 PM Jason E Bailey wrote: > ...A resource can have a sling:resourceType which defines the process which > processes the resource. That is the default process, however > you can apply other resourceTypes to that resource so it's processed > differently

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-03 Thread Jason E Bailey
Let me see how close I am to your thought process. A resource can have a sling:resourceType which defines the process which processes the resource. That is the default process, however you can apply other resourceTypes to that resource so it's processed differently based on your need. To me

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-02 Thread Bertrand Delacretaz
Hi Jason, thanks for your feedback! On Tue, Oct 2, 2018 at 3:48 PM Jason E Bailey wrote: > ...To restate. Given a resource, you should be able to define what properties > that resource can contain and what child resources it can be the parent of... Yes, among other things including some that

Re: Sling Type System: started a wiki page for concepts, ideas, motivation

2018-10-02 Thread Jason E Bailey
+1 for the idea. To restate. Given a resource, you should be able to define what properties that resource can contain and what child resources it can be the parent of. Feedback: 1. There's some things that are implicit. For example, stating that a resource can be a parent of a resource would