Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

Java Use-AP

Avatar

Former Community Member

Hi All,

I am using Java Use-API JavaScript Use-API,but page is performance is very slow.

Am not sure why is happening,Is I JavaScript Use-API slower than Java Use-AP?

or which one is better?

 

Thanks,

Nani.

1 Accepted Solution

Avatar

Correct answer by
Administrator

As correctly pointed by "Antonio",

Java USE-API is faster then JavaScript USE-API.

                
 Java Use-APIJavaScript Use-API
Pros
  • faster
  • can be inspected with a debugger
  • easy to unit-test
  • can be modified by front-end developers
  • is located within the component, keeping the view logic of a component close to it's corresponding template
Cons
  • cannot be modified by front-end developers
  • slower
  • no debugger (yet)
  • harder to unit-test

Example use:- 

Link 1:- https://docs.adobe.com/docs/en/htl/docs/use-api/java.html

Link 2:- https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html

 

I hope this will help you.

~kautuk



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 10

I recommend using a HTL component that implements WcmUsePojo.  See https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html. Hope this helps.

Avatar

Level 7
        As you can see from doc the javascript is slower than java.https://docs.adobe.com/docs/en/htl/docs/use-api.html

Avatar

Correct answer by
Administrator

As correctly pointed by "Antonio",

Java USE-API is faster then JavaScript USE-API.

                
 Java Use-APIJavaScript Use-API
Pros
  • faster
  • can be inspected with a debugger
  • easy to unit-test
  • can be modified by front-end developers
  • is located within the component, keeping the view logic of a component close to it's corresponding template
Cons
  • cannot be modified by front-end developers
  • slower
  • no debugger (yet)
  • harder to unit-test

Example use:- 

Link 1:- https://docs.adobe.com/docs/en/htl/docs/use-api/java.html

Link 2:- https://helpx.adobe.com/experience-manager/using/first_htl_WCMUsePojo.html

 

I hope this will help you.

~kautuk



Kautuk Sahni