Here is a great community article by Dan Klco that talks about the MVC design pattern and AEM. I really like this advice from the article:
"Project teams and CQ developers should attempt to follow MVC practices when developing on CQ5 by avoiding business logic in their JSPs, putting business logic in OSGi Services and leveraging new tools such as the upcoming Sling Proxy, to create the models."
I 100% agree - place as much as the heavy code in an OSGi servlet/service using Java. Then keep front end components light and have them call into OSGi services. The job of the the front end component should be to display the data - similar to Spring MVC that use MVC controllers, data models, and views.
To read this - see:
http://labs.sixdimensions.com/blog/2013-05-20/ask-experts-mvc-adobe-cq5/
Hi,
Do you know any best practices for applying the MVC pattern in expressions of adaptive form fields? Where can an author implement business logic that may be used among various fields within an adaptive form?
Thank you,
Urs
Views
Replies
Total Likes
See this article on adaptive form:
https://helpx.adobe.com/aem-forms/6/introduction-forms-authoring.html
Also - see this community article - it talks about how to post an adaptive form to an OSGi service:
https://helpx.adobe.com/experience-manager/using/posting-aem-6-form-data.html
Views
Replies
Total Likes
Hi Smac Donald,
I am so surprised that you used and OSGi servlet/ service using Java. I was in also in trouble with the same problem as yours.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies