Adobe Experience Manager Interview Questions and Answers

Q1 : Explain briefly about AEM Architecture?
A : AEM is built within an OSGi application framework. OSGi is a dynamic module system for Java that provides a framework within which small, reusable standardized components can be composed into an application and deployed.
JCR (Java Content Repository) is an object database that provides various services for storing, accessing, and managing content. In addition to a hierarchically structured storage, common services of a content repository are versioning, access control, full-text searching, and event monitoring. The JCR provides a generic application data store for both structured and unstructured content. Filesystems provide excellent storage for unstructured, hierarchical content. Databases provide excellent storage for structured data due to transactional services and referential integrity functionality.
Apache Sling is a web framework that uses a Java Content Repository, such as Apache Jackrabbit or Adobe CRX to store and manage content. Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way. The Apache Sling framework is designed to expose a JCR content repository through an HTTP-based REST API. Both AEM’s native functionality and the functionality of any website built with AEM are delivered through this framework.

Q2 : Explain Multi-Site Manager?
A : Multi-Site Manager (MSM) enables you to easily manage multiple websites that share common content. MSM lets you define relations between the sites so that content changes in one site are automatically replicated in other sites.
For example, websites are often provided in multiple languages for international audiences. When the number of sites in the same language is low (three to five), a manual process for synchronizing content across sites is possible. However, as soon as the number of sites grows or when multiple languages are involved, it becomes more efficient to automate the process.

Q3 : What is Replication in AEM?
A : Activation/Publication of content is handled by the Replication Agents. Each Replication Agent replicates content from the current instance to one destination. So if you have 4 publish instances, you need 4 Replication Agents.

Q4 : What are the different ways of accessing content in AEM?
A : There are generally three ways to access content in CQ5:
  • Via the properties object
  • The properties object is an instance of the ValueMap (see Sling API) class and contains all properties of the current resource. For example: String pageTitle = properties.get(“jcr:title”, “NO TITLE”);
  • Via the current page object
  • The currentPage object is an instance of the Page (see CQ5 API) class, which provides some methods to access content. For example: String pageTitle = currentPage.getTitle();
  • Via currentNode object
  • The current node object is an instance of the Node (see JCR API) class, Since which provides access to content via the getProperty() method. For example: String pageTitle = currentNode.getProperty(“jcr:title”).getString();

Q5 : What is AEM?
A : Adobe Experience Manager (AEM), is a java based content management system that is offered by Adobe. It was previously called Day CQ5 but was acquired from Adobe in 2010. AEM is based on a content repository and uses the JCR to access the content in the repository. AEM uses the Apache Sling framework to map request URL to the corresponding node in the content repository. It also uses the OSGI framework to internally allow modular application development.

Q6 : What is difference between parsys and iparsys?
A : parsys – It is called “Paragraph System” component in which you can add other components at a page level.
iparsys – It is inherited paragraph system, which inherits parent page “paragraph system”.
The inherited paragraph system is a paragraph system that also allows you to inherit the created paragraphs from the parent. You add paragraphs to iparsys at for example, /content/geometrixx/en/products and as result, all the subpages of products that also have iparsys with the same name inherit the created paragraphs from the parent. On each level, you can add more paragraphs, which are then inherited by the children pages. You can also cancel paragraph inheritance at a level at any time.
Simply, iparsys is a parsys that inherits its content from the ancestor pages.
Q7 : What are the advantages of AEM over another CMS?
A : One big advantage of AEM over another CMS is how it integrates with other products from Adobe and with the Adobe Marketing Cloud. AEM comes built in with features like workflows to control content in the CMS, the use of search queries to find anything you are looking for, setting up social collaboration, tagging content, and a way to manage your digital content.
AEM also includes a way to manage mobile applications, mobile websites, e-commerce, and marketing campaign management.

Q8 :  What is the difference between OSGI Component and Service?
A :
  • All objects managed by OSGi container are components. You qualify components as services. This means that all services are components but not vice-versa.
  • Components can refer/call (using container injection – @Reference) other services but not components. In other words, a component cannot be injected into another component/service. Only services can be injected into another component.

Q9 : Why is a Content Management System (CMS) Required?
A : A content management system is a piece of software that is used to create and manage documents and Web sites. Many websites are dynamic, so their content needs to be updated frequently. In order to manage these changes efficiently, it is recommended that a content management system is used. Which is why AEM is a content management system.

Q10 : What is the role of Dispatcher in CQ5?
A : Dispatcher is CQ5 caching and/or load balancing tool. Dispatcher also helps to protect your AEM server from attack. It cache responses from publish instance, to increase the responsiveness and security of your externally facing published website.
Q11 : What is the Listener Property in AEM?
A : The listener property in AEM for a component is used to define what happens before or after an action on the component. This is added by using the “cq:listeners” node with a node type of “cq:EditListenersConfig”. The listener property can also be added to any widget in AEM. In order to add a listener to that widget you just need to add to add a node that is called “listeners” with a type of “nt:unstructured”. Then you just need to add child nodes to the “listeners” node that are events of that widget. You can find a list of events for each widget by searching CQ Widget API documentation.

Q12 : What is Reverse Replication in AEM?

A : Reverse Replication allows the transfer of content from the Website visitors (the publish instance) to the author instance for review, moderation, and/or spam check without violating any firewall rules.
Q13 : What is Sling?
A : Apache Sling is a web framework that uses a Java Content Repository, such as Apache Jackrabbit, to store and manage content.
Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way.
The embedded Apache Felix OSGi framework and console provide a dynamic runtime environment, where code and content bundles can be loaded, unloaded and reconfigured at runtime.
Q14 : What is a Publish instance?
A : A publish environment is usually located in the Demilitarized Zone (DMZ). This is the environment where visitors will access your website and interact with it; be it public, or within your intranet.
  • Holds content replicated from the author environment
  • Makes that content available to the visitors of your website
  • Stores user data generated by your visitors, such as comments or other form Submissions
  • May be configured to add such user data to an outbox, for reverse- replication back to the author environment
The publish environment generates your websites content pages dynamically in real-time and the content can be personalized for each individual user.
Q15 : What is RESTful?
A : REST (REpresentational State Transfer) is an architectural style, and an approach to communications that is often used in the development of Web services. The use of REST is often preferred over the more heavyweight SOAP(Simple Object Access Protocol) style because REST does not leverage as much bandwidth, which makes it a better fit for use over the Internet. REST’S decoupled architecture and lighter weight communications between producer and consumer make REST a popular building style for cloud-based APIs.Architectural Constraints:
There are six guiding constraints that define a RESTful system. These constraints restrict the ways that the server may process and respond to client requests so that, by operating within these constraints, the service gains desirable non-functional properties, such as performance, scalability, simplicity, modifiability, visibility, portability, and reliability. If a service violates any of the required constraints, it cannot be considered RESTful.
The formal REST constraints are as follows:
1) Client-Server: The Client-Server constraint requires that a service offer one or more capabilities and listen for requests on these capabilities. A consumer invokes a capability by sending the corresponding request message, and the service either rejects the request or performs the requested task before sending a response message back to the consumer
2) Stateless: The communication between service consumer (client) and service (server) must be stateless between requests. This means that each request from a service consumer should contain all the necessary information for the service to understand the meaning of the request, and all session state data should then be returned to the service consumer at the end of each request.
3) Cache: Response messages from the service to its consumers are explicitly labeled as cacheable or non-cacheable. This way, the service, the consumer, or one of the intermediary middleware components can cache the response for reuse in later requests.
4) Interface/Uniform Contract: The Interface constraint states that all services and service consumers within a REST-compliant architecture must share a single, overarching technical interface.
5) Layered System: A REST-based solution can be comprised of multiple architectural layers, and no one layer can “see past” the next. Layers can be added, removed, modified, or reordered in response to how the solution needs to evolve.
6. Code on Demand (optional): Servers are able to temporarily extend or customize the functionality of a client by transferring logic to it that it can execute
Q16 : What is the difference between a Dialog and a design Dialog?
A : A dialog is a key element of the component because they provide an interface for authors to configure and provide input to that component. This input will be stored at the page level in the jcr. A design dialog is a dialog that will only display when you are in design mode in AEM. The input that is received here will be stored at the template level and will be accessed across the whole site.
Q17 : What is an Author instance?
A : Author instances are usually located behind the internal firewall. This is the environment where you, and your colleagues, will perform authoring tasks, such as:
  • Administer the web properties
  • Input your content
  • Configure the layout and design of your content
  • Activate your content to the publish environment

Content that has been activated is packaged and placed in the author environment’s replication queue. The replication process then transports that content to the publishing environment.

An Author instance is the CQ5 installation content authors will log in to and manage pages. This includes: 1) creating, 2) editing, 3) deleting, 4) moving, 5) etc. In addition, it is the instance run mode you will use for development, as you can easily observe both Author and Publish views from this instance run mode.

Q18 : What are the different interfaces available in AEM?
A : Apache Felix Web Console – The Apache Felix Web Console is a simple tool to inspect and manage the CQ5 OSGi framework instances
CRXDE Lite – CRXDE Lite is the browser-based IDE.

Tools Console –The Tools console provides access to a number of specialized tools that help you administer your websites, digital assets and other aspects of your content repository.

Websites Console – The Websites console, also known as the Site Admin console, lets you create, view and manage websites running on your CQ5 instance. Through this console, you can create, copy, move and delete website pages, start workflows, and activate (publish) pages.

Q19 : Explain DAM Renditions?
A : The DAM allows you to create renditions of an image that include different sizes and versions of the same asset. You can use those renditions in the content of your website, and that can be helpful when you need to create thumbnails or smaller views of large, high-resolution images. When you are creating multi-device websites where Internet bandwidth is a varying concern, this feature becomes even more important. After all, you want to minimize the size of any files a site visitor has to download to view your site. Making your site load faster improves your search engine optimization and the user experience.

Q20 : What is extended a component?
A : Extending a component is when you want to create a new component that will not override a base component but will have the same features as the original so that you can change or build upon that component. In order to extend a component, you must set“sling:resourceSuperType” of the component to the base component you would like to extend. By doing this, you will inherit everything from the base component.

Q21 : Can you create a page without a template?
A :
Pages are usually created by selecting a template for the page when you create them in the Website console. However, a page can be created manually in the crxde by using the same properties that are created when you make a page in the Website console. For example, in crxde under the content folder, create a node with the following type “cq:Page” and save it. Then add a child node with the following type “cq:PageContent”. Then you can add the required properties to show any components you want to be displayed on the page. It is generally not good practice to create pages manually.

Q22 : What is Resource Mapping?
A : Resource mapping is used to define redirects, vanity URLs and virtual hosts for AEM. You can use resource mapping to prefix all requests with “/content” so the internal structure of the AEM site is hidden from your visitors. You can also use resource mapping to define a redirect so that all requests to the gateway page of your site are redirected to another site.

Q23 : Where does the Cache Directory exists for CQ5?
A : The Dispatcher uses a Cache Directory for caching static content. The cached documents are created in the root of a web-server.

Q24 : Why we need to include Global.JSP if we are creating a component in JSP?
A : The global.jsp script which Adobe provides by default declares Sling, AEM and JSTL taglibs to make component creation easy in AEM.

Q25 : What is the purpose of the Activator.JAVA File?
A : The purpose of the Activator.java file is that it is to be notified any time there are bundle start and stop events for that bundle. The Activator.java file is an optional listener class that is created when you create a bundle through crxde.