Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Local Vs Bundle Java use-class

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

471 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

471 likes

Total Posts

1,039 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

25-05-2021

Hi All

 

  Greetings. Hope all of you are staying safe and healthy and keeping your people safe. I was going through the documentation for use api. https://experienceleague.adobe.com/docs/experience-manager-htl/using/htl/use-api-java.html?lang=en I saw this interesting note recommended by Adobe, which said 

 

NOTE

local Java use-class is recommended when the use-class is specific to the component in question.

bundle Java use-class is recommended when the Java code implements a service that is accessed from multiple HTL components.

 

I was wondering what is exactly the best practice. I personally use only bundle Java use-class (Mostly Sling Models) for all the backend processing , even when it is single component specific. For quick fixes, I sometimes use Javascript Use-API rather than a local Java use-class.  What are your best practices in this regard ? I am trying to understand what I am doing wrong in this case ? 

 

Thanks and Stay Safe

Veena ✌

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,118 likes

Total Posts

3,149 posts

Correct Reply

1,073 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,118 likes

Total Posts

3,149 posts

Correct Reply

1,073 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

25-05-2021

Best practice is to keep all Java code in bundles. Then the compilation is done during build-time and not during runtime.

Answers (0)