Have a look at Sling Models.

On Thu, Jul 23, 2015 at 12:32 AM, Henry Saginor <[email protected]>
wrote:

> Hi Michael,
>
> Since Sling itself is a framework for building web applications with it’s
> own persistence and services layer it’s a bit unusual to get questions on
> integration with Spring here (I think). But I don’t know enough about your
> application and its use cases to question why you are doing this. ButI
> think you you can use JCR API to persist your DTOs. Look up JCR API and
> Apache Jackrabbit and OAK projects.
>
> Technically you could do away with Sling entirelly and use Apache
> Jackrabbit or OAK directly if all you are using Sling for is as
> document/content store.
> But again don’t know enough about your application. And I don’t really
> want to discourage you from using Sling since I am a big fan. :)
>
> Henry
>
> > On Jul 22, 2015, at 1:36 PM, Haefele, Michael <[email protected]>
> wrote:
> >
> > We have a Sling application that we're using basically as a
> database/file manager for portions of a java Spring application.
> >
> > In java we have a bunch of DTOs that we import by converting to json
> using Jackson and persisting to Sling using the import option on the Sling
> post servlet.
> > We then read them using .tidy.infinity.json and convert back to DTOs
> using Jackson again.
> > This is working really well.
> >
> > But we've reached point where we need to modify some of the data in
> Sling and it seems like I've hit a bit of a conceptual wall.
> > I was thinking we'd keep the DTO pattern going.
> > Load the DTO, modify some value, push the updated DTO back to Sling.
> >
> > But it seems the POST servlet doesn't support json when doing a modify
> operation.
> > I basically took that as a hint that I might be barking up the wrong
> tree here.
> >
> > We could also do the updates by posting specific properties, but it
> seems like that's opening the door to writing a lot of custom update code.
> >
> >
> > Does anyone have any suggestions for best practices for this sort of
> thing?
> > Am I trying too hard to apply RDBMS/hibernate style patterns?
> >
> >
> > Thanks for taking to the time to read a somewhat open ended question.
>
>

Reply via email to