Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Deciding how much code to use in JSP vs OSGI Bundle

Avatar

Level 6

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Employee

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

Avatar

Level 6

Thank you,

 

I will look at the video

 

Regards

Clive