Tuesday, 12 December 2017

AEM With MongoMK - Options

We can have 2 types of MongoMK configurations for AEM Oak Clusters.

1) Failover for High Availability in a Single Datacenter




Here a primary MongoDB will be used for Read/Write. So the multiple Oak instances accessing a MongoDB replica set within a single data center.
This setup helps for high availability and redundancy in the event of a hardware or network failure

Major advantages are,

  • Scalability
  • High availability
  • redundancy
  • automated failover of data layer

One of the disadvantage of this setup is, there are some performance issues when compared with TarMK.

2) Failover Across Multiple Datacenters

Here multiple Data Centers are involved. Primary MongoDB will be replicated to secondary systems. So multiple Oak instances accessing a MongoDB replica set across multiple data centers. In this configuration, MongoDB replication provides the same high availability and redundancy as comapared to previous configuration but it also includes the ability to handle a data center outage.



Major advantages are,
  • Scalability
  • High availability
  • Redundancy
  • Automated failover of data layer

Final notes:
Always remember this. Adobe highly recommends TarMK as the default persistence technology for both the AEM Author and Publish instances, except in the use cases outlined here.

Foot notes:
What is MongoDB Arbiter. Why we need an Arbiter?

In software the CAP theorem says, "If there are equal number of servers on either side of the partition, the database cannot maintain CAP (Consistency, Availability, and Partition tolerance). An Arbiter is specifically designed to create an -imbalance- or majority on one side so that a primary can be elected in this case."

As per MongoDB site(https://docs.mongodb.com/v3.4/tutorial/add-replica-set-arbiter/) "Arbiters are mongod instances that are part of a replica set but do not hold data. Arbiters participate in elections in order to break ties. If a replica set has an even number of members, add an arbiter. Arbiters have minimal resource requirements and do not require dedicated hardware. You can deploy an arbiter on an application server or a monitoring host."

If you get an even number of nodes on both sides, MongoDB will not elect a primary and your set will not accept writes.

Videos on AEM & Persistence
AEM Persistence TarMk & MongoMK Series 1
AEM Persistence TarMk & MongoMK Series 2  AEM with TarMK
AEM Persistence TarMk & MongoMK Series 3  AEM with MongoMK
AEM Persistence TarMk & MongoMK Series 4  TarMK Vs MongoMK

Read More
Rule Engine integration with AEM


https://www.youtube.com/channel/UCbDTGaDneAbj_RCX27VE4cA/videos



Subscribe Our YouTube Channel Here.

AEM With TarMK - Options


We can have 3 types of TarMK configurations for AEM Oak Clusters.

1) Single TarMK Instance

A single TarMK instance runs on a single server. For Author instances, this is the default deployment method.





Major advantages are,
  • Simple
  • Easy to maintain
  • Better performance

The disadvantages:
  • Scalability is within the limits of server capacity
  • No failover capacity

2) TarMK Cold Standby

Here single TarMK instance acts as the primary instance & the repository from the primary is replicated to a standby, which acts as failover system.




Major advantages are,
  • Simplicity
  • Maintainability
  • Performance
  • Failover

The disadvantages:
  • Scalability is within the limits of server capacity
  • There is a manual task involved in detecting failure and failover to start working

3) TarMK Farm

Multiple Oak instances are involved and each Oak instance is running with one TarMK. All TarMK repositories are not in sync
TarMK Farm is the default deployment for publish environments.




Major advantages are,
  • Performance
  • Scalability for read access
  • Failover

Final notes:
Always remember this. Adobe highly recommends TarMK as the default persistence technology for both the AEM Author and Publish instances, except in the use cases outlined here.
Videos on AEM & Persistence
AEM Persistence TarMk & MongoMK Series 1
AEM Persistence TarMk & MongoMK Series 2  AEM with TarMK
AEM Persistence TarMk & MongoMK Series 3  AEM with MongoMK
AEM Persistence TarMk & MongoMK Series 4  TarMK Vs MongoMK

Read More
Rule Engine integration with AEM

Monday, 11 December 2017

AEM Microkernels - MongoMK vs TarMK



Latest AEM comes with Oak storage. Oak(Apache Jackrabbit Product) is a new JCR implementation with a completely new internal architecture.
There are two options for the AEM persistence layer back-end used by Oak : TarMK and MongoMK. Let us see the scenarios where each one is feasible and what are all the main differences.


TarMK Vs MongoMK


Adobe recommendation says we must consider MongoMK when we come across below metrics

  • Number of named users connected in a day: in the thousands or more.
  • Number of concurrent users: in the hundreds or more.
  • Volume of asset ingestion per day: in hundreds of thousands or more.
  • Volume of page edits per day: in hundreds of thousands or more (including automated updates via Multi Site Manager or news feed ingestion for example).
  • Volume of searches per day: in tens of thousands or more.

Prerequisites for considering MongoMK as persistence layer.

Once we identified MongoMK as persistence layer below factors are mandatory.
1. Ensure involving MongoDB architects/ Adobe MongoDB Specialists for designing the solution.
2. AEM Developers should work hand in hand with MongoDB developers to implement a successful solution.
3. For a better turn around time, always ensure to have Mongo DB Maintenance License.
4. Ensure the proposed design is validated by an Adobe Certified Experience Manager Architect to avoid any future issues.

Advantages of MongoMK in Authroing Instances

Horizontal Scalability Support – MongoMK supports multiple AEM instances share the same MongoDB instance.
Efficient Data Replication – MongoMK effectively delegates replication functionality to the MongoDB, which has mature model to maintain replica sets. Major advantage here is MongoDB replicas and AEM instances are independent each other.
Distributed Authoring Team Support – Content authoring across different geographical regions are supported by Mongo MK. At first data gets saved int the primary MongoDB and then gets replicated to the secondary DB replica sets.
Automated Failover Recovery – MongoDB supports automated failover. The efficient configuration can helps in automated system recovery from data center failure.

Advantages of TarMK in Publish Instances
Automated Failover Recovery - Efficient configuration of TarMK provides Automated recovery during system failures.
24/7 availability: Code changes are released on one data center, validate the release and then release it to the other data center. TarMK supports such rolling release efficiently.
Efficent upgrades: AEM Upgrades and patch fixes needs rolling release, thus TarMK provides better support.

Huge Data considerations: Which one to use?
If most of the Data in (TB) are binaries, TarMK is a good fit, and a data store on the file system. If the data (in multiple TB) is structured content / nodes, MongoMK is the better choice because we can shard the data.

Sharding can be found at MongoDB Documentation : Overview / Adobe Experience Manager 6.0 / Deploying and Maintaining / or The MongoDB Manual.





Final Notes:
TarMK is optimized for single node performance whereas MongoMK is designed for scalability and clustered deployments. Another factor is the volume of the data. Also keep in mind MongoMK setup/configuration/maintenance requires additional knowledge about MongoDB.

In my next blog I will be talking about MongoMK Recommended Deployments(AEM on MongoDB )
Videos on AEM & Persistence
AEM Persistence TarMk & MongoMK Series 1
AEM Persistence TarMk & MongoMK Series 2  AEM with TarMK
AEM Persistence TarMk & MongoMK Series 3  AEM with MongoMK
AEM Persistence TarMk & MongoMK Series 4  TarMK Vs MongoMK

Read More
Rule Engine integration with AEM


https://www.youtube.com/channel/UCbDTGaDneAbj_RCX27VE4cA/videos



Subscribe Our YouTube Channel Here.

Friday, 1 December 2017

Hybrid Content Management(HCM) & AEM

Hybrid Content Management system integrates cloud storage, content management services and/or features with on-premises content management software for store, share and manage enterprise content. Some of the decision factors which involved for selection of Hybrid Content Management are cost, mobility and new features.

Importance of Hybrid Content Management
Some of the recent data analyst group study revealed that within few years, majority of enterprises will manage the content using a hybrid storage model. This showcases the importance of new Hybrid AEM designs.



EFSS
Cloud file sharing is one of the factor that can drive hybrid CMS demand with AEM. Enterprise file sync and share services (EFSS) examples are Box, Dropbox, Citrix ShareFile, Office 365, G Suite.

Majority of companies are moving to a cost effective cloud based system, but factors of security are still a concern and some of the federal data laws asks for an on-premise storage(compliance, performance related, and security restrictions). Hybrid approach of synchronizing such existing on-premises storage with new EFSS services is ideal in this case, this shows the importance of Hybrid Content Management system.

Some of the laws which asks for a secure data system:
Health Insurance Portability and Accountability Act (HIPAA), the Sarbanes-Oxley Act (SOX), the U.S. Securities and Exchange Commission (SEC) and other compliances.

Hybrid cloud services(HCS)
Hybrid cloud services, a bridge between on-premise storage infrastructure and the cloud of choice, allowing customers to scale cloud storage as needed, use a blend of private and public clouds, and maintain control of their data with simple management tools. New AEM designs asks for this type of service integrations.

Example for HCS system: NetApp's Data ONTAP - storage operating system, can be used to connect Amazon S3 or EVS storage.

Synchronization
When we migrate the applications or data to a new system , common set of problem arises such as disruption of business operations, data loss and transitioning users to new processes.

When platforms are synchronized, content is automatically populated in the new system. Through Synchronization, users can still securely collaborate with external parties and across multiple devices. Synchronization helps to sync EFSS services to their existing platforms while preserving past investments and keeping their IT infrastructure intact.

Think before you act

There are some factors to be considered before we sync up AEM with hybrid systems. Our design should be based on the out come of below considerations.

1) Ensure  bi-directional sync : When you plug AEM into a hybrid system, ensure a bi-directional sync, this confirms both platforms are up-to-date.

2) Define an inter-operability :
Consider synchronization of user permissions, document versioning and metadata across systems so that the connection is seamless, secure and transparent to end-users.

3) Think Investments done & reduce cost :
Organization might have done huge investments on the existing system already. So consider this while defining the hybrid approach. Based on usage, sync only their most used active content, while keeping old data and archived information within premise & decommission aging servers.

4) Study the system
Do an impact study on the existing system and their rules like metadata, permission, user accounts management etc. Based on the study define the new hybrid approach.

Queries?

Let us know through the comment section


Tuesday, 26 September 2017

Ensuring the delivery & maintenance of an effective customer experience application through AEM

An effectively built AEM application can improve the revenue of a site remarkably. Some times it is seen that sites are delivered once, and not much improvements done later on or abandoned completely.

Right team mix for improving the application
Combining Targeting team and analytic team, an AEM site performance can be improved. The data/insight can be converted to make the site more powerful. To do this we have to have a vision for the improvement.

Digital Strategy/Vision

Ensuring effective targeted results, personalized experiences can be a good way to define the strategy. A right mix of various teams like service, sales and then enabling them for digital activation & engagement found most helpful in various scenarios. You need to be Agile - Think big, start small, acting fast.

How do we create a world class digital application? How do we mix the things in right blend?

1. Aim of maximizing search efficiency utilizing the tools like test & targeting -  for a better user search and engagement.
2. Commercial focus - Study the trend and incorporate in to the application.
3. Cross channel integration - Integrate with all possible channels.
5. Customer focus - Utilize test & target to improve content/ right content, improve application context.
6. Data & insights driven - Run your tests based on data for different campaign, different segments, different audience, different device, location on different device.
7. Continuous improvement - Continuous testing in 'multiple onsite location with various experiences'; possibly an in person testing. Try out various campaigns, promotions etc.
8. Optimize - Engage users(internal, external) in surveys and capture the data for further improvements - optimize.
8. Geo-location Consideration - serve the user based on his Geo, language and right content.
9. Use tool based improvement : machine based learning, automation etc

There are some ways to achieve continuous improvement and optimization.

Targeting -

  • On various Geo location, languages
  • On various device types
  • Various products like desktop app, mobile app,promotions etc.
  • Search - combine the test and target approach

Testing -

  • Creative - Effective UI testing
  • Promotion & offers - Geo location/ user specific based validations
  • Layouts - on desktop, mobile etc.
  • Segments - User segments
  • CTA's - Each and every CTA's


Tuesday, 1 August 2017

Dispatcher - Some points to remember


Dispatcher 
  • Dispatcher is a caching and load balancing tool for AEM.
  • Dispatcher acts as a firewall and helps to protect site from vulnerable attack.
  • Dispatcher is used in conjunction with a standard web server.


Why Caching & when caching does not work?
Any site performs well when it is served from a cache. Except dynamic data, everything else is recommended to be cached. There are cases where the caching does not work. For eg, get() request, when query parameters are available or no extension, response.setHeader("Dispatcher", "no-cache"), authentication header/cookie or any other cases where the dispatcher rules are not satisfied.

Better ways of serving dynamic content?
While AEM site implementation, the main aim would be caching all site content. When there are content to be served dynamically, we have to serve them through RESTFul service (Page Layout is still cached).

Dispatcher Vs CDN
CDN (Content Delivery Network) is globally distributed and serves request across balanced regions. But AEM Dispatcher resides with AEM and not globally distributed.

Cache invalidation from dispatcher

Below mentioned methods are common in invalidating cache from dispatcher.

From authoring

A replication agent is configured on the AEM author instance, which sends a cache invalidation request to Dispatcher when a new page is published. This invalidates the cache from authoring environment.

From publishing
In this scenario the publishing environment sends a cache invalidation request to Dispatcher when a published page is received.

Manual

There are cases when dispatcher cache needs to be invalidated without activation of a page. Such cases we can issue an HTTP request to the dispatcher. The HTTP request delete specific files from the Dispatcher cache.

Read More

Steps to implement any search technology
AEM Dispatcher, why it  is needed?
AEM Desktop App
Figure out the best search technology or tool
Steps to implement search in Solr
Quality of Search - fine tuning search implementation

HTL

HTL Intro
HTL Syntax
HTL Options
HTL Variables
HTL Literals
HTL Operators
HTL Use-API

Tuesday, 4 July 2017

Adobe Experience Manager (AEM) Desktop App installation


AEM Desktop app maps the AEM Assets to a network directory. This helps to view the AEM assets in Windows/Mac Explorer/Finder. The assets can also be edited using various image-editing apps. All changes are reflected immediately in AEM Assets and gets synced quickly.

Which version of OS supported by AEM Desktop App?
At present the Windows(Version 7 and 10) and MacOSX(10.10 or later)

Where to get installer?
Go to helpx.adobe site and access the path 'experience-manager/kb/download-companion-app.html'. Select the version which you are interested and download the app.

I am using previous version of AEM. Can I use the desktop app with older version of AEM?
AEM 6.3 supports the app directly without any service pack installations. Refer the download section for the service pack required for older version (6.2,6.1)

How does the desktop app sync the data?
AEM Desktop app saves files first in local system. Later, the upload to AEM Server happens on back end. This ensures that user is not interrupted on bigger uploads and all versions are maintained intact. There is also option to monitor the upload process using Desktop App upload monitoring dialog.

Installation steps
Download the installer.
Double click on .msi file (for Windows OS)



Follow the on screen instructions. (Change the drive in case if you want to install the app in other drive)



Connecting AEM Desktop App with AEM Instance
Select the AEM Desktop app from start
Enter the Connection root - your AEM Instance url > Enter 'Go'



Enter the user credentials, Sign In



On task bar we can see the AEM icon, clicking on this will give us options to work with AEM Desktop app



Options

  • To see the assets of connected host, click on 'Explore Assets'
  • To see any upload status, click on 'Show back ground upload queue status'
  • We can also forget, disconnect current connection.
  • Configuration includes , connect on application start & Launch application on startup.
  • Advanced options provides log info , clear cache.

Debug AEM Desktop App installer issues

There are cases where the app will not launch after installation.

1) Ensure other apps are not running in the same port. Close any such applications.
2) Ensure the bit locker in unlocked if you are using it.

Read More

Steps to implement any search technology
AEM Dispatcher, why it  is needed?
AEM Desktop App
Figure out the best search technology or tool
Steps to implement search in Solr
Quality of Search - fine tuning search implementation

Friday, 30 June 2017

Step by step tutorial on Creating Experience Fragments in AEM


In my previous blog, I have explained the basics of Experience Fragments in AEM. Here I will walk you through the process of creating an Experience Fragment and authoring it to a page. Remember Experience Fragments can be authored on third party systems too, for the demo I am using a test AEM page.

Steps

After loggin into AEM, click on 'Experience Fragments' , then from create button click on the 'Experience Fragment'. The folder option aloows us to categorise the Experience Fragments.



Once created, start filling out the details in properties section and 'First Variant'  as shown below.



On the 'First Variant' section select the template for the Experience Fragment. HTML fragment which I am going to select is a default provided by AEM.




Now select the created Experience Fragment, and click on edit option.



We will have authoring page opened for the Experience Fragment. We can author assets, components and variations for a fragment.



In assets section, I have authored an image ( We.Retail instore image).



In variations, we can click on 'create' to authore variations.



Start filling the variations. The template can be any default Experience Fragment template.



Below given various menu options on the Experience Fragment authoring.



Once done with Experience Fragment creation, we will go ahead and author the fragment on a page. For this I have created a test page.
On this page, author an Experience Fragment as a component('Drag COmponents here').



Once this is done we can see the Experience Fragment is rendered on the test page as shown below.

Click me to watch The YouTube demo video



Thursday, 29 June 2017

AEM Experience Fragment Basics


What is an experience fragment?
An 'Experience Fragment' is a collection of components with its own content and layout.

  • Each Experience Fragment is based on a template which gives a structure.
  • Each experience fragment has one/many components with its own layout.
  • Each experience itself makes sense.
  • Created with intention of reuse, re ordered, resized.
  • Experience Fragments works on Caas model, with each fragment can be created with multiple variations.


Scenarios when an AEM Experience Fragment to be used?
There are times when we need to replicate same type of page section in other pages. 'Experience Fragments' can help us saving time in this case. Also cases like AEM is used as headless CMS, where AEM to be just used as content storage, not for delivery. In this case AEM Experience Fragment will be available for a third party rendering system for consuming.

Cases when we need multiple version of content, Experience Fragments are a good option.

Additional notes:

Experience Fragments allow to manage sections of experiences that can easily be reused and distributed. They are template based and allow live copy relationship. At present AEM 6.3 supports Experience fragments to html5 web templates, Pinterest and Facebook templates. Custom templates can be created if required.

Tuesday, 27 June 2017

How to create a Content Fragment? step by step tutorial

Content Fragment helps to author content without creating a Page. Content Fragments are useful in displaying content across channels like web pages, mobile apps or campaigns.

What are all, a Content Fragment can hold?

Content Fragment has well defined content structure, which can hold text segments and references to assets, likes images, videos etc.

Related contents
AEM Leading to head less CMS?
AEM Content Fragment output as JSON
AEM 6.3 Content Fragments Basics
How to create a Content Fragment? step by step tutorial
Create & Access the content fragment programmatically

Creating Content Fragments

To start with , go to Assets > Files > Click on Create , Content Fragment



Select the template as shown(Default Simple Fragment Template). We can either have our new templates created based on the content requirement or use the default one.



In 'Properties' section fill up the basic details of this fragment.



Advanced section will have an auto populated name. We can edit it in case we need our custom property/url here.



Click on 'Create' will show you the success message as shown below. On clicking 'Done' will show the new Content Fragment.



The created Content Fragment can be downloaded as shown below. The downloaded fragment can have all related information selected while creation. Unzipping the fragment displays the folder contents.



Unzipped file will have a metadata file with all information.



There are many options for a Content Fragment once created. The header bar will have options like download, checkout, edit, manage tags, adding collections publish, un-publish etc.



Edit options for a content fragment is quiet flexible, through which we can update the textual content, inserting other assets, uploading content from a document etc. We can see a live update of content with word count, character count etc during content entry.



On selecting and editing the dialog gives 'Create variation' option. Through which we can create different version of content based on our requirement. These variations are used across different channels.



Clicking the 'folder' icon provides us the option to add collection to this content fragment.



On clicking 'metadata' section helps to update the metadata associate with the fragment.



Once all updates are done, save the content fragment to ensure all changes are submitted to crx. The new content fragment created can be found at path '/content/dam'.

YouTube demo videos for Content Fragments:
         AEM 6.3 Content Fragments Basics
         Content Fragments AEM
         View Content fragment output in aem

Create & Access the content fragment programmatically

Content Fragment helps to create content without referring a page. This fragments can be used to showcase the content across various channels.
You can read multiple blogs on the same here.
AEM Leading to head less CMS?
AEM Content Fragment output as JSON
AEM 6.3 Content Fragments Basics
How to create a Content Fragment? step by step tutorial
Create & Access the content fragment programmatically

Programmatic creation, access, modification of Content Fragment

To create a content fragment, we need 'create' API reference from 'com.adobe.cq.dam.cfm.
ContentFragmentManager'.

Once we have the import, use below code to create a content fragment programmatizally.

//reference the Content Fragment Manager
@Reference
private ContentFragmentManager fragmentManager;

private void myCreateFun() {
    /** fragmentManager.create helps to create a content fragment
        parent - The location where the content fragment should be created (for eg. "/content/dam/fragments")
        template - the content fragment template to refer while creating the new fragment
        my-test-fragment - name of the fragment
        My Test Fragment - title of the fragment **/
     
    ContentFragment myFragment = fragmentManager.create(parent, template, "my-test-fragment", "My Test Fragment");
 
}

Programmatically accessing a content fragment

We need 'com.adobe.cq.dam.cfm.ContentFragment' API reference to access a content fragment

//Get the resource of content fragment as below.
Resource fragmentResource = resourceResolver.getResource("/content/dam/fragments/my-test-fragment");

//Adapt it to a fragment resource
if (fragmentResource != null) {
    ContentFragment fragment = fragmentResource.adaptTo(ContentFragment.class);
    // the resource is now accessible through the API
}


Programmatically accessing elements from Content Fragment

Iterator<ContentElement> elements = fragment.getElements();
while (elements.hasNext()){
ContentElement element = elements.next();
//your action on element
}

Programmatically Accessing Content Fragment metadata:

Map<String, Object> getMetaData();


Programmatically Accessing Content Fragment variations:

Iterator<ContentVariation> variations = element.getVariations();

while(variations.hasNext()){
ContentVariations variation = variations.next();
//do the variation process here
}

Programmatically Accessing  Content Fragment elements/variations by its name

ContentElement title = fragment.getElement("title");
ContentVariation mobileAppVariation = title.getVariation("mobile-app");

Programmatically Accessing Content:

String content = element.getContent();
String contentType = element.getContentType();

Programmatically Modifying Content Fragment content
element.setContent("Content", "text/plain")

Programmatically Modifying Content Fragment metadata
void setMetaData(String name, Object value) throws ContentFragmetException

YouTube demo videos for Content Fragments:
         AEM 6.3 Content Fragments Basics
         Content Fragments AEM
         View Content fragment output in aem

Thursday, 22 June 2017

AEM Content Fragment output as JSON

AEM Content Fragments can be accessed through JSON file URL's. This helps to verify the data while authoring.

To ensure the JSON format is enabled follow below steps:

To enable the content fragment JSON, we need to enable /system/console/configurations > AEM Content Service Feature Flag > (Select) Enable AEM Content Services check box.


YouTube demo videos for Content Fragments:
         AEM 6.3 Content Fragments Basics
         Content Fragments AEM
         View Content fragment output in aem

Say we have created 'this-is-my-frag' Content Fragment,

We can see the complete content using infinity json as url.
http://localhost:4502/content/dam/this-is-my-frag.infinity.json

If we want to generate its output as caas way below url helps.
http://localhost:4502/content/dam/this-is-my-frag/_jcr_content.caas.json

{
    "_children": [{
        "name": "jcr:content",
        "title": "This is my frag",
        "path": "/content/dam/this-is-my-frag/jcr:content",
        "type": "dam:AssetContent",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content.caas.json"
    }]
}

Now when we load the children from above _jcr_content.caas.json

{
    "title": "This is my frag",
    "dam:assetState": "processed",
    "description": "Hello there",
    "contentFragment": true,
    "lastFragmentSave": "Wed Jun 21 2017 15:29:39 GMT+0530",
    "dam:relativePath": "this-is-my-frag",
    "_children": [{
        "name": "renditions",
        "path": "/content/dam/this-is-my-frag/jcr:content/renditions",
        "type": "nt:folder",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/renditions.caas.json"
    }, {
        "name": "related",
        "path": "/content/dam/this-is-my-frag/jcr:content/related",
        "type": "nt:unstructured",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/related.caas.json"
    }, {
        "name": "associated",
        "path": "/content/dam/this-is-my-frag/jcr:content/associated",
        "type": "sling/collection",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/associated.caas.json"
    }, {
        "name": "metadata",
        "path": "/content/dam/this-is-my-frag/jcr:content/metadata",
        "type": "nt:unstructured",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/metadata.caas.json"
    }, {
        "name": "model",
        "title": "Simple Fragment",
        "path": "/content/dam/this-is-my-frag/jcr:content/model",
        "type": "nt:unstructured",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/model.caas.json"
    }]
}

Now we can iterate through the children in above json and get corresponding renditions, related, associated, metadata, model

For eg: model gives below json
{
    "title": "Simple Fragment",
    "version": 2,
    "description": "A simple fragment, containing one single element and no predefined variations",
    "precreateElements": true,
    "_children": [{
        "name": "elements",
        "path": "/content/dam/this-is-my-frag/jcr:content/model/elements",
        "type": "nt:unstructured",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/model/elements.caas.json"
    }, {
        "name": "variations",
        "path": "/content/dam/this-is-my-frag/jcr:content/model/variations",
        "type": "nt:unstructured",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/model/variations.caas.json"
    }]
}

where the variations from above link loads

{
    "_children": [{
        "name": "variation2",
        "title": "variation2",
        "path": "/content/dam/this-is-my-frag/jcr:content/model/variations/variation2",
        "type": "nt:unstructured",
        "href": "http://localhost:4502/content/dam/this-is-my-frag/_jcr_content/model/variations/variation2.caas.json"
    }]
}

This way we can iterate through the content fragment JSON.

https://www.youtube.com/channel/UCbDTGaDneAbj_RCX27VE4cA/videos



Subscribe Our YouTube Channel Here.


Related Posts

AEM Leading to head less CMS?
AEM Content Fragment output as JSON
AEM 6.3 Content Fragments Basics
How to create a Content Fragment? step by step tutorial
Create & Access the content fragment programmatically


AEM 6.3 Content Fragments Basics


AEM 6.3 Supports Content Fragments to deliver content as a service.
Experience Fragments enables Experience-as-a-Service, where the CMS controls partial-page rendering, or Hybrid CMS, solutions that let you push your content to any channel — just as headless systems do — using a delivery tier that connects all those channels and shares data between them.

What is a content fragment?

  • Contains one or more Content Elements,
  • Content can have one or more  Variations.
  • Content fragment can be created based on templates which define the structure.
  • Content fragments are a type of new assets.
  • Content Fragment use existing Assets functionality & fully integrated with assets.
  • Content Fragments are well tied with Translation workflows, metadata schema.
         YouTube demo videos for Content Fragments:
         AEM 6.3 Content Fragments Basics
         Content Fragments AEM
         View Content fragment output in aem

A content fragment groups renditions, related items, associated items, metadata, model, elements, variations etc in a single Content.



Can we add a Content Fragment to a page?

Yes it can be added to a page using default content fragment component as other components.

Which is the API service for Content Fragments?
Latest AEM provides server side API com.adobe.cq.dam.cfm to programmatically interact with Content Fragments.



Related Posts

AEM Leading to head less CMS?
AEM Content Fragment output as JSON
AEM 6.3 Content Fragments Basics
How to create a Content Fragment? step by step tutorial
Create & Access the content fragment programmatically