Tuesday, 29 October 2013

Creating a Link Rewriter for Adobe Experience Manager

In today’s competitive business environment, a great looking website is just not enough. Focus has shifted towards page loading speeds, cross device compatibility with responsive and adaptive design patterns and also accessibility. When it comes to speed, there are many ways to improve your website’s performance. One of them is to keep resources that change infrequently cached. Using Adobe Experience Manager (AEM), you can cache most content, including images, scripts and HTML/JSP pages.

Not only can you cache these files on the dispatcher server but you can also make use of the visitor’s browser cache. If you allow files to be cached directly in the browser, the amount of load placed on the dispatcher server decreases drastically. You can inform the browser that is actually is okay for it to cache JavaScript and CSS files for a few days or maybe even weeks depending on your release cycle. But what happens when you make a change in these files before they have expired in the visitor’s browser cache? Well, then you have a problem, the user does not receive any changes unless they actually clear their browser cache, which is something that one cannot demand of their visitors.

This article explains a workaround for this issue when using AEM. The basic idea is by using Sling selectors; you can append a version number to the CSS/JavaScript files so that they will change with each release. This affects the actual name of the file so it does not matter if the browser has cached the scripts because it will look for the new file in the browser cache. Because this file does not already exist, it will fetch this new file from the server and the user will receive the latest changes.

You can create a custom Adobe Experience Manager (AEM) Link Rewriter that is based on the Apache Sling Rewriter module. This module is used for rewriting the output generated by the Sling rendering process.

Note: For more information about a Sling Rewriter, see Apache Sling Rewriter.

An Adobe CQ Link Rewriter is implemented as an OSGi bundle that contains a Java class that extends the org.apache.sling.rewriter.Transformer class. For information, see Interface Transformer.

To read this development article, click http://helpx.adobe.com/experience-manager/using/creating-link-rewrite.html.



Friday, 25 October 2013

Earn your copy of Adobe Experience Manager in a Classroom book

During the week of Nov 14, 2013, the AEM community will be running a special promotion. As an AEM professional, you will want to own your own copy of this great book. For TOC details, see: http://scottsdigitalcommunity.blogspot.ca/2013/08/get-your-adobe-experience-manager.html.



Now is your chance to own your own copy. If you solve a forum question on the AEM forums:

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.html

during the week of Nov 14 (Nov 11-15), you'll earn your own copy. It's that easy!!

Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel. 


Tuesday, 15 October 2013

Displaying Adobe Experience Manager Data in a Chart

You can create an Adobe Experience Manager component that displays data queried from the Adobe JCR in a chart.  Assume, for example, that you want to display financial data queried from the Adobe CQ JCR in a chart. In this situation, you can create a CQ widget that uses a JQuery chart library that displays result data in a chart.

AEM Data displayed in a chart control

Each data point that is displayed is stored as a customer node's property named revenue, as shown in the following illustration.

Each customer node has a revenue property that is displayed in the chart

In this example, AEM data is queried from the JCR by using the JCR  API within an OSGi bundle. The data is returned to the web page where it is displayed within a chart. This development article walks you through how to develop this AEM component. To read this development article, click:

https://helpx.adobe.com/experience-manager/using/displaying-experience-manager-data-chart.html

Note: Out of the box, Adobe Experience Manager lets you create reports by setting JCR nodes and properties. However, this development article discusses how to develop a custom chart control using Java and JQuery. For information about using the AEM out of the box reporting feature, see Developing Reports.

Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel. 


Saturday, 5 October 2013

Automating the process of uploading multiple digital assets to the Adobe Experience Manager DAM

Adobe Experience Manager contains a Digital Asset Manager (DAM) that stores your organization's digital assets such as image files, video files, and so on. You can create a Java Swing application that lets you upload multiple digital assets (for example, image files) from your organization repository to the AEM DAM. Some organizations have thousands of digital assets and as a result, it is not practical to upload them one at a time using the AEM web client or Curl. For information about using the AEM web client to upload digital assets to the AEM DAM, see How to upload a Digital Asset.


Instead, you can develop a Sling Servlet that uses the AssetManager API. For information, see AssetManager API.

You can post files to the Sling Servlet by developing a Java Swing application. This client application uploads multiple digital assets to the AEM DAM.


I
A Java application that uses the JCR API to upload multiple files to the AEM DAM



To read this development article, click http://helpx.adobe.com/experience-manager/using/multiple-digital-assets.html.

To watch the video, click:



Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel. 


Thursday, 3 October 2013

Creating custom AEM workflow steps that send email messages

You can develop a custom Adobe Experience Manager workflow step that sends email messages to users within a workflow. A custom workflow step is implemented as an OSGi bundle that you can build using Maven and the AEM Workflow APIs that belong to the com.adobe.granite.workflow.exec package. For information, see Package com.adobe.granite.workflow.exec.


A custom AEM workflow step


Once you create and deploy the custom step, you can use it to send email messages to users within an AEM workflow. To send email messages, a com.day.cq.mailer.MessageGateway instance is used. For information, see Interface MessageGateway.

To read this development article, click http://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html.

To watch the video, click:






Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel. 


Monday, 30 September 2013

Using the Sling API to retrieve content from the Adobe Experience Manager Repository

Adobe Experience Manager contains a Java Content Repository (JCR) that stores nodes and properties. A node located in the JCR is considered a resource. You can use the JCR API to retrieve resources from the JCR. For information about using the JCR API, see Programmatically Accessing Adobe CQ Content using the JCR API.

However, you can also retrieve content from the JCR using Sling. In fact, a resource is a central part of Sling and it assumes everything in the JCR is a resource. You can use Sling to retrieve a resource from within an OSGi component using the Sling Java API or using a JSP. To use the Sling API from within an OSGi component, you use an org.apache.sling.api.resource.ResourceResolverFactory instance.

The Sling API is used within an OSGi bundle


When using Sling to query the JCR, you have access to helper methods that are not available when using the JCR API. For example, the adaptTo method  converts a resource into an appropriate object representing a certain aspect of this resource. For example to translate a Resource object to the corresponding Node object, you can simply do:

Node node = resource.adaptTo(Node.class);

 This development article guides you through how to build an AEM application that uses Sling to retrieve resources from the JCR. An OSGi bundle is created that locates a resource and retrieves a value. To read this development article, click:

http://helpx.adobe.com/experience-manager/using/using-sling-apis.html

Note: When you want to write content to the JCR, it is recommended that you use the JCR API. For information, see Persisting CQ data in the Java Content Repository.

Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel. 


Friday, 20 September 2013

Creating a custom Adobe Experience Manager PDF service

While helping answer forums for Adobe Experience Manager, an AEM user asked if there is an AEM API to work with PDF documents. See the forum thread: 

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__rrqk-is_there_anapidepl.html

While this is not an out-of-the-box feature, it does not mean that Adobe CQ cannot perform this use case. One of the most powerful features of AEM is the ability to develop custom services.

You can create a custom AEM service that  creates and modifies PDF documents. For example, consider a use case where a user submits data to Adobe CQ. A custom service creates a PDF document, writes the data to the newly created document, and saves the PDF document in the AEM Digital Asset Manager (DAM). 


A custom AEM service persists a newly created PDF document in the DAM


This development article walks you through the process of creating a custom AEM service that is able to perform this use case by using Apache PDF BOX API. For information about this API, see http://pdfbox.apache.org/.

To read this development article, click  http://helpx.adobe.com/experience-manager/using/creating-custom-experience-manager-pdf.html. 


Join the Adobe Experience Cloud Community 

Join the Adobe Experience Cloud Community by clicking this banner




I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with 20 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


Twitter: Follow the Digital Marketing Customer Care team on Twitter @AdobeExpCare.

YouTube: Subscribe to the AEM Community Channel.