Distinction between service and part?
Service :
A service is AN OSGI part that may be researched from different OSGI elements.
Any java object is eligible to be a service
All the services in OSGI area unit elements
Services area unit maintained in commission register from that they will be researched
Component :
A part may be a java object whose life cycle is handled by the OSGI instrumentation.
Any java object is eligible to be a part
A part isn’t essentially AN OSGI service, however, to form it due by different elements it’s to be declared as service.
However, a category is formed out there to OSGI container?
By providing @component at the highest of the category declaration
Does one invariably would like @service and @component annotations for a category in OSGI?
No, a part might not be declared as AN OSGI service. However, there’s a demand to consume/look up for the part in another part it’s to be declared as @component.
Following steps ought to be taken so as to confirm part is configurableThe way to right a state of affairs wherever a part isn’t configurable on ConfigMgr?
The attribute-value metadata=true of @component annotation is accountable to creating the part configurable on ConfigMgr. that ought to be verified initial.
If the part is exploitation @reference to different service, they must be out there to the part and may are initialized
There ought to be configurable properties related to the part exploitation – @property or @properties
What’s the distinction between Live Copy and Language Copy?
A Live Copy is that the copy of blueprint/source with its live relation with the blueprint/source which suggests the changes in live copy and supply area unit half-track. supply are often hooked up or detached or reattached or set to the Live Copy. whereas a Language Copy may be a static copy of some or all the pages of the supply.
However Live Copy is connected to blueprint?
Exploitation Rollout configuration the Live Copy is designed to be updated mechanically once a update in blueprint happens.
MSM configuration.
Please refer – https://docs.adobe.com/docs/en/aem/6-0/administer/sites/multi-site-manager/msm-blueprints.html
A way to tack run modes?
Run modes are designed in following ways in which.
Provide the run mode as name of AEM jar file e.g. cq6_publish_p4503.jar. wherever publish is that the run mode.
Provide property – sling.run.modes in sling.properties file
Provide run mode with java argument for instance -Dsling.run.modes=publish
Provide -r that beginning the jar file exploitation batch file
However is that the configuration of AEM instance done per run modes?
you’ll outline a config (nt:folder) node within your project folder – /apps/projectA and outline configuration of a service/component by making a node sling:OsgiConfig under that having the total qualifying name like org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl. The configuration ought to be provided because the property of this node.
What are the benefits of mistreatment Sightly?
Following are the benefits of mistreatment beautiful over JSP.
Easy and no demand of knowing JAVA to use beautiful.
Protection against cross scripting.
Uses beautiful context to output information in correct format.
Clear separation of shopper facet and backside logic. No scriptlets.
Strong affiliation to Sling.
Has 2 ways in which of handling backend logic. WCM Use Java API and WCM Use Javascript API.
What’s markup language (display) context in Sightly?
The show context of a content refers to its location wherever it’s employed in the page. HTL is capable of distinctive the context of the output except just in case of CSS and JS wherever in if needed express context will be passed. This context is employed to forestall XSS security drawback. XSS is cross web site scripting attack on the web site, during which wrongdoer will inject the custom script and attack the positioning. HTL provides protection from this by introducing show context. HTL is capable of distinctive the context in link, text and title properties. There are many show contexts those will be used once needed. that are listed below.
text
html
attribute
uri
number
Why styles square measure completely different from clientlibs and why ought to clientlibs be outlined outside designs?
styles contain the main points of website level configurations of the elements beside it it will contain the clientlibs. However, once a clientlibs square measure organized in styles, it’ll be combined into one main.js/main.css and can be loaded when a page is named. However, there square measure cases once not all the scripts/CSS square measure required to be loaded on page as they’re not employed by the elements. In such cases, the clientlibs may be outlined beside the element and foreign in keeping with the need on the page. this may guarantee solely those shopper libs square measure referred to as that square measure needed by the page/components on the page and that they square measure simple to take care of because of their clear separation in keeping with the page.
What will clientlibs contain and what’s plant, dependencies and categories?
Clientlibs contain js.txt, css.txt and therefore the sources of Javascript and CSS.
Categories specify the clientslibs needed by the page
Dependencies specify the clientlibs those square measure needed to run the clientlibs outlined in classes and it means that there’ll be an additional decision created to load these clientlibs.
Embed specifies aggregating the clientlibs beside the outlined in classes, this implies they’re going to be hooked up to the most clientlibs.
Distinction between CRX2.0 and OAK (CRX3.0).
CRX2.0 is that the implementation of hare whereas OAK is that the implementation of hare OAK
Since CRX2.0 is implementation of hare, it uses JCR fully, whereas OAK uses JCR even as facades.
CRX2.0 has persistence manager (PM) that writes information as blob but, OAK has microkernel that writes information as per underlying sound unit.
CRX2.0 uses Lucene whereas OAK uses Solr.
CRX2.0 does not support bunch (i.e. distributed information across the servers) whereas OAK uses MongoDB like information that use bunch.
Distinction between CQ5.6 and AEM6.1?
Since AEM6.0 the bit UI is introduced that wasn’t there in CQ5.6
AEM6.1 uses OAK that five.6 uses CRX2.0 that is adobe’s implementation of JCR.
Since AEM6.0 beautiful is introduced as new nomenclature to facilitate the face developers with page definitions that reduces the need of getting developers with data of java.
CQSE servlet engine has been replaced by Eclipse groyne
Does one perpetually need @activate and @deactivate?
No. They indicate the ways needed for pre or post process of the components/services.
However, does one use a service in an exceedingly component?
the only approach is to use @reference annotation and use the name of the service.
If the service has to be used within a jsp, you’ll be able to use following syntax of code in scriptlets.
Com.adobe.cq.KeyService keyService = sling.getService (com.adobe.cq.KeyService.class);
Justify dispatcher configurations (especially /filter)
Please refer – Dispatcher Configurations
This Annotation is employed for injecting an OSGI service in OSGI component/service. Following ar the various attributes used at the side of the annotation.Justify @reference annotation.
name : just in case name of the service is totally different from the declared variable reference
interface Name : interface name for the service.
policy : It will be one in every of ReferencePolicy.STATIC or ReferencePolicy.DYNAMIC. wherever in dynamic means that, if the reference service burst, it’s guaranteed to the vocation component/service once it’s on once more dynamically while not the necessity of resetting the vocation component/service. By default, this price is often static, which implies the vocation component/service won’t be up till the reference is resolved.
target : to pick the documented service.
strategy : one in every of event or search. This price defines however the reference are going to be resolved.
However, sling will resource resolution?
There are 3 basic steps.
URL decomposition : The computer address is rotten in protocol, path, extension, selector, suffix and parameters.
ResourceType identification : victimisation the trail sling determined at that location in content repository the page resource ought to be searched for. From there, the sling:resouceType of the page is extracted. just in case sling:resouceType isn’t offered, sling:superResourceType is searched for. Once the resourceType is set say /apps/project/components/pages/componentA, the script is found within the element definition in apps folder.
Script resolution : Here the priorities to the scripts ar given as per the name, extension, methodology and kind, that is as follows.
selector + extension + jsp/html
selector + jsp/html
extension + jsp
node name + jsp/html
method + jsp/html initial GET/HEAD and so POST, DELETE etc. These names needs to be in capitals.