Non-Fiction, Informative, Educational

AEM Developer eBook

A Coursebook on AEM Developer

by Heaton Ludie

  • English
  • 139 pages
  • 2026
  • SamEnrico

A Coursebook on AEM Developer

Formats

Free sample

Chapter 1: The Developer's Launchpad--Every great journey begins with a single step, but that step is meaningless without a map. For the aspiring Adobe Experience Manager (AEM) developer, the landscape can appear daunting—a dense forest of acronyms (OSGi, JCR, Sling, HTL), architectural patterns that seem to defy conventional web development wisdom, and an enterprise platform that has evolved over two decades. Yet beneath this complexity lies an elegant, logical system that, once understood, becomes not just manageable but genuinely empowering to work with.This chapter is your map. It establishes the foundational knowledge every AEM developer must internalize before writing the first line of production code. You will learn the architectural pillars of AEM, the role of each component in the technology stack, how requests flow through the system, and where your custom code belongs.

More importantly, you will develop a mental model of AEM that will guide your decisions for years to come—a model that transforms confusion into clarity and guesswork into deliberate, informed action.Adobe Experience Manager is not a monolith. It is an orchestra of open-source and proprietary technologies, each playing its part: OSGi provides the modular runtime, Sling maps HTTP requests to content resources, the Java Content Repository (JCR) stores everything, and Apache Oak implements the JCR specification. Understanding how these pieces harmonize is the difference between a developer who copies code from forums and a developer who architects solutions. By the end of this chapter, you will be the latter.The AEM Technology Stack: Layers of Understanding Picture a seven-layer cake, each layer resting on the one below and supporting the one above. The AEM technology stack follows this pattern, and every AEM developer must understand at least the top five layers to work effectively.Layer 1: The Operating System (Linux/Windows)At the base sits the operating system.

In production, AEM almost always runs on Linux (Red Hat Enterprise Linux or Amazon Linux), though Windows is supported for development environments. This layer handles process management, file I/O, and networking—concerns typically managed by operations teams rather than developers, though understanding resource limits (open file limits, memory allocation) becomes important during performance troubleshooting.Layer 2: The Java Virtual Machine (JVM)Above the OS runs the Java Virtual Machine. AEM is a Java application, and all AEM code compiles to Java bytecode that executes in the JVM. Developers need to understand JVM memory management (heap, non-heap, garbage collection) and the impact of JVM arguments on performance. The standard AEM startup script sets heap size (-Xmx), permgen or metaspace size (-XX:Max Metaspace Size), and garbage collection tuning parameters.Layer 3: OSGi Framework (Apache Felix)Inside the JVM runs an OSGi framework—specifically, Apache Felix.

OSGi (Open Services Gateway initiative) is a Java specification for modular, dynamic applications. It allows AEM to load, unload, and update code bundles (JAR files) while the application continues running. This hot-deployment capability is essential for development productivity and zero-downtime production updates. The OSGi framework manages bundle lifecycles, resolves dependencies between bundles, and hosts the service registry where bundles publish and consume services.Layer 4: Apache Sling (The Web Framework)On top of OSGi sits Apache Sling, a web framework that implements a unique but powerful principle: the first segment of a request URL after the domain maps to a node in the repository. Sling is the engine that transforms HTTP requests into JCR resources and selects scripts or servlets to render responses.

Unlike traditional MVC frameworks that dispatch to controllers based on route tables, Sling uses the repository itself as the routing mechanism—a design that enables unprecedented flexibility.Layer 5: Java Content Repository (Apache Oak)At the core of everything is the Java Content Repository, implemented by Apache Oak. The JCR (JSR 283) defines an API for hierarchical, structured content storage. Think of it as a filesystem combined with a database: hierarchical like a filesystem (nodes and properties), queryable like a database (via SQL2, XPath, or native queries), and transactional with full ACID compliance. Oak is the specific implementation used in AEM, replacing the earlier Jackrabbit implementation.Layer 6: AEM Application Layers (Platform, Sites, Assets)Above the repository sits the AEM application itself. The platform layer provides replication, workflows, user management, and eventing.

The Sites application adds components, templates, page management, and publishing. The Assets application (DAM) provides digital asset management, metadata, renditions, and smart tagging.Layer 7: Delivery Infrastructure (Dispatcher, CDN)Finally, the presentation layer includes the Dispatcher (Apache HTTP module for caching and load balancing) and Content Delivery Networks (CDNs) that cache content at the edge. These components are not part of AEM itself but are essential for production performance.Understanding this stack is not academic. When a request is slow, this mental model tells you whether to check the Dispatcher (layer 7), the AEM application (layer 6), the repository (layer 5), or the JVM (layer 2). When a deployment fails, you know to examine OSGi bundle resolution (layer 3).

The stack is your diagnostic tree.OSGi: The Modular Heart of AEMBefore OSGi, enterprise Java applications were typically deployed as monolithic WAR files. A change to any part of the application required rebuilding the entire WAR, redeploying it, and restarting the application server. Development cycles were slow, and production deployments required downtime. Worse, dependency conflicts were common: one component required version 1.2 of a library, another required version 1.5, and the application server could only provide one version.OSGi solved these problems through modularity. An OSGi application is composed of bundles—JAR files with additional metadata in the META-INF/MANIFEST.MF file.

Each bundle declares:Exported packages: The Java packages this bundle makes available to other bundles.Imported packages: The Java packages this bundle requires from other bundles.Services: The OSGi services this bundle provides or consumes.The OSGi framework resolves these dependencies at runtime, ensuring each bundle receives the correct version of each package. If a bundle's dependencies cannot be satisfied, the framework refuses to start the bundle and reports the resolution error. This prevents the "JAR hell" that plagued earlier Java applications.The Bundle Lifecycle Every OSGi bundle transitions through several states during its lifetime:INSTALLED: The bundle has been installed but not resolved. Its dependencies have not been verified.RESOLVED: Dependencies have been satisfied. The bundle is ready to start but not yet active.STARTING: The activator's start method is executing.

The bundle is initializing resources, registering services, or starting background threads.ACTIVE: The bundle is fully operational. Its services are available, and it is responding to requests.STOPPING: The stop method is executing. The bundle is releasing resources and unregistering services.UNINSTALLED: The bundle has been removed from the framework.Why This Matters for AEM Developers Almost every custom piece of Java code in AEM lives in an OSGi bundle. When you write a Sling Model, an OSGi service, or a workflow process, you are creating an OSGi component that becomes part of a bundle. When you deploy using Maven, the AEM Project Archetype configures the build to produce OSGi-compliant bundles.The Felix Console (/system/console/bundles) is your window into OSGi.

It shows every bundle installed in your AEM instance, its state, its symbolic name, and the version. When a bundle fails to activate, the console shows the unresolved dependencies or exceptions. This is often the…

This is the end of the free sample. Get the eBook to keep going. Buy now

About this book

A Coursebook on AEM Developer

Details

Author
Heaton Ludie
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Informative, Educational
Released
2026-05-11
Pages (approx.)
139
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Heaton Ludie

See all