Need Best ways to implement Content as a Service for Mobile apps

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

232 likes

Total Posts

294 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

232 likes

Total Posts

294 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

23-06-2020

Hi Team,

 

Can anyone let us know the best practice along with Pros and Cons for exposing AEM content as json and build Mobile apps.


1.Sling Model exporter framework-json o/p
2.Custom servlet framework- json o/p
3. Experience fragments - json,html o/p
4. Content fragments - json o/p

 

@kautuk_sahni @Arun_Patidar 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

23-06-2020

Hi,

I would go with the 1st approach but As far as I know, the pros and cons of each approach are:

 

1.Sling Model exporter framework-json --> you need to create for sling model for each component model. For the custom model, you would have complete control of each property. It covers the redirect but not include the response of references like XF.
2.Custom servlet framework- json o/p - The custom servlet allows to control of everything but requires framwork validation to avoid unwanted results. e.g. https://aemlab.blogspot.com/2019/07/get-json-response-of-aem-page.html (e.g. It covers both redirect and reference response inclusion This is not production-ready, I created as a PoC)
3. Experience fragments - json,html o/p - same as point 1st but have to make multiple JSON requests to render the content of one page and MSM could be difficult in XF editor
4. Content fragments - json o/p - Limited data type.

Answers (0)