Saturday, 8 June 2019

What is Configuration Browser in AEM?

Developers follow the approach given by Adobe to work with Editable Templates, ContextHubs and Content Fragments. But many are not sure the reason behind why there needs to be configuration browser for AEM.

We have given a video explaining what is configuration browser, why it is required and if we dont create / configure it how it affects the AEM Site.



More Like This:

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

Tuesday, 4 June 2019

AEM Site Performance Issues - Root Cause - Analysis - How to Fix

When we say the AEM site performance is hit?

Once the production deployment of an AEM site is done, and if we find slowness in any of the things like pages are loading slow, creation or editing of pages are slow, AEM response times are not fair, AEM is not responding to some requests,  request.log on AEM shows slow response times etc. we can assume there is some issue with the performance of the site.



Common reasons for slow performance

Below given some of the possible reasons for AEM site performance issues;
  • Improper design - Not a deeply though solution
  • High CPU utilization due to long running requests such as slow searches, write-heavy background jobs, moving the whole branches of site content, etc.
  • Application code - Error prone code
  • Memory Issues - Not an efficiently written
  • Insufficient server sizing or incorrect architecture - For a huge site, we did not use mult author multi pubish setup
  • Indexing Issues - Not done a proper indexing
  • Lack of caching - No efficient caching
  • Wrong disk I/O configuration - Improper infra configuration
  • Memory sizing - Not used enough memory
  • Network bandwidth and latency - Not having proper bandwidth allocated
  • Replication Issues - Improper configuration which leads to blockage
  • Ineffective or inadequate maintenance
  • Lack of a Content Delivery Network

How do we analyze the root cause of a performance issue?
  • Check CPU utilization for any AEM process eating much memory
  • Study the request.log file for detailed data
  • Collect thread dumps and analyze them
  • Workflow checks, version checks, audit checks
  • Analyze caching strategies implemented at the AEM dispatcher
  • Check maintenance related to Oak repositories
  • Validate asset guidelines
  • Check indexing and review the jcr queries for 1. Poorly restricted (or scoped) queries 2. Large result set queries 3. Index-less queries

Some of the Tools for validating and fixing AEM performance:

  • JMX Console in AEM : Enables you to monitor and manage services on the CRX server.
  • JConsole : that comes with JDK - helps to find memory leaks, thread deadlock etc.
  • Any other profilers : like YourKit(CPU and memory profiling tool) which recommends the better usage of code
  • Memory analyzer tool - MAT :  Eclipse's MAT is a set of plug-ins for the Eclipse IDE. Helps for heap dump analysis & memory problems in the application
  • Apache Bench : Helps to identify memory leaks, selectively analyze response time.
  • JMeter : Load and functional tests.
  • JProfiler : In-depth CPU and memory profiling.
  • SonarQube : A code validation tool for better code

How to make sites perform better?
  • Ensure you are carrying out regular maintenance
  • Improve back-end service calls to a fail safe state.
  • Optimize AEM client libraries - Embed client libraries, Minify them
  • Cache JavaScript and CSS for long periods of time
  • Optimize Indexes so that querying works better
  • Modify the jcr queries to scope limited and efficient.
  • Install the recommended AEM service packs, cumulative fix packs and hot fixes:
  • Follow the Assets best practices.
  • Allocate enough RAM to avoid IO saturation
  • Enable transient workflows - this avoids manual purging of workflows
  • Tune the Oak Repository as per best practice

Hold on; Before you go for any big changes as part of performance improvements, have a backup plan, Disaster recovery plan do itfirst before you try to fix the performance.

More Like This:

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

Friday, 24 May 2019

How to fix JSON deprecated API error in AEM? Alternatives of Deprecated JSON API in AEM

When ever we need to retrieve a value from JSON using its key, JSONParser is a better and easy approach.

We know in AEM 6.3, all json related operations are deprecated from package org.apache.commons.json.

For eg  JSONParse, JSONObject.

Let us try to fix this using GSON. AEM has default GSON library to parse the JSON or for JSON processing & conversations.

How to convert a String to JsonObject using Gson library.

Below is the common syntax to use GSON in java code. To use this ensure your pom.xml has the GSON dependency added.

The pattern to use GSON is,

Gson gson = new Gson();
YourClass yourClassObject = new YourClass();
String jsonString = gson.toJson(yourClassObject);


Below given a real case example.

Say we have a multifield in AEM which has a JSON string array as,

String personalData = {"name": "Alex","age":"27","details": "User says at Washington"}

// Now we need to create a Java model class as given below. Remember to match the fields(keys in JSON with string variables )

public class PersonalData {
    public String name;
    public String age;
    public String details;
}


//Now in our sling model or relevant class, the GSON invocation could be something like;

Gson gson = new Gson(); 
PersonalData persondata = gson.fromJson(personalData, PersonalData.class);


Another simple example is
Say we have a multifield as shown below.

String organization = {"org": "Google"}

// Our Java model class
public class OrgData {
    public String org;
}

//invoking the method
Gson gson = new Gson(); 
OrgData orgdata = gson.fromJson(organization, OrgData.class);

Another example using JSON Element

package com.aem.core;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

//This class takes a json string and parse it to get its value from a key.
/*Say we have a json {"key":"value"}
Then to get its 'value' easily without using Java regular expression or patterns
We can use this approach
*/

public class MyJsonParser {

//You can run this code directly to test how it works
    public static void main(String[] args) {
        Gson gson = new Gson();
        String jsonString = "{\"key\":\"value\"}";
//Create JSON element from JSON String
        JsonElement element = gson.fromJson(jsonString, JsonElement.class);
//Fomr a Json Object from element       
        JsonObject jsonObject = element.getAsJsonObject();
//Below line takes the 'key' from json and print its 'value'
        System.out.println(jsonObject.get("key").getAsString());    
    }
}
 

We can also use Jackson for JSON parsing in AEM.

More Like This:

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

Monday, 20 May 2019

Storage concepts in AEM 6.5

AEM server holds both content and binary data. For a better deployment isolation and organizing data considering performance and scalability of AEM, the binary data(for eg media files) can be stored independently from the content nodes by configuring it.


Generally binary data is stored in a data store, whereas content nodes are stored in a node store. Both 'data stores' and 'node stores' can be configured by updating persistent identifier (PID) in OSGi configuration.

Say when we are working with large number of binaries, Adobe recommends to use an external data store instead of the default node stores. This provides better performance.

The external data store can be File Data Store, Amazon S3 Data Store, Azure Data Store which works well when we need to store binaries like media files.

Node store can be of two types 'Segment Node' Store & 'Document node' store. Segment node store is the basis of Adobe's TarMK implementation & document node store is the basis of AEM's MongoMK implementation in AEM6x.

Configuration PID's for each storage types are given below.

Document node store
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config

Segment Node Store
org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config


File Data Store
org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config

Amazon S3 Data Store
org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config PID

Azure Data Store
org.apache.jackrabbit.oak.plugins.blob.datastore.AzureDataStore.config

Summary: Thus by selecting the recommended configurations based on requirement, we can achieve a high performing AEM instance.

Note: The concepts are same for all AEM 6x versions, except a few minor configuration changes.


More Like This:

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

HTML Template language updates which needs to be observed with AEM 6.5

HTML Template language updates which needs to be observed with AEM 6.5

While working on AEM 6.5, we can use a set of new HTL Features which are listed below.

1) There is  a new operator 'in' which helps to check availability of an item in strings, arrays and objects.

Usage:
${'c' in 'abc'}
${10 in myArray}
${'b' in myObject}

2) A new data-sly-set to define variables in HTL

Usage:
<sly data-sly-set.title="${currentPage.description}"/>${description}

3) More control for the list iteration using parameters 'begin,step,end'

Usage:
<h2 data-sly-repeat = "${currentPage.listChildren @ begin =1 , step =2 }"> ${item.title} </h2>


4) data-sly-unwrap improvement with identifiers

Usage:
<div data-sly-unwrap.isUnwrapped="${myFirstCondition || mySecondCondition}">
text <span data-sly-test = "${isUnwrapped}"> is unwrapped </span>
</div>

5) Now htl supports negative numbers
So while working with AEM 6.5 , dont forget to utilise this improvements as part of HTL development.

Demo of the new HTL features: 

 

Sample Code given below,

template.html


<!DOCTYPE html>
<!--/* Calling the server-side JS script for all view logic that Sightly cannot do */-->
<html data-sly-use.logic="logic.js">
<head>
    <!--/* Expressions allow to easily output variables */-->
    <title>${currentPage.title}</title>
    <meta charset="utf-8">
    </head>
    <body>
    Hello
        <!--/* To allow some HTML, use the following context option */-->
        <p>${properties.jcr:description @ context='html'}</p>
        ${'a' in logic.myObject}
        ${10 in logic.myArray}
        ${'d' in logic.myString}
       
        <div data-sly-unwrap.isUnwrapped= "${'d' in logic.myObject }">
            text <span data-sly-test = "${isUnwrapped}"> is unwrapped </span>
        </div>
        <p data-sly-use.logic="logic.js" data-sly-unwrap>#### World</p>
     
        <!--/* Iterating over any collection or iterable is easy */-->
        <ul data-sly-list="${logic.myPage.listChildren @ begin =2 , step =1}">
            <li><a href="${item.path}.html">${item.title}</a></li>
        </ul>
            <ul data-sly-list="${logic.myPage.listChildren}">
                <li> ${item.title} </li>
            </ul>

    </body>
    </html>
   
    logic.js
    ----------
        use(function () {
   
    return{
        myString: "abcd",
        myArray: [10,100,1000],
        myObject: {
        a: "Hello",
        b: "World"
        },
        myPage: pageManager.getPage('/content/we-retail/us/en')
    };
});

More Like This:

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

How do we access the Magento product detail to AEM? - Magento AEM integration

There are cases where we need to access magento data to AEM. AEM By default supports magento plugin - AEM Extension to import data from Magento.

In some scenarios, Magento exposes the products over API's. In this case we can access the products from Magento using below explained method.

Note: In this example, the Magento API authorization is based on bearer token. The API response is in JSON format.




Java code - to invoke the API and access the products.
-----------------------------------------------------

 //Create a HTTP connection management
 DefaultHttpClient httpClient = new DefaultHttpClient();

 //HttpGet helps posting client data the server.
 HttpGet getMagentoRequest = new HttpGet("Magento API url");

 //Add authorization token as part of request header
 getMagentoRequest.addHeader("Authorization", "Bearer TOKEN");

 //Invoke the API to retrieve response
 HttpResponse response = httpClient.execute(getMagentoRequest);

 //Read the response using buffered readerr
 BufferedReader magentoBr = new BufferedReader(new InputStreamReader((response.getEntity().getContent())));

 String retrievedResult;
 String resultString="" ;

 //capture the entire response in sting format
 while ((retrievedResult = magentoBr.readLine()) != null) {
                resultString = resultString + retrievedResult;
            }
           
           
//Parse the JSON data present in the string format
JSONParser parse = new JSONParser();
//Type caste the parsed json data in json object
JSONObject jsonData = (JSONObject)parse.parse(resultString);

How to retrieve the JSON data?

Say we have below JSON fromat which has primary child and secondary child elements

{
    "id": "file",
    "value": "File",
    "popup": {
        "menuitem": [{
                "value": "New",
                "onclick": "CreateNewDoc()"
            }
        ]
    }
}



//get the individual item from JSON
String ID =  (String) jsonData.get( "id" );
//Now append ID on your bean class object


//Store the JSON object in JSON array as objects (For level 1 array element)

            JSONArray menuItems = (JSONArray) jobj.get("menuitem");
           
            for(int i=0;i<menuItems.size();i++)
            {
            //Store the JSON objects in an array
            //Get the index of the JSON object and print the values as per the index
            JSONObject childItem = (JSONObject)menuItems.get(i);
            String value = (String) childItem.get("value");
            //Now append value on your bean class object
            String onclick = (String) childItem.get("onclick");
            //Now append onclick on your bean class object
            }
           
           
Once we execute the code, we will have the parsed JSON Data available in Bean class.

Now in your HTL, iterate over the bean class objects and display the response.

Debug AEM 6.x using eclipse

Note: This is a tested approach and works for AEM 6.4

Step 1:
Add the Remote Debugging JVM Parameter


In Start.bat update 'CQ_JVM_OPTS' by adding below code

-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

Click on image to see it big

Step 2: Start a remote debugging session in Eclipse

  • Open Eclipse then choose Run > Debug Configurations.
  • Right-click 'Remote Java Applications' and select 'New'.
  • Select the AEM project under 'Project'.
  • Under 'connection Properties' enter the host. For local dev machine it is 'localhost'.
  • Enter the port configuration of the jvm parameter defined in step 1. In the example, we have given port number as 8000.
  • Save the configuration.
  • Now double-click the newly saved configuration in the Debug Configurations screen.

Demo Video

More Like This:

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

Wednesday, 24 April 2019

What is Assets HTTP API?

We know that AEM Supports 3 ways of headless delivery in JSON format.

1) Content Services
2) Assets HTTP API
3) Custom Sling Model Exporter


The Assets HTTP API exposes folders and assets from AEM to external world over Restful HTTP APIs.




The API is exposed at http://[server:port]/api/assets and allows all CRUD operations on Assets, including binary, metadata, renditions, and comments.

At present the Assets HTTP API supports the following operations:
  • Retrieve a folder listing
  • Create a folder
  • Create an asset
  • Update asset binary
  • Update asset metadata
  • Create an asset rendition
  • Update an asset rendition
  • Create an asset comment
  • Copy a folder or asset
  • Move a folder or asset
  • Delete a folder, asset, or rendition

Note: Ensure the property 'Filter Methods' l: POST, PUT, DELETE are selected at location > system/console/configMgr>'Adobe Granite CSRF Filter'.

Monday, 8 April 2019

Making SPA's(Single Page Applications) SEO(Search Engine Optimized) Friendly in AEM

AEM now supports SPA SDKs which helps to create Single Page Applications using Angular and React JS. A Single Page Application is a java script code which injects new content from a server into a page without the entire page getting reloaded in the browser. This gives the advantage of faster loading websites.


If we dont take care of SEO from beginning, we may have to put extra efforts to go back and fix the indexing issues later.

Why indexing required?

User comes to the site through various search engines and indexing site pages with this search engines are one of the major task during project implementation.

What is SEO?

Search Engine Optimization is the way which the search engine find the content in a website and index it. We need to ensure our site pages are SEO friendly by following SEO Guidelines. Every search engines like Google, Bing, Yahoo, DuckDuckGo having their own bots to crawl the site content.

This post is written considering the users are having a basic understanding about SEO technology.

Why SPA is not readily SEO Friendly?

The advantage of SPA is, they can even update entire pages or part of the page without making another request to the server or even changing the URL. In this case an entire HTML is not getting rendered. AJAX calls are used to load parts of the page using JSON snippets. SEO expects a fully built page for indexing.

Methods to make SPA s SEO Friendly

Below given some of the methods identified to make SPA pages SEO friendly. This solely depends on the usecase too.

Pretty URLs: Never use 'hashes' in URL's. Always go for SEO friendly pretty URL's instead.

Canonical URL's: 
Here a complete duplicate site would be created within the same url to ensure that crawlers would index the site pages properly.

Pre-rendering: In this scenario, we can run the app before deploying it, capture the page output and replace all HTML files with the captured output. Typically this is achieved with a headless browser (For e.g. Firefox Headless Mode, PhantomJS etc). Pre-rendering is a good choice because there is no additional server load, and therefore faster and cheaper than server side rendering.

Server-Side Rendering (SSR): In this case, pages that display constantly changing data which must be loaded dynamically at load time, or for pages that have suser-specific content. Note here, Server hosting the website should have Node enabled to implement server side rendering.

HTML pushState: HTML 5 provides a History API called 'Push State'. The pushState method takes three arguments, a data 'state' object, a 'title' string, and a 'url'. When the pushState method is called, the url which is passed to it will appear in the browsers url window. This method can be used as an alternate indexing options for the SPA pages.


What are all the new features of AEM 6.5?

Below given the further details about new features.
 
AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features

Monday, 1 April 2019

Cloud Manager for AEM New features

Below given the major new features in AEM cloud manager released in January 2019

1) CI/CD Pipeline Enhancements

- Ability to schedule deployment trigger
- API integration through Adobe I/O
- Code quality check on non -production pipeline
- Creation of additional non -production pipeline

2) Reporting Dashboard
- Monitoring interactive dashboard, including visibility into
    i) basic system metrics
    ii) SLA reports
    iii) Security health status

3) Release Upgrades
- Evaluation of current code complexity
- Remediation through sandbox environment prior to upgrade
- Execution through blue-green deployment
 
What are all the new features of AEM 6.5?

Below given the further details about new features.
 
AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features

Foundation updates in AEM 6.5 which a developer should be aware of

AEM 6.5 is going to be released on 8th April 2019 for general public.

Foundation:

AEM 6.5 - Java 11 Support

- New support for the Oracle JDK 11 "Long Term Support" releases (LTS)
- Oracle JDK Java 8 releases are also supported (LTS)
- Java 9, Java 10 and future non - LTS releases are not supported

AEM 6.5 Permission Management

- New permission management user interface for a consistent and simplified user experience
- Consolidated features previously distributed across multiple places (CRXDE Lite, User Admin, CRX Explorer)
- Simplified and advanced views
- Principal and repository views.

AEM 6.5 New Features Video



What are all the new features of AEM 6.5?

Below given the further details about new features.
 
AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features


Storage concepts in AEM 6.5   

HTML Template language updates which needs to be observed with AEM 6.5

New Features in AEM 6.5 Forms

In this blog, we will understand about the latest features as part of AEM 6.5 forms

AEM 6.5 Forms are built with consideration of,  Mobile First Forms & Personalized Correspondence.

- Support new use cases with interactive communications
- OOTB Forms components for AEM Sites SPA
- Simplified OSGI workflow authoring
- Enhanced Adobe Sign integration


AEM Forms 6.5 - Output & Customer Communications
->Additional Capabilities to support new use cases are given below,

- Support for new layout and templates
- Introduction of new charting styles to address new wealth management use cases
- Auto generate web channel to retain Print Channel layouts
- Usability Enhancements , Drag and drop from FDM tree to bind variables and fields.

AEM Forms 6.5 - Simplified Workflow Authoring
-> Support for variables and re-usability of workflows

- Simplified Debugging with standardized workflow logs
- Support for custom data types in meta data
- Reduce dependency on ECMA scripts and manually populate meta data across workflow steps
- Introduction of an OOTB ability to declare variables/ meta data upfront and read and populate them across workflow steps
- Increased re-usability of workflows via invocation using multiple forms.

AEM Forms 6.5 - Enhanced Forms and Adobe Sign Integration
-> Support for cloud signatures in Adaptive Forms

- Enables compliance with most rigorous legal and regulatory requirements.
- Signing using Digital ID's based on PKI infrastructure based digital certificates

AEM Forms 6.5 - Embed Forms and Documents in AEM Sites SPA
->Embed Adaptive Forms and interactive Communications web channel in SPA based AEM Sites

- Offer compelling experiences to website users through Single Page Applications
- OOTB components o embed online forms and documents in SPA Sites.
- Aligns with AEM sites framework to support SPA based sites.

What are all the new features of AEM 6.5?

Below given the further details about new features.
 
AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features

AEM 6.5 Specific new features in Assets section

Let us see the assets specific new features in AEM 6.5

AEM Assets 6.5 - Adobe Asset Link

-> The new and improved Adobe Asset Link helps to discover , use and edit assets from AEM directly within Creative Cloud desktop apps.

- We can place assets in your designs, download a copy
- Add new assets to AEM directly from CC apps
- Search AEM Assets & CC Assets, access collections, preview assets & Basic metadata directly from CC apps - PS , ID, AI
- Check out. in assets stored in AEM assets directly from PS, ID and AI into CC Assets
- Keep work in progress assets and final production assets in separate locations
- Single Sign On with your Creative Cloud SSO credentials for access to digital assets from AEM Assets

AEM Assets 6.5 - AEM Desktop App Update
-> Open and edit any asset type in any desktop application (Including non- Adobe assets)

- Search for assets directly from the desktop app and find them
- Preview assets and open them in the associated desktop application
- Browse assets from AEM in a dedicated desktop app built- in browser - limit the need to use Finder/Explorer
- Edit assets locally and upload changes to AEM when done
- Upload files and folder hierarchies to AEM with progress monitoring

AEM Assets 6.5 - Adobe Stock Integration
-> Search and license Adobe Stock assets from AEM UI

- License and save original assets from Adobe Stock to AEM
- Search , preview and save Adobe Stock assets directly from AEM Assets Web UI

AEM Assets 6.5 - Remote DAM for Sites Authoring
This is a very useful feature which was expected from quite long time.

- This helps sites authors to leverage assets from Remote DAM for authoring web pages
- Configure connection with Remote DAM on cloud
- Search seamlessly on Remote DAM from content finder
- Drag & Drop remote assets into local sites page editor like a local asset
- Preview web pages with Remote DAM assets
- Further edit remote DAM assets on Sites instance with a local copy
- Publish pages with remote DAM assets

AEM Assets 6.5 Brand Portal Enhancements:Asset Distribution

- Enhances user reporting (login, share)
- Browse and search enhancements
- File acceleration for downloads
- Guest Access
- Ability to schedule publishing
- Dynamic Media video support
- Configurable URL
- Folder hierarchy support for multi brand, team usage
- Original asset access restrictions
- Additional admin configurations
- Performance enhancements

AEM Assets 6.5 - Brand Portal - Asset Sourcing

- Direct folder share with external agency from DAM
- Upload capability on Brand Portal for sourcing brand, campaign assets from external agencies, teams
- Publish to DAM for review and multi-channel campaign usage
- New contributor role for external agency user persona
- Admin configurations to control upload sizes

AEM Assets 6.5 - User Experience Enhancements

- New permission management tool in touch UI
- Accessibility Enhancements
- Improved bulk operations with 'Select All' Capability

AEM Assets 6.5 Dynamic Search Facets
->There is a new dynamic faceted search for a faster experience

- This feature helps in providing dynamic filters and search results count is provided at filter / facet level

AEM Assets 6.5 - Visual Search
->Adobe Sensei powered search for finding visually similar assets

- Find similar action in card, list and detail view
- Leverage search facets to further refine search results

AEM Assets 6.5 - Dynamic Media + Sensei
->ML/AI Extended to video. This is a notable feature as part of AEM 6.5

- Video Smart Crop - Automatically re-crop a video to new aspect ratios while preserving the points of interest inside that video
- Best Frame Selection- Automatically recommending optimal thumbnails when customers upload a video
- Video Smart Tags - Automatically add suggested tags based on the video's content.

What are all the new features of AEM 6.5?

Below given the further details about new features.
 
AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features

AEM 6.5 Site related new features

Let us see the key features with AEM 6.5 Sites:

AEM is growing and improving as a best hybrid CMS now by providing or sharpening features like content services. AEM 6.5 provides extended support for hybrid Content Services now.

Major site specific features are given below.
  • - Core components - Extensions, Live Coding, Maven Archetype
  • - SPA Integration - support for react & Angular Javascript frameworks
  • - Direct content API - Content Fragments support in Assets HTTP API
  • - Experience Fragment export to Adobe Target

AEM Sites 6.5 - Core components & Maven Archtype
->There are new core components added in AEM 6.5. Creating a new or extending existing site in AEM - with or without SPA JavaScript framework is more flexible now.

- Total 20 easy to style & production ready components that are configurable in Template
- New components added as part of AEM 6.5 are: Teaser, Tab, Carousal & Separator
- The step by step tutorial to get started is now enhanced.
- Added live coding support with https://aemfed.io/

AEM 6.5 Sites - Support for react and Angular - SPA Editor
-> A better experiences built with SPA Javascript frameworks

- SPA Editor for in-context editing, composition, configuration and layout the experiences
- Step - by Step tutorial to learn how to build new or more existing SPA into AEM
- Javascript SDK for React & Angular to annotate existing code to make it work in AEM
- Server side rendering of SPA JS code for accelerated delivery and improved SEO
- New Maven Archetype for headless/SPA projects

AEM Sites 6.5 - Content Fragments in AEM HTTP API
-> Delivery of structured AEM Content over direct content API, which broaden AEM support of headless CMS Scenarios

- Enablement of output in JSON format
- Extension of AEM Assets HTTP API
- HTTP REST API for Content Fragment Delivery (Full CRUD Support Later)
- Bulk delivery of fragment structure and content

AEM Sites 6.5 Content Fragments DIFF View & Annotations
-> Editorial content governance for AEM Content Fragments

- Review content changes in content fragments across versions
i) side-by-side view, accessible in Assets admin Timeline view
ii) Ability to revert to previous version
- Annotate text in content fragment editor
i) View in rich text editing mode as well as editor default view
ii) Also visible in Assets Admin Timeline view

AEM Sites 6.5 - Export Experience Fragments
-> AEM 6.5 provides advanced experience personalization using AEM and Adobe Target with support for hybrid (HTML) and Headless (JSON) scenarios

- Define re-usable experiences in AEM and in Target activities
- Markup delivery by Target, referenced media assets by AEM
- Ability to support Target HTML offers and JSON offers
- Ability to delete Experience Fragments and associated Target offers from within AEM.


AEM Sites 6.5 - New Translation Enhancements
-> Increasing the efficiency of content translation with AEM through automation and improved 3rd party integrations

- Allow translation projects to use AEM Project masters
- Allow updating translated pages with updates in 3rd party Translation Memory
- Allow exporting translation jobs in JSON Format
- Auto approve translation jobs
- Auto - delete translation launches


What are all the new features of AEM 6.5?

Below given the further details about new features.

AEM 6.5 Site related new features

AEM 6.5 Specific new features in Assets section

New Features in AEM 6.5 Forms

Foundation updates in AEM 6.5 which a developer should be aware of

Cloud Manager for AEM 6.5 New features

Thursday, 14 February 2019

What is Sling Model Exporters?

Sling Models

Sling Models are business objects that represents sling resources or sling requset objects in AEM. In other way, Sling Models let you map Java objects to Sling resources.

Sling Models Exporter

Sling Model Exporters helps to export the model as a different Java object (serialized into a different format such as JSON) by adding annotations to Sling Model. The model is programmatically exported by calling the ModelFactory method exportModel().

Jackson exporter
 
Jackson exporter which is used in Sling allows to convert Sling Model into a Java Map object. Jackson JSON exporter helps exporting Sling Models as JSON objects, which can be accessible from other third party web service applications, Java script application etc.

Sling Model Exporter is available from Sling Models version v1.3.0. 

Pictorial representation of Sling Model Vs Sling Model Exporter

Click on image to see it big


Can I use Sling Model Exporters with versions prior to AEM 6.3?

Yes AEM 6.3 onward no extra dependencies required to use Sling Model Exporters.

But versions prior to AEM 6.3 requires installation of below bundled packages from,
Sling > Downloads
  • Models API 1.3.0+
  • Models Implementation 1.3.0+
  • Models Jackson Exporter 1.0.0
  • AEM 6.2 Communities/Livefyre - FP2

How to add exporter framework to an existing sling model?

1) Add a resource type to a model,

Add below line in @Model code block of Sling Model.

resourceType = "[The type of the resourcse which we are requesting]";

2) Add a new annotation,

@Exporter ( name = "jackson", extensions = "json")

Associate a model class with a resource in SlingDocumentation here

After building the code, invoke the resource with selector model.json

This will bring back the response in JSON format and the response is picked from the getter methods in the sling model class.

Sling Exporter Documentation

Demo Video
 

Read More:

Sling Model Vs WCMUsePOJO

Sling Models vs WCMUSEPOJO

AEM component back-end logic was shifted over years from JSP’s to WCMUse class to WCMUsePOJOs and then to Sling Models.

AEM 6.1 or 6.2 were supporting WCMUsePojo class; AEM 6.2 and 6.3 started to support the Sling Models approach.

Both WCMUsePOJOs and Sling Models are used with HTL using <data-sly-use> block.

Before we jump into the difference , let us understand the concepts.

What is a POJO(Plain Old Java Objects)?

POJO's are simple Java classes which doesnt depend on other libraries, interfaces or annotations. This increases the chance that this can be reused in multiple project types. POJO's provides Getter and Setter methods, which allow you to change the underlying data type without breaking the public interface of your class which makes it more robust and resilient to changes.

What if there are no getters and setters?

Say we havent created setter and getter methods, then any one can directly call the variable and it surely will affect to the code, which may lead to security issues. Here POJO class are forcing other coder to call on the methods rather than directly calling the Instance variables.

What is Sling Models?

Sling Models are annotation driven POJOs. They allows to map resource properties, assign default values, inject OSGI services and much more.

Sling Models are pure POJOs that gives wonderful separation between logic and presentation which also extensible with custom injectors and annotations. Sling Models let you map Java objects to Sling resources. 

Use API Vs Sling Model

Use API

HTL(Formerly known as Sightly) uses  two ways of implementing support for business logic objects:
1) Java Use-API, through POJOs,
2) JavaScript Use-API,

Regular POJOs that extend WCMUsePojo implement the Use interface and are initialized with the scripting bindings, providing convenience methods for accessing commonly used objects like request, resource, properties, page etc.

HTL implementation from Sling provides the basic POJO support through the org.apache.sling.scripting.sightly.pojo.Use interface and the JavaUseProvider, whereas the use function is implemented by the org.apache.sling.scripting.sightly.js.provider bundle.

The Sling implementation provides a few extensions to the Use-API.


Sling Model API:

Sling Models are more flexible which can also be used outside HTL, thus makes the business-logic more reusable. They are managed by Sling and can be injected references to other objects using annotations and reflection.

Click on image to see it big


Conversion from WCMUsePojo to SlingModel
Just by adapting the above said methods (Remove 'Extends WCMUse', Add sling model annotation on top of the class, then add inject methods to invoke the references.) a developer can easily convert WCMUsePojo to SlingModel.

Conclusion:

For the versions AEM 6.3, AEM 6.4 and AEM Core WCM Components, Adobe recommends using Sling Models as the best practice.
 
More Details Here

Picking-the-best-use-provider-for-a-project

Video of the comparison 
 

Read More:

Sling Model Vs Sling Model Exporter


Tuesday, 12 February 2019

Performance Monitoring in AEM Projects

There are many reasons for performance issue in AEM projects. Identifying them and fixing in right time is mandatory to make the project successful.




Common causes of performance issues

From years people were monitoring performance issues  and identified a pattern. The issues starts from beginning of the project to end. Examples could be a poor design, poorly written code, lack of caching, memory sizing, network bandwidth latency, no proper load balancing at end point etc.

How to prevent performance issues?

1) By running multiple tests: Load tests, stress tests etc can help identifying the issues before launch.
2) Stable AEM release: Install any recommended service packs, cumulative fixes, hot fixes etc.
3) Following guidelines : Follow Assets best practices recommended by Adobe, Content Architecture guidelines etc.
4) Proper Memory Management: Allocate sufficient RAM , disk space based on research guidelines.
5) Configurational practices: Proper logging,  Caching, Sling job queue tuning etc
6) Workflows tuning: Enable transient workflows, purge workflows on time etc.
7) Oak tuning : by creating custom indexing for repeated searches, Ensuring proper JVM parameters for index querying, better lucene index configuration, external data store for huge assets handling.
8) Tar storage tuning: TarMK revision clean, OS related fixes for Tar etc.

Adobe Cloud manager is having ability to identify many of such issues.

Always keep monitoring the system and check for the bug reports , Adobe forums etc to identify

Read More>> Performance in Cloud Manager

Thursday, 7 February 2019

How can we create a custom datatype in the content fragment models in AEM


For majority of the use cases, the given content fragment datatypes will satisfy any use cases. But still if we need to extend the data type functionality further, below approach can be tried.

To start with, let us understand the data type structure in AEM.

Content Fragment model data types are configured at:
/libs/settings/dam/cfm/models/formbuilderconfig/datatypes/items/enumeration

and each dataype has properties as below,
  • fieldIcon
  • fiedPropResourceType
  • fieldProperties
  • fieldResourceType
  • fieldTitle
  • fieldViewResourceType
  • renderType
  • valueType

There are some additional fields which are specific to the fields.

Now, if you observe closely,
  • fiedPropResourceType having string value 'dam/cfm/models/editor/components/datatypes/field'
  • fieldIcon, fiedTitle -are data type naming specific.
  • fieldResourceType, renderType, valueType - are behavior specific to the data types.
All the fieldResourceType values are referred from /libs/granite/ui/components/coral/foundation, /libs/dam/cfm/models/editor/components, /libs/dam/cfm/admin/components etc.

Below given a screenshot of default Boolean data type properties.


 
Custom?
Now say if you need to create a custom data type for the content fragment, you can create a project specific structure of the data type referring the default one, the same way we extend the components.

If there is any other way to implement this, please let me know through the comments.

Monday, 4 February 2019

List of leading Headless CMS Solutions

What is Headless CMS?    
 
 HEADLESS = content.

What makes a real headless CMS? A headless cms is having a content first approach WITH full APIs to access the content in any way you want. Content first must be the approach behind Content Architecture. You start with looking at your content and structuring it and how it can be used now and in the future before you think of building anything UI wise. Its simple, Content First approach.

Below given a narrow list of headless CMSs in addition to AEM.

  •     Agility CMS
  •     Butter CMS
  •     Acquia
  •     e-Spirit
  •     Contentstack
  •     Contentful
  •     dotCMS
  •     Mura
  •     Cloud CMS
  •     Cockpit CMS
  •     Core dna
  •     Craft CMS
  •     Zesty.io
  •     Directus
  •     Storyblok
  •     GraphQL CMS
  •     Gentics Mesh
  •     Cosmic JS
  •     Kentico Cloud
  •     Prismic.io
  •     Quintype
  •     Sanity
  •     Scrivito
  •     Squidex
  •     DNN Evoq Content
  •     Strapi
  •     Superdesk

Friday, 18 January 2019

AEM Managed cloud - Reasons to move

Reasons for moving to AEM Managed cloud?

When we need agility and velocity for AEM projects, we should think of using AEM managed cloud.




Challenges associated with normal AEM deployments:
  • Slower time to value
  • Staying ahead of security threats
  • Upgrades & Maintenance
  • Performance and availability management
Above reasons push companies to run AEM in cloud managed service by Adobe

Current statistics of Cloud with AEM Deployments
  • 580 Plus customers at present globally
  • Up to 99.9 average uptime
  • 21 days for on premise to cloud transition
  • 40 Plus operating regions on Azure and AWS
  • 5 disaster recovery modes to ensure maximum uptime
  • 150 Plus customer success engineers
Key benefits of AEM Managed cloud
  • Decreased risk with increased security
  • Minimize disruptions & increased ROI
  • Accelerate Time to Market
  • Receive Guided Expert Services
Offering from Cloud manager for AEM
  • Continuous Integration and Delivery: of code to speed time to market
  • Code inspection, performance testing and security validations:Based on best practices.
  • Based on best practices
  • Automatic , scheduled or manual deployment: Even during out of business hours.
  • Auto scaling to detect the need for additional capacty during un expected spikes
Read more:
 Quality, Security, Performance Checks in Adobe Cloud Manager
 Why you should think of using Adobe Cloud Manager for AEM Projects?

Thursday, 10 January 2019

The need of AEM Admins and developers to understand Docker - AEM with Docker

Now a days distributed deployment is becoming common and Agile DevOps highly depends on containerized deployments. It was started with Microservice s and now stretching its wings.

The advantage of using AEM with docker
AEM With Docker fastens the deployment process. Any latest PRODUCTION environment could be imported to local file path as images. Say the TEST environment is crashed by some means, we can replace/repair this with docker images. These imported images can be exported to any Docker systems and will be useful to expand instances on-demand basis.

What is docker?

Docker allows you to run applications in an isolated environment with its own CPU, memory and network stack.

Docker needs a docker file to create an image from AEM and its dependencies. This image is then deployed to a new environment where code deployments are configured. This setup ensures the new environment is up and ready in few minutes.


AEM WITH DOCKER- Click on Image to see it big



Is AEM Docker combination a good pair?

There are arguments that AEM is state-ful where in repositories holds the content, still a brand new environment of AEM can be made available quickly. There are also reports that Adobe is working to make AEM Compatible with Docker and AEM builds are coming as docker images.

How does it impact the AEM Admins/ developers who work with AEM?

Since docker is the new deployment trend, it is highly recommended that AEM admins/ developers need to get a good understanding on docker and containerization techniques.