I understand how to create an OSGI bundle using the Maven
- mvn -Padobe-public archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2.
I understand the technical tasks required to make a bundle and in eclipse and import it into AEM.
On the site i am working on I have been given 3 points of view for using OSGI Bundles in Components.
1) (Also my preference). Place as little code as possible inside JSP files, place all Java class code inside OSGI Bundle in eclipse and then import bundles into AEM.
2) Bundles are kept simple, with as little as possible “data” in them. Authors are empowered to configure as much as possible from the component dialog with the bundle simply doing the “heavy lifting”.
3) Avoid bundles, if and get the JSP to do processing, including placing classes in the JSP. While this can be made to work I can foresee problems in the future.This idea proposed was that the web site would consist of series of cards, each card holder just being a place for the Author's to drop components into. Each component would be a self sufficient module, with all java code existing in its jsp files.
So my question is, is what is the best strategy for optimizing use of bundles (as in view 2).
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
To follow up with Sham's answer -
Most web applications have backed processes doing the heavy crunching/processing and a thinner client. Be it a J2EE application, or a Spring Java app, most developers still employ back-end Java classes to do the job of processing data. In AEM, its really no different. A bundle is only a JAR with a MF file.
Views
Replies
Total Likes
Views
Replies
Total Likes
Thank you for your reply.
You have given me clarity on the issue.
Views
Replies
Total Likes
If I have a class in my bundle that fetches data via a web Api as an XML string and I parse the string to create a list of Objects (The objects being a Model Class of each entity) , would that mean that I am breaking the advice of
Views
Replies
Total Likes
Clive Stewart wrote...
If I have a class in my bundle that fetches data via a web Api as an XML string and I parse the string to create a list of Objects (The objects being a Model Class of each entity) , would that mean that I am breaking the advice of
Keep data in repository and not in osgi bundle.
it should be fine for external integration & not frequently accessed.
Views
Replies
Total Likes
Thank you
Views
Replies
Total Likes
Views
Likes
Replies