Hi All,
Hope you all are doing well & safe.
Need one help regarding any third party API integration in AEM 6.5 and to display it's data using HTL.
What approach we have to follow to make it highly scalable and efficient.
Kindly guide.
Thanks in advance,
Regards,
Pavan
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @phampi
To integrate third-party there is 2 approach. 1) Server-Side Rendering & 2) Client-Side Rendering
Create an OSGi Service Layer:
Expose Operations:
Sling Models for Server-Side Components:
@osgiservice
annotation.HTL Templates:
Create an OSGi Service Layer:
Expose Operations:
Sling Servlet for Data Retrieval:
@Reference
annotation to fetch data from the API.Client-Side Integration:
Integration with AEM Components (Optional):
By following these separate approaches, you can integrate third-party APIs into AEM using both server-side rendering and client-side rendering techniques, catering to different use cases and requirements.
In both cases there are some pros & cons as well.
Server-Side Rendering (SSR):
Client-Side Rendering (CSR):
Asif Chowdhury
Hi @phampi
So third party API integrations I am assuming you want to make from server side and then display data using component HTL/Sightly.
This depends if you want to show data dynamically on the website i.e. load data on clientside for rendering ;; Or if you want to load HTL at server side and then serve it to client server as cached response.
1. In both the case , standard approach says create a service layer for the 3rd Party API ( OSGI service)
Here is a reference for the same https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-call-3rd-part-rest-...
Using this OSGI service you can expose the operations you want to perform from the API using overridden methods (as you would in an osgi service)
2. Now in case you want to load the response from the API using sightly in the component , you can use sling model for the component to refer the osgi service using @osgiservice annotation and then expose the processed content using model getter methods into HTL.
3. Another case is you want to load data dynamically on clientside using frontend , then you can create a sling servlet and then use osgi service reference using @Reference annotation to fetch data from the API and expose over the network via url.
Another reference that might help https://sourcedcode.com/blog/aem/scenario-building-aem-components-with-3rd-party-integrations-the-ri...
Hi @phampi
To integrate third-party there is 2 approach. 1) Server-Side Rendering & 2) Client-Side Rendering
Create an OSGi Service Layer:
Expose Operations:
Sling Models for Server-Side Components:
@osgiservice
annotation.HTL Templates:
Create an OSGi Service Layer:
Expose Operations:
Sling Servlet for Data Retrieval:
@Reference
annotation to fetch data from the API.Client-Side Integration:
Integration with AEM Components (Optional):
By following these separate approaches, you can integrate third-party APIs into AEM using both server-side rendering and client-side rendering techniques, catering to different use cases and requirements.
In both cases there are some pros & cons as well.
Server-Side Rendering (SSR):
Client-Side Rendering (CSR):
Asif Chowdhury
Views
Replies
Total Likes
Hi @AsifChowdhury,
To integrate third-party APIs, there are two approaches: Server-Side Rendering and Client-Side Rendering. I have prepared a detailed blog post with a demo project about the Server-Side Rendering Approach. You can check it out here: Integrating Third-Party APIs into AEM 6.5 with Server-Side Rendering Approach.
Additionally, I’ve also published a blog about the Client-Side Rendering Approach. You can read it here: Integrating Third-Party APIs into AEM 6.5 with Client-Side Rendering Approach.
I hope you find it helpful!
Habtamu Tesfie
Views
Replies
Total Likes
Hi @phampi,
To integrate third-party APIs, there are two approaches: Server-Side Rendering and Client-Side Rendering. I have prepared a detailed blog post with a demo project about the Server-Side Rendering Approach. You can check it out here: Integrating Third-Party APIs into AEM 6.5 with Server-Side Rendering Approach.
Additionally, I’ve also published a blog about the Client-Side Rendering Approach. You can read it here: Integrating Third-Party APIs into AEM 6.5 with Client-Side Rendering Approach.
I hope you find it helpful!
Habtamu Tesfie
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies