Interview Deck Flashcards
Explain the AEM stack (architecture).
Java Platform– AEM is a Java web application. It requires server-side Java Runtime Environment.
Granite Platform– Adobe’s open web stack. It forms the technical foundation on which AEM is built.
OSGi Framework– OSGi is dynamic software component system for Java. In this system, an application is composed of an assemblage of bundles that can be dynamically installed, started, stopped, and uninstalled without shutting down the application.
CQSE Servlet Engine– AEM includes the built-in CQSE servlet engine which runs as a bundle within the OSGi framework.
JCR Content Repository– CRX content repository is an implementation of Java Content Repository
Specification (JCR). All data within AEM is stored here.
Sling Content Delivery– AEM is built using Sling, a Web application framework based on REST principles that provides easy development of content-oriented applications. Sling uses CRX Content Repository as its data store.
AEM Modules– WCM, DAM, Workflow, etc.
Customer Applications– Websites that run on AEM.
What are the major tech stack upgrades in AEM since CQ?
Jackrabbit Oak – offers improved performance and scalability compared to JCR
Sightly – new templating language that enforces separation of markup from logic and offers XSS protection
Touch UI – built using Coral UI framework, it supports touch enabled devices
Search– default search engine has been upgrade to Apache Solr
What is headless AEM?
It allows content stored in the JCR to be retrieved and used without rendering the content within an AEM content page.
What are the layers in OSGi?
Bundles– jar components with extra manifest headers
Services– holds the service-side of the framework;
keeps the service registry and manages it
Life-Cycle– manages and keeps track of the frameworks and bundles lifecycle state; used to install/uninstall framework objects and start/stop them
Modules– the bundle space; holds the bundles that are installed on the framework
Security– optional layer; when active, validates the bundle signatures and controls component access rights; extends the Java 2 security architecture
Execution Environment– bottom layer on which bundles live; selected to fit the underlying hardware or operating system
What are the benefits of OSGi?
Reduced complexity - bundles hide internals, expose via services
Reuse - Modular code
Dynamic Updates - Easy deployment, keep the system running
What are the differences between JAR and bundle?
Both have pom files Jar: Packaging tag of "jar" in pom.xml Consume by calling methods Bundle: Used in OSGI runtime Packaging tag of "bundle" in pom.xml Consume by calling services Bundle is a jar with extra manifest headers.
What are the differences between package and bundle?
Both have pom files
Package:
Contains content, files, or even other bundles
Deployed into the Package Manager
Packaging tag of “content-package” in pom.xml
Bundles:
Jar with extra manifest headers
Install via Felix Console
Packaging tag of “bundle” in pom.xml
How do you install an OSGi bundle using the CRX repository?
Copy the bundle into the /apps/install folder.***
Create the project directory, then install the bundle from the package manager
What is REST principle?
Uniform Interface– individual resources are identified using URLs but are different from the representation sent to the client
Stateless Interactions– none of the clients context is to be stored on server side between request; all necessary information to service the request is contained in URL, query parameters, body, or headers
Cacheable– clients can cache the responses, but only on those defined as cacheable to prevent client from sending inappropriate data
Client-Server– clients and server are separated from each other and neither side is concerned with the other.
Layered System– client cannot tell if it’s connect to the end server or intermediate; intermediate layer helps enforce security policies and enable load-balancing
Code on Demand– optional constraint where server temporarily extends functionality of a client by the transfer of executable code
Differences between REST and SOAP.
REST:
Representational State Transfer
Uses URI for business logic
Is architectural style
Inherits security measures
SOAP:
Simple Object Access Protocol
Uses service inference for business logic
Uses own security
Only XML data
Describe the Apache Sling script resolution process.
HTTP Request Content resolution Get resource type Locate script Match script Include options. Execute script.
What is a sling model?
Sling models are annotation driven POJOs (Plain ol’ Java Object) which are mapped automatically from Sling objects like resources, request objects and OSGI services. The use of annotations helps reduce complexity/lines of code.
Declared with @Model(adaptables = Resource.class)
Explain how sling is content-centric.
Each HTTP request is mapped onto content in the form of a resource node, instead of static file path resolution.
What are the commonly used Sling APIs?
ValueMap – easy way to access a resource’s properties
ResourceResolver– defines service API which may be used to resolve Resource objects
ResourceResolverFactory - used to access ResourceResolver instances
ResourceProvider– API for providers of resources
Resource– pieces of content on which Sling acts; an Adaptable to get adapters to other types
ResourceWrapper– wrapper for any Resource delegating all method calls to the wrapped resource by default
ResourceUtil– provides helper methods for dealing with resources
Do you use JCR or Sling Resource API to update individual resources, and why?
JCR is lower level and slightly faster, but Sling is higher level which makes it more abstract and easier to code.
Best practice is to use higher level apis when possible.
After updating the resource using Sling Resource API, what must you do to finish?
Commit the changes and close the resource resolver.
Which provider service scans CRX repository for artifacts and provides them to the OSGi installer?
Sling JCR Installer
What is the JCR?
Java Content Repository - Content repository that combines features of the traditional relational database with those of a conventional file system:
Hierarchy– content can be addressed by path
Semi-structured content– can store structured documents, like XML, (which can have variable fields)
Access Control and Locking– can restrict access to different parts of the content hierarchy based on policies or ACLs; also supports locking of content to prevent conflicts
What kind of indexing does AEM now use?
Oak indexing which is not enabled by default. AEM also supports: Solr Apache Lucene Property Index Traversal Index
You want to install bundles through CRX only in the author instance. Which folder name can you use for that purpose?
install.author
You want to request a JSON representation of the content. What do you have to do with the request?
Change the extension to .json
Why we need TAR Compaction?
If we are using Tar files as the storage, it tends to grow in size and starts claiming disk space every time when data is created or updated as data in tar files are never overwritten rather it keeps adding new versions. To mitigate the same, AEM has garbage collection mechanism which is known as ‘Tar Compaction’ to remove the unused data and reclaim the disk space.
Explain David’s content model.
David Model:
Data First, Structure Later. Maybe.
Drive the content hierarchy, don’t let it happen.
Workspaces are good for versioned JCR projects.
Beware of Same Name Siblings.
References considered harmful.
Files are Files.
IDs are evil.
What’s the difference between Event Handler and Event Listener?
EventHandler:
Used at the Sling level
Watches for Sling properties?
EventListener:
Used at the JCR level
Watches for node changes
What is the difference between Live Copy and Language Copy?
Live Copy
Copy of specific site content which automatically updates along with the original source
Inherits content from its source page
Use if you intend to reuse content at multiple locations
Language Copy
Copy of an existing site that is to be translated to another language; no live relationship
One time copy of the content
Use if you intend to translate content
If you are creating a site with multiple locales that must be synchronized, which should you pick and why?
Use Language Copy. While it does not have the same live relationship that Live Copy has, you can update the Language Copy. Use Update & Translate workflows to synchronize changes between the source and language copy.
What are Rollout Configurations?
Rules/instructions that determine which properties will be synchronized/always carried out on a deployment, how and when.
What is workflow?
Workflows are designed to coordinate and automate steps needed to complete a task. It can automate experience manager activities and interact with AEM assets.
What are the different types of steps present in workflow?
Process step – executes an ECMA script or calls an OSGi service to perform automatic processing
Participant step – enables you to assign ownership for a particular action; requires the owner to manually acknowledge the step
Container step – starts another workflow model that executes as a child workflow
OR, AND, and GOTO Split Step – Logical operator branching steps
What are examples of inbuilt workflow present in AEM?
DAM MetaData Writeback – This workflow manages XMP write-back to the original binary and sets the last modified date in jcr. To propogate metadata changes to select renditions of the asset, add the name of the renditions to the XMP Writeback Process workflow step of DAM Metadata WriteBack workflow. By default, this step is configured with the original rendition.
Approve for Adobe Campaign – Workflow handling the edition, review and approval of a newsletter to be sent using Adobe Campaign.
DAM Update Asset – By default, upon image upload to DAM, one of the many processes inside this workflow is to generate a web rendition of the uploaded image. The default setting of CQ’s Image API is to always render the web-enabled version of the uploaded image. This combination helps to limit the size and quality of the image displayed, thus reducing the page load time.
Download Asset
DAM Parse Word Document
What is dialog, design dialog, and cq:dialog?
cq:dialog: Page level configuration TouchUI name = cq:dialog Stored under page's jcr:content Get value from properties object jcr:primaryType is nt:unstructured
dialog: Page level configuration Classic UI name = dialog Stored under page's jcr:content Get value from properties object jcr:primaryType is cq:Dialog
design_dialog: Template level configuration Design Mode name = design_dialog Stored under design page located under /etc/design/default Get value from currentStyle object jcr:primaryType is cq:Dialog
What is the use of the EditConfig node?
EditConfig nodes are used to edit the configuration of components. Examples include adding properties, child nodes, listeners, and customizing the layout.