Application Architecture - API Integration, AEM, VueJS, KendoUI | Community
Skip to main content
NageshRaja
Level 5
October 17, 2024
Solved

Application Architecture - API Integration, AEM, VueJS, KendoUI

  • October 17, 2024
  • 4 replies
  • 1197 views

Hey guys,

 

We have an application architecture wherein a set of APIs are exposing the data via which we need to create custom Forms, Graphs etc.

 

Approach 1 - The idea is to have AEM call the APIs then expose a custom object to VueJS for rendering the data on the page.

Approach 2 - AEM calls the VueJS component directly which calls the APIs and consumes the response.

 

Is there any drawback to having the AEM act as a response filterer before passing the data to VueJS?

Or from performance perspective is there something to take into account?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi @nageshraja 
Not sure if you can all API directly at client-side in your frontend code?

If you need to hide api credentials then you can use dispatcher / CDN as proxy but using AEM is proxy will add additional load on AEM.

4 replies

RiteshY18
Community Advisor
Community Advisor
October 17, 2024

@nageshraja  Approach 1 would good as AEM would work as middle layer/ business logic layer here before passing object to Vue 

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 18, 2024

Hi @nageshraja,

this one is hard to answer without knowing more about your architecture and the load external APIs can handle. I'm not too fond of the approach where AEM is used as a proxy for external services. It will work, but it sounds like an old-school architecture approach where everything is baked into the CMS. This could be something that could be solved with a microservice or at the CDN level with Edge Workers.

 

Good luck,

Daniel

arunpatidar
Community Advisor
Community Advisor
October 18, 2024

Hi @nageshraja 
Please check article by Jörg, that claery says, do not use AEM as proxy

Do not use AEM as a proxy for backend calls : https://cqdump.joerghoh.de/2024/06/27/do-not-use-aem-as-a-proxy-for-backend-calls/ 

Arun Patidar
NageshRaja
Level 5
October 21, 2024

@arunpatidar Then how should we handle such a use case?

Here's my flow -

1. Form fields written in AEM to capture form data

2. Basis form fields, REST API is triggered to fetch the response.

3. The response is rendered in AEM dynamically and then further exposed to render graphs etc.

 

What should be the best way to implement this use case?

 

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
October 21, 2024

Hi @nageshraja 
Not sure if you can all API directly at client-side in your frontend code?

If you need to hide api credentials then you can use dispatcher / CDN as proxy but using AEM is proxy will add additional load on AEM.

Arun Patidar
kautuk_sahni
Community Manager
Community Manager
November 5, 2024

@nageshraja Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni