Hi,
Let us say, I want to build an AEM Mobile App, that behaves exactly similar to an AEM Web App and the AEM Web App was already built (it is up and running).
Now in order to build the AEM Mobile App, what additional steps to be followed?
Given that JCR Data is accessible in a RESTful way, do we still need to build servlets on JCR Data?
My understanding is that from AEM side we do not need to do anything, as Mobile App could access AEM data in a RESTful way (by design).
Appreciate your replies.
Thanks,
Rama.
Solved! Go to Solution.
Hi Rama,
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.
Regards
Varun mitra
[2] https://www.dropbox.com/s/8jcaw3x7g1lrblx/ResourceToJSONServlet.java?dl=0
Hi,
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.
Thanks,
Rama.
Views
Replies
Total Likes
Hi all,
Do you suggest that the upcoming Ask The Expert Session on Content As A Service is going to address this query?
Thanks,
Rama.
Views
Replies
Total Likes
Hi Rama,
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.
Regards
Varun
[1] https://helpx.adobe.com/experience-manager/kt/sites/using/content-services-tutorial-use.html
Adobe Experience Manager Help | Getting Started with AEM Content Services
Views
Replies
Total Likes
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?
Thanks,
Rama.
Views
Replies
Total Likes
YEs - the AEM JCR is Restful and you can perform many Restful operations - as shown here: Sling Cheatsheet
However - as Varun suggests - Content Services can be used
Views
Replies
Total Likes
Hi Rama,
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.
Regards
Varun mitra
[2] https://www.dropbox.com/s/8jcaw3x7g1lrblx/ResourceToJSONServlet.java?dl=0