This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hi Team,
We have a requirement where in we need to ca ll a 3rd party rest api to get a json response based on which we need to construct all the components on the page.
So my question is how shall we call the 3rd party api only once and then all the components use the same json response .
Please let us know the correct way of handling this scenario.
Note: we are not using SPA.
Regards
Solved! Go to Solution.
Views
Replies
Total Likes
When dealing with third-party APIs, the best practice is to always think of the best way to offload the server-load from your publishers. Ask questions like: does does this third-party API need to be a par of the HTML within the server-side render? If server-side render is not required, you can invoke the third-party API using Javascript, and with the response, using Javascript to render HTML elements to the page. This practice will keep your AEM publishers more performant and unblocked.
Read more here: https://sourcedcode.com/scenario-building-aem-components-with-3rd-party-integrations-the-right-way
In my experience, the best way to deliver a performant AEM website is to cache all pages. Try migrating all the content from the old CMS to AEM; in this case, you can utilise the Apache Sling Framework to do all the heavy lifting for you. Take a look at the custom data importer service, com.day.cq.polling.importer.Importer API.
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
When dealing with third-party APIs, the best practice is to always think of the best way to offload the server-load from your publishers. Ask questions like: does does this third-party API need to be a par of the HTML within the server-side render? If server-side render is not required, you can invoke the third-party API using Javascript, and with the response, using Javascript to render HTML elements to the page. This practice will keep your AEM publishers more performant and unblocked.
Read more here: https://sourcedcode.com/scenario-building-aem-components-with-3rd-party-integrations-the-right-way
In my experience, the best way to deliver a performant AEM website is to cache all pages. Try migrating all the content from the old CMS to AEM; in this case, you can utilise the Apache Sling Framework to do all the heavy lifting for you. Take a look at the custom data importer service, com.day.cq.polling.importer.Importer API.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies