Explain Adobe CQ5?
Adobe CQ5 (also known as Adobe Experience Manager) is a java based content management system from adobe. 
  • It is based on a content repository to store the content of a website and use JCR (java content repository) specification to access the content repository.
  • It uses Restful Apache Sling framework to map request url to the corresponding node in content repository
  • It uses powerful OSGi framework internally to allow modular application development. It means individual pieces of your application (called bundles in terms of OSGi) can be independently started and stopped.
  • It uses Apache Felix as the OSGi container. Therefore, different parts of cq5 can be independently started and stopped.
Explain life cycle of OSGI bundle?
Following are the life cycle states of OSGI:
Installed – The bundle has been successfully installed.
Resolved – All Java classes that the bundle needs are available. This state indicates that the bundle is either ready to be started or has stopped.
Starting – The bundle is being started, the BundleActivator.start method will be called, and this method has not yet returned. When the bundle has an activation policy, the bundle will remain in the STARTING state until the bundle is activated according to its activation policy.
Active – The bundle has been successfully activated and is running; its Bundle Activator start method has been called and returned.
Stopping – The bundle is being stopped. The BundleActivator.stop method has been called but the stop method has not yet returned.
Uninstalled – The bundle has been uninstalled. It cannot move into another state.

What is the technology stack used in cq5 or AEM?
Adobe CQ5 uses the following technologies:
  • JCR – Java specification for accessing a content repository JSR-283 specification jcr 2.0, cq5 uses its own implementation of jcr called CRX. Apache Jackrabbit is an open-source implementation of jcr 2.0 specification.
  • Apache Sling – RESTful framework to access a jcr over http protocol. It maps the request url to the node in jcr.
  • OSGi (Apache Felix) – Framework for modular application development using java. Each module called bundle can be independently started and stopped. OSGi container which provides implementation classes for OSGi framework.
Why a content management system is required in CQ?
Now a day’s websites are very dynamic in nature, content needs to be updated very frequently, so, it is easier to manage the content of such websites using a CMS.

What are the advantages of CQ5 over other CMS?
Below are the advantages of CQ5 over other CMS
  • Implementation of workflows for creating, editing and publishing of content.
  • Managing a repository of digital assets like images, documents and integrating them to the websites.
  • Usage of search queries to find content no matter where it is stored in your organization.
  • Setting up easily the social collaboration blogs, groups.
  • Tagging utility to organize the digital assets such as images.
What is a Template?
A CQ template enables you to define a consistent style for the pages in your application. A template comprises of nodes that specify the page structure.
What is a Component?
Components are re-usable modules that implement specific application logic to render the content of your web site. You can think of a component as a collection of scripts (for example, JSPs, Java servlets, and so on).

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

Which script you should include to display sidekick?
init.jsp should be included in our jsp or script file to display sidekick.

What is the use of EditConfig node in creating a component?
A cq: EditConfig node is used to define the behavior of the component

What are the basic SCR Annotations used for creating an OSGI component?
Basic SCR Annotation used for developing a component or service in osgi are:-
  • Component – defines the class as a component.
  • Service – defines the service interface that is provided by the component.
  • Reference – injects a service into the component.
  • Property – defines a property that can be used in the class.
Difference between Dialog and Design Dialog?
Both dialog and design dialog are used by the user to configure the component.
Design Dialog: of a component can be seen/edited in design mode of the page. Design dialog is present at template level so all the page of the template will share same design dialog.
Dialog: of a component is present at page level so each component instance will have its own dialog and information entered in dialog will be stored under content folder.

Where dialog and design dialogue data is stored?
Design dialog data is stored under /etc./designs folder.
Dialog data is stored under /content folder.

What is Adaptive Form? Explain Adaptive Form? What do you mean by Adaptive Form?
Adaptive forms, is used to break down a form into logical sections, basically it enables end users to focus on filling out the form. When we require to take input from user we use Adaptive Form.

What is Adaptive Document? Explain Adaptive Document? What do you mean by Adaptive Document?
Adaptive Document is used to display output to the end user. For example- a bank statement is an adaptive document as all its content remain same only name and amount changes. Basically, we put place holder text in Adaptive Document which are filled dynamically at run time.

What do you mean by Site Page?
A site is basically a website, where we can place an Adaptive Form, Adaptive Document or a static text.

How to put multiple files in CRX repository?
To put multiple files, we can use many tools that supports WebDAV Protocol Like Net Drive.

What are the different interfaces available in AEM?
The different interfaces available in CRX are:
  • CRX Explorer
  • CRX DE Lite
  • Apache Felix
  • Site admin
  • etc/Tools
How do you resolve a resource?
You can resolve using Resource Resolver which you can get from method getResourceResolver() and then use resolve() method to resolve a resource.

How do you adapt a resource?
You can adapt a resource to any another type using adaptTo() method, which accepts class type in which you want to adapt your resource. i.e. Page page = resource.adaptTo(Page.class);

What is the purpose of clientlibs?
It is used for adding site specific js and css files to the page and also third-party js and css files. jcr:primaryType of clientlibs folder is cq:ClientLibraryFolder. It takes cares of dependency management, merging files and minification of all js and css files stored under it.

How to connect to external Database in CQ?
To connect to external DB, we need to configure a connection pool by creating a node of type sling:OsgiConfig. Please have a look at below screenshot for connecting to hsqldatabase, but if you want to connect to other DB then properties values needs to be changed accordingly.

Explain the role of Dispatcher in CQ5?
In CQ5 Dispatcher has two main roles:
Caching – It is used to cache as much content as possible in the form of a static website which helps to reduce the continuous functioning of layout engine frequently for generating content when website data is dynamic.
Load-balancing – To increase the performance by load-balancing.

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

Explain the methods of Caching adopted by Dispatcher?
Dispatcher uses the following methods for caching:
Content Updates invalidates those pages whose content has been updated and replaces it with new content.
Auto-invalidation automatically invalidates the content parts which are out of date – without physically deleting any files.

How Dispatcher performs Load-balancing?
Performance Statistics –Dispatcher keeps statistics on how fast each instance of cq is responding to a particular url. Based on those metrics, dispatcher determines which instance of cq will fetch the quickest response for any request and relays the request to that cq instance.
Sticky Connections – when a user session is established, then all incoming requests from that user should be served by the same cq instance, because other cq instances cannot recognize the user session and generate personalized pages for him. Dispatcher makes sure all requests for user session are served from the same cq instance.
Increased fail-safe coverage - If the Dispatcher does not receive responses from an instance, it will automatically relay requests to one of the other instance(s)
Increased processing power -In practice this means that the Dispatcher shares document requests between several instances of CQ. Because each instance has fewer documents to process, you have faster response times.

Can I implement multiple Dispatchers in a setup?
Yes. In such cases, ensure that both the Dispatchers can access the CQ website directly. A Dispatcher cannot handle requests coming from another Dispatcher.

What are the differences between package and bundle?
Package: A Package is a zip file that contains the content in the form of a file-system serialization (called “vault” serialization) that displays the content from the repository as an easy-to-use-and-edit representation of files and folders. Packages can include content and project-related data.
Bundle: Bundle is a tightly coupled, dynamically loadable collection of classes, jars, and configuration files that explicitly declare their external dependencies (if any).

Explain life cycle of OSGI [Open Systems Gateway initiative] bundle?
OSGi is a framework which allows modular development of applications using java. A large application can be constructed using small reusable components (called bundles in terms of OSGi) each of which can be independently started, stopped, and also can be configured dynamically while running without requiring a restart.

What are the advantages of using OSGI?
Advantages of using OSGI are stated below:
  • Dynamic module system for Java.
  • Universal Middleware Category.
  • Helps applications to be constructed from small, reusable and collaborative components.
  • OSGi bundles can contain compiled Java code, scripts, or any contents to be loaded in the repository.
  • Helps the bundles to be loaded, installed. Reduces the complexity of the system
What are the difference between OSGi bundle and Normal Jar file?
OSGi bundles are jar files with metadata inside. Much of this metadata is in the jar’s manifest, found at META-INF/MANIFEST.MF. This metadata, when read by an OSGi runtime container, is what gives the bundle its power.
With OSGi, just because a class is public doesn’t mean you can get to it. All bundles include an export list of package names, and if a package isn’t in the export list, it doesn’t exist to the outside world. This allows developers to build an extensive internal class hierarchy and minimize the surface area of the bundle’s API without abusing the notion of package-private visibility. A common pattern, for instance, is to put interfaces in one package and implementations in another, and only export the interface package.
All OSGi bundles are given a version number, so it’s possible for an application to simultaneously access different versions of the same bundle (eg: junit 3.8.1 and junit 4.0.). Since each bundle has it’s own class-loader, both bundles classes can coexist in the same JVM.
OSGi bundles declare which other bundles they depend upon. This allows them to ensure that any dependencies are met before the bundle is resolved. Only resolved bundles can be activated. Because bundles have versions, versioning can be included in the dependency specification, so one bundle can depend on version junit version 3.8.1 and another bundle depend on junit version 4.0. In OSGi bundle, there will be an Activator.java class in OSGi which is an optional listener class to be notified of bundle start and stop events.

What are the differences between parsys and iparsys?
parsys – It is a placeholder called “Paragraph System”, where we can drag and drop or add other components or scripts at page level.
iparsys – It is inherited paragraph system, it is similar to parsys except that it allows to inherits parent page “paragraph system”.

What is sightly?
Sightly is an HTML templating language that was introduced in AEM 6.0. It is meant to take the place of JSP files and is the preferred templating system for HTML. The name sightly means “pleasing to the eye”, and its focus is to keep your markup beautiful and maintainable.

What is RESTful?
Representational State Transfer (REST) is an architectural style and an approach to communications that is often used in the development of web services. It relies on a stateless, client server, cacheable communications protocol. RESTful applications use HTTP requests to post data, read data, and delete data.The six architectural constraints of REST are: uniform interface, stateless, cacheable, client server, layered system, and code on demand.

What is extending a component?
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.

What Is Resource Mapping?
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.

What Design Patterns Are Used in Aem?
Since AEM is built using OSGI, many of the design patterns for OSGI are valid. Some of these design patterns are Singleton (Service), Adapter Service, Resource Adapter Service, and Whiteboard. Also, since AEM is modular, you should be able to use any design pattern in your application.

What Is Reverse Replication?
Reverse replication is the process of replicating content from publish environment to the author environment. In order to accomplish this, you need a reverse replication agent on your author instance that is configured to get content from the publish environment outbox.
Request to Download PDF

Post A Comment:

0 comments: