AEM Learnings 101

Sriharsha Chekuri
3 min readFeb 12, 2020

--

Few years ago our team was tasked to migrate websites from a traditional database driven CMS to Adobe Experience Manager. It took me a while to recognize the paradigm shift that is needed in development thought process when building websites in Adobe Experience Manager (AEM) versus a traditional MVC framework. I would like to highlight the important things I learned when planning/designing websites in AEM.

Uniform Resource Locator (URL). Plan ahead.

In traditional application the end URL is routed to Controller, then a model is returned to the View. The view takes the model data and displays content to the user. URL paths can be easily modified with few changes in Controller code or in config files depending on the framework.

An understanding of AEM Architecture stack outlined below is needed to get an understanding of the URL resolution with AEM

AEM Stack

Contrary to MVC Application, end URL in AEM is resolved to a path in AEM Java Content Repository (JCR), which is a file system like storage. Based on the properties of the content at the given path, Sling Resource Resolution takes place and appropriate component/code is chosen to render content to the user. The end URL you see in the browser is how in most cases is content stored hierarchically in the AEM JCR repository. Hence we must have a predefined plan on structure of content/URL. Changing the URL structure once content is created will need content migration to the new structure.

Also, it’s suggested not to have more than 1000 pages under one folder for performance reasons and content authors will find it difficult to navigate in the Authoring UI. For example, if all the blogs are under /blog folder, content can be organized by year wise folders like /blog/2019 etc. depending on the volume of content.

Cache as much as possible.

AEM Publish servers are not designed to handle real world traffic. An improper caching strategy will quickly consume all the resources on Publish servers. A standard AEM deployment has the following components.

Typical AEM Setup

It’s essential to cache content on webserver/apache & Content Delivery Network (CDN) like Akamai. Cache as much as possible closest to the user. Caching in CDN is better than caching at webserver.

For pages with dynamic content like blog listing pages set a proper TTL time. ACS Commons to the rescue here. TTL can be specified for give paths or pattern and AEM Dispatcher module will handle the invalidation of content on webservers. For clearing the CDN cache, a custom replication agent is needed. Nate Yolles has created AEM replication agent for flushing the cache on Akamai. Same code can be extended for other CDNs like Cloudflare.

Getting started on AEM is challenging and there are always multiple ways to get things accomplished in AEM. Good luck for your AEM journey.

Cheers.

--

--