Someone kindly address my query.
My query is if we want to display AEM JCR data inside a Mobile App, what should I do from AEM perspective?
Given that AEM JCR exposes the data in a RESTful way, is it true that this data is readily available to the Mobile Apps, all it needs to do is to call the RESTful API?
Appreciate your replies.
Do you suggest that the upcoming Ask The Expert Session on Content As A Service is going to address this query?
You might want to explore content services feature that is available with AEM 6.3 + Feature Pack 1.
Here is the documentation and a tutorial for this.
Also, creating a simple sling servlet to obtain channel neutral output can also work.
Thanks Varun for responding with these very useful links.
My main query is that JCR itself is a repository offering access to the content in a RESTful way.
Does it not serve our this purpose?
Why cant the Mobile App issue a RESTful call to the JCR for the content?
Why do we need servlets and all?
You're correct, AEM can serve content in Restfull manner without any servlet or custom code.
But the default JSON output will contain a lot of extra information and can reveal your internal repository structure.
In order, to avoid any security related issues, it would be a good idea to only expose a subset of information(node contents) and hide certain implementation level details like jcr:PrimaryType: sling:resourceType, sling:resourceSuperType.
This can be achieved with a custom servlet or content services.
If you still, want to use the default JSON output, I would strongly recommend using Sling Model Exporters, this way you can hide implementation level details.
Hope this helps.