Tuesday 27 September 2016

Integrate AEM With DOJO

Using DOJO as AEM Front end

There are some cases where AEM needs to be integrated with DOJO.

What is DOJO
DOJO is a Javascript framework used to develop interactive, responsive websites, and mainly used as a UI tool.

DOJO can be integrated with AEM through an interaction Layer. AEM exposes many of the methods to integrate with any third-party applications. This enables applications to work seamlessly when integrated. A JSON layer is used to integrate AEM with DOJO in this analysis.

DOJO with AEM - Arch view
The architectural diagram is shown below.



OSGi (Open Service Gateway Initiative) is the Java framework which runs on AEM and generates the JSON Layer. The generated JSON layer is used to interact with DOJO application.

Once the component is saved, OSGI runs in AEM which helps to generate a JSON. A Java service used to generate OSGI Bundles needs to be created to generate JSON from the authored component.
Any format of JSON can be generated as per DOJO requirement here. A sample JSON response is given below.

http://localhost:4502/content/home/_jcr_content/parsys/myothercomponent.data.json

Steps to integrate DOJO with AEM:


We need to move all DOJO Libraries to AEM.
DOJO related components and templates to be moved to respective folder of AEM.
The page level items are split into templates and components. Same DOJO structure needs to be replicated in AEM, where in page will be divided into header, body, footer components. Content section can hold any levels of other components. The page structure in AEM is shown below.


Any impact on AEM Project Maintenance with respect to DOJO
New versions of AEM are available so often. Upgrades can be done without much challenges since the front end is separated from backend.


--------------Similar Posts:----------
-------------------------------------------