Explore the installation directory

Now, we have installed AEM and started it. Before we log into AEM, let us see what exactly it created in your system. Move to the installation directory – that’s the directory to where you copied the QuickStart jar file and the license file.

You will notice that it created folder, crx-quickstart. Whenever you start AEM for the first time, it creates the QuickStart folder. It saves all the required data inside it. After you make changes it saves the changes there. Since you have started AEM once, it retains the folder for subsequent restarts. You will notice that whenever you start AEM for the first time, it takes a little longer time to start, because it needs to create the QuickStart folder.

Move into the QuickStart folder. Let us not get into a lot of technical details for the time being.

directory-structure

Following are the two folders that I would like you to familiarize with:

  •  Logs: The logs files. There is an error.log file inside it. We will use error.log file a lot of time to see what went wrong with AEM if it misbehaves.
  • repository: Navigate inside it. Go inside segmentstore. You will see a lot of tar files.
    tar-files

AEM stores that data in this format. This is the default configuration. You can also save the data in MongoDB. We will see that later.  There are more folders and files. We will explore them in detail later.

Starting AEM

Let us see how you install and start AEM. You first need to get an AEM installation file, which is fondly called as the QuickStart file. Adobe doesn’t provide you a trail version of the same. One of the ways to get an installation file is to attend Adobe Training Services class room session. Adobe distributes the installation file in the class room trainings.

AEM installation file is a jar file. It will accompany with a license file – license.properties. The License file contains the license information that you need to run AEM. If you are using AEM in a production environment, that is for hosting your content in real-time, you need to pay the license fee and obtain the license.

AEM is licensed based on various modules it offers: Sites, Apps, Forms, Community, and Assets.

  • Sites: Allows you to create websites.
  • Apps: Allows you to create apps used for hand-held devices.
  • Forms: Allows you to manage LiveCycle Forms.
  • Assets: Allows you to manage digital assets, such as images, icons, pdfs, and so on.
  • Community: Don’t ask me what it is used for. :)

The license file that you obtained for training purpose allows you to use all these functionalities.

Let us install AEM. Wait a second. You need to have Java 6, specifically JRE 6, installed in your machine. Obtain JRE from the Oracle website at free of cost.

  1. Copy QuickStart jar file and license file to a folder named AEM.
  2. Rename the QuickStart jar file as follows: aem-author-4502
    (I don’t remember the original name of the QuickStart file.)
    When you install AEM, it takes some key variables from the file name itself. In this case, the first string aem represents AEM itself.

    Next one represents that it’s an author instance. (I hope I am not adding a lot of jargons.) It means that you use it for authoring your content. This instance mostly used by people in your organization to add, edit, and delete content. People outside your organization doesn’t take care of these tasks. They simply view the content.

    The third part 4502 indicates that AEM will run on that port number. That means if some other process is already using that port, AEM quits. (Drobo uses that port by default.)

  3. Double-click the file you created. It will bring up a pop-up window as shown below.
    srat-aem
    Soon, it will change as follows. AEM is started.  (Now, don’t ask me how to stop AEM.)
    started-aem

     

    Don’t close this window. If you happen to close this window, you need to kill AEM from the Task Manager to stop it. Once AEM is up, your default browser opens up and shows you the login screen. Log in using admin as user name and admin as password. You will see the Project management page after a successful login.

    aem_welcome

     

    We will explore various pages in a short while – after we have a quick look at the folder where you copied the QuickStart file.

Why AEM?

iconAdobe Experience Manager (AEM) manages the user experience of your website (content) across various channels. In a globalized world, you need to manage content across multiple websites in various languages. Your content is consumed using various devices – hand-held devices, such as mobile phones and tablets, PCs, and so on. This results in a scenario that you have plenty of user experiences to manage. You need to provide optimal experience in both iPhones and Android phones. And, the same is applicable across thousands of other devices. AEM helps you to achieve this goal effectively and effortlessly.

AEM is one of the solutions in Adobe’s Marketing Cloud ecosystem. All solutions in Marketing Cloud complement each other and provide you with key solutions to effectively manage user experiences. The following diagram represents various solutions in Adobe Marketing Cloud: (Taken from Adobe’s website.)

marketing_cloud

Let me cite a few examples for how this ecosystem helps you to provide better user experience.

I am sure all of us would have visited online shopping sites many times. Which is the most commonly used feature in an online shopping site, such as Amazon? It definitely is, Search. You normally won’t traverse through menu options such as Men’s and then Boots and then …. and so on. You just search for the product you need. There can be thousands of users who do the same thing while you search for a product. For online shopping sites, the Search feature must be very efficient. Adobe Marketing Cloud provides you with a solution named Site Search. You can easily integrate Site Search with AEM. This capability indexes all your products and details, as Google indexes a website information. When a user searches for a product, the Site Search provides the search result and makes this operation extremely fast.

Similarly, tracking your users is very important to serve them better. You need to know the geographical areas they come from, the web pages they visit, and so on. AEM can be integrated with Adobe Analytics easily. This gives you a great reporting capability and statics about your user behavior.

Content personalization is another important aspect of your website. You should be able to customize your website based on your user profile. If your user is a male of a certain age group, provide the user with something he finds appealing. Change it accordingly if the user is a female of a certain age group. Adobe’s Marketing Cloud solution,  Adobe Target, does it for you effortlessly.

Adobe Social (a capability in Marketing Cloud solution) helps you to integrate AEM with Social Media. Adobe Campaign allows you to manage digital campaign effortlessly. In short, AEM along with other Marketing Cloud solutions helps you to provide a great digital experience to your users. It indeed transforms your content into experiences that result in better customer reach, retention, and high ROI.

In the next post, you will see the underlying technologies on AEM.

Adobe Lightroom for Android

Adobe Lightroom for Android is available today.
For more details, see the official blog.

 

AEM Sightly Brackets Extension

You can install this extension on Brackets if you plan to use Sightly as the markup. The extension provides you with features such as syntax highlighting and code completion.

Brackets extension provides front-end developers an AEM templating tool with which they are familiar. The idea is to bring more front-end developers to AEM template designing. Use CRXDE Lite to create a basic structure of your project. Then create a package and download the package. Unzip the package and open it in Brackets. Make the changes; Brackets extension allows you to automatically sync with the Oak repository.

For more information, see Adobe’s documentation.

While creating templates for Touch-Optimized GUI

In AEM 6.0, most of the functionalities are accessible through Touch-Optimized UI. When you create a template using Sightly or JSP, before extending the page component, the Classic UI displays the content in a page created based on the template. Of course, the page is displayed without the sidekick and other functionalities.

 

This behavior, however, changes with Touch-Optimized UI. To appear page’s content in Touch-Optimized GUI, the page’s template should extend the page component using sling:ResourceSuperType . You can extend a Sightly or JSP page component to a template. It’s irrespective of the templating language (Sightly \ JSP).

Slightly, some Sightly

AEM 6.0 introduces Sightly – a new templating language. Sightly replaces JSP as the most preferred templating language for AEM. Sightly helps you to separate your design from your code. The intention is to bring more front-developers to AEM component development. By providing a demarcation between the design and the development departments, Adobe expects to reduce the go-to-market time for AEM development projects.

For more information on Sightly, visit Adobe documentation.

Sightly can used in three ways:

  • Pure HTML
  • HTML + server-side JavaScript
  • HTML + Java

In the following example, Sightly is used as pure HTML to display the name of a page:

Code in template

<h1>Page Title</h1>
<p>${currentPage.Title}</p>

The same example can be rewritten in Sighlty and JavaScript. This example doesn’t represent the best practice. However, it shows how to demarcate the logic using JavaScript:

Code in template

<div class="component-name" data-sly-use.component="component.js">
<h1>Page Title</h1>
${component.title}</div>
</div>

component.js

use(function() 
{
        return {
        title: currentPage.getTitle()
        };
});

The next example shows how the same logic is implemented using Sightly + Java combination:

Code in template

<div class="component-name" data-sly-use.component="Component">
<h1>Page Title</h1>
<p>${component.CurrentPageTitle}</p>
</div>

Component.java

package apps.your.directory.structure;
import com.adobe.cq.sightly.WCMUse;
import com.day.cq.wcm.api.Page;
public class Component extends WCMUse
{
private String CurrentPageTitle;

@Override
   public void activate() throws Exception 
   {
   final Page currentPage = getCurrentPage();
   CurrentPageTitle=currentPage.getTitle();
   }

   public String getCurrentPageTitle()
   {
   return CurrentPageTitle;
   }
}

Integrating Search&Promote with AEM

Search&Promote allows you to create an index of your site by crawling your site in a regular interval. It helps you to implement powerful search functionalities in your website. In AEM 5.6.1, there are some out-of-the-box Search&Promote components that make integration easy. Some of these components use hardcoded values that you may need to change in the component’s JSP page. You need to work with a Search&Promote consultant and understand the xml format, specifically the fieldnames, in which the results are provided.  Use the fieldnames in the JSP pages.

For example, if the fieldname for product description in the xml file is “desc,” rewrite the method in the Search Results component’s JSP page as:
r.get(“desc”)

Note: Search&Promote components are available at libs/cq/searchpromote/components.

Watch out AEM 6.0 release that is scheduled to be in May end. It has some cool integration workflows to avoid these workarounds.

Using the Target component in AEM 5.6.1

The Target component in AEM 5.6.1 allows you to create an MBox in your page and then create various experiences. It works like the Targeting feature provided with the context menu. You would have noticed that after you drag and drop the Target component to a page, the component becomes invisible.

To make the Target component visible in the page, bring up Client Context and associate it with a Campaign.

blog

Accessing previous versions of a page using CRXDE Lite

You can access the previous version of a page using CRXDE Lite:

  1. Login to CRXDE Lite.
  2. Move to the page for which you created versions.
    It would be present in the /content folder.
  3. Examine the jcr:content node of the page.
  4. Click the value of the jcr:versionHistory property.
    It will take you to the node that has all the versions you created.