Deciding how much code to use in JSP vs OSGI Bundle | Community
Skip to main content
Level 6
October 16, 2015
Solved

Deciding how much code to use in JSP vs OSGI Bundle

  • October 16, 2015
  • 3 replies
  • 1183 views

I was wondering which if it is preferable to have as much Java code inside a component to be held inside of OSGI bundles created in eclipse using maven.

 A co worker argues to me that there is no need to use osgi bundles, and that we can do it all inside of JSP.

I am of the contrary opinion. It is also my proposition that the AEM documentation recommends OSGI bundles and using as little java code inside the jsp as possible. My colleague says that the documentation does not support or recommend this.

 

Now I do not care if I am wrong or right on a personal basis, I just want to make an informed decision.The project has now grown to a complexity where we need to make a strategic decision on this issue.

So, which hypothesis is correct, or is there a better middle ground between the two?

 

Best Regards

Clive Stewart

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 smacdonald2008

That is a strategic team decision. Some development teams like to keep JSP components thin and use them to set views and have the Java OSGi bundles to all the heavy processing. Others prefer using JSPs for app logic. 

Here is a good overview created by community members:

http://www.youtube.com/watch?v=SNI6wr_u2a8

3 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

That is a strategic team decision. Some development teams like to keep JSP components thin and use them to set views and have the Java OSGi bundles to all the heavy processing. Others prefer using JSPs for app logic. 

Here is a good overview created by community members:

http://www.youtube.com/watch?v=SNI6wr_u2a8

Feike_Visser1
Adobe Employee
Adobe Employee
October 16, 2015

hi clive,

Also make sure you know that in AEM6 there is a new template language available.

http://docs.adobe.com/docs/en/aem/6-0/develop/sightly.html

With this you simple can't add code in your component/template...

best,
Feike

Level 6
October 16, 2015

Thank you,

 

I will look at the video

 

Regards

Clive