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

When to use multiple bundles vs single core

Avatar

Avatar
Validate 1
Level 1
sboyleuf
Level 1

Likes

2 likes

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
sboyleuf
Level 1

Likes

2 likes

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
sboyleuf
Level 1

11-05-2021

Looking to see if there's a best practice defined anywhere. The newer archetypes use the concept of the "core" maven project for all the java related code that typically goes in a bundle. I have a codebase that's been in use since the 5.x days which consists of multiple custom bundles with varying level of dependencies. I want to help move it into the newer archetypes and follow newer best practices around structure. Even though managing the dependencies can be a challenge it does offer flexibility to turn smaller features off i.e. turning off events when doing large content updates or restarting a troublesome feature, etc. and keep features logically separated. My concern with a single large core bundle is that its a larger codebase for a larger site is having this big monolith of a jar file.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 50
Employee
markus_bulla_adobe
Employee

Likes

138 likes

Total Posts

121 posts

Correct Reply

59 solutions
Top badges earned
Affirm 50
Boost 100
Applaud 25
Affirm 25
Boost 50
View profile

Avatar
Affirm 50
Employee
markus_bulla_adobe
Employee

Likes

138 likes

Total Posts

121 posts

Correct Reply

59 solutions
Top badges earned
Affirm 50
Boost 100
Applaud 25
Affirm 25
Boost 50
View profile
markus_bulla_adobe
Employee

12-05-2021

Hi @sboyleuf!

There is no strict general ruling on when to split functionality into different bundles or when to keep everything together in one.

The latest AEM Maven archetype comes with a single core bundle because that's how you usually start a green field project. It gives you a quick and easy start for a new project and comes with everything that needed.

From my practical experience, a lot of projects are totally fine with having all their Java functionality in one bundle as their development is handled by a single team and deployment done through a single JCR package that contains everything. When your project grows (or you start with a project that's designed to be big) you may come to a point where you find benefits by splitting your code into different bundles and/or packages.

Reasons to split could be:

  • Varying release cycles for different parts of your application
  • Dedicated teams working on different parts of the code base
  • A growing code base where you feel that certain parts should be handled separately.
  • Different technologies, libraries or functionalities that you want to separate.

This is not an exclusive list and there can be other reasons. Also most of these reason don't make it mandatory to work with different bundles (the release cycle one probably, though).

 

Hope that helps!

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
sboyleuf
Level 1

Likes

2 likes

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
sboyleuf
Level 1

Likes

2 likes

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
sboyleuf
Level 1

12-05-2021

Thanks guys. You confirmed what I suspected. I just wanted to make sure there wasn't some official guidance esp. with alot of the changes needed to support working on Cloud Service. 

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

232 likes

Total Posts

294 posts

Correct Reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

232 likes

Total Posts

294 posts

Correct Reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

12-05-2021

@sboyleuf It just depends on how many different projects/websites/applications you host and how would you like to scale up in future.

 

End of day, all bundles has to be embed in either all pom.xml or your individual tenant ui.apps to make it into a code build and deployment pipelines.

 

you can refer my project model below and also some helpful links:-

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-archetype-23-24-maven-...

 

https://levelup.gitconnected.com/aem-multitenancy-running-multiple-websites-on-a-single-aem-environm...

https://aem.design/blog/2020/01/12/aem-framework-for-multi-tenant-environments

https://dev.to/anfibiacreativa/integrating-a-modern-frontend-in-a-multi-tenant-aem-project-2l20