AEM Components with third party contents

Kinjal P Darji
1 min readMay 6, 2022

Customer Requirement : Pull content from a content management system(CMS) using restful API’s to build a site in AEM 6.5. The contents of the components in AEM should be fetched from third party CMS based on categories/custom request data. The pages can have more than 10–15 such components those are fetching data on the runtime.

Solution : Create a custom component that has dialog box with multifield to for key-value pair. This input will be used as the inputs on CMS in the form of request parameters. Now based on this inputs the component will make a rest API call to CMS to get the data and render it on the component. The CMS data is in HTML format.

Draw backs and resolutions : This approach will make several rest calls to third party, which will eventually be bottleneck for the page performance. An approach for increasing performance is to save and store content from the third-party content API for consuming using the Sling Model API or the JCR API. The save and store mechanism could be an OSGI Scheduler within AEM (Pull Approach) or by written into AEM (Push approach) by the third-party application with the JCR API.

Multithreading can not be used here considering that there’s one sling model being utilized and if there is data involved, it is necessary that it is processed with keeping it’s ACID property intact.

--

--

Kinjal P Darji

Hi, I am an AEM architect and a certified AWS Developer — Associate.