Wednesday, 31 October 2018

Querying Adobe Experience Manager 6.4 JCR data using the QueryBuilder API

You can create an Adobe Experience Manager 6.4 application that queries data located in the Java Content Repository (JCR). In this article, you use a com.day.cq.search.QueryBuilder instance that belongs to the QueryBuilder API. This API requires that you define search parameters, and an optional filter. After you execute the query, the results are stored in a result set. You can display the result set in an Experience Manager web page. For information, see Interface QueryBuilder.

The following illustration shows JCR data displayed (retrieved by using the QueryBuilder API) within an Experience Manager HTL component.


To read this development article, click https://helpx.adobe.com/experience-manager/using/querying-experience-manager-query-builder-64.html.

Join the Experience League

To become an Experience Business, you need more than just great tools and online help. You need a partner. Experience League is a new enablement program with guided learning to help you get the most out of Adobe Experience Cloud. With training materials, one-to-one expert support, and a thriving community of fellow professionals, Experience League is a comprehensive program designed to help you become your best.

Join the Adobe Experience League by clicking this banner.




I (Scott Macdonald) am a Senior Experience League 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 AEM or other end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked In: http://www.linkedin.com/in/scottmacdonald2010

Saturday, 27 October 2018

Building a Spring MVC Project using Maven and IntelliJ IDE 2018

(Although most of the content located on this blog is for the Adobe Experience Manager community, from time to time, I post content for the general Java community. This post is about how to set up a Spring MVC project using Maven and IntelliJ 2018)

This development article guides you through how to create a Spring MVC project by using Maven and IntelliJ IDE 2018. This article includes how to configure the Spring DispatcherServlet.

This article builds a base Spring MVC project by using a standard web application Maven Archetype. Then it includes Spring MVC dependencies into the POM file and configures Spring related XML files, such as WEB-INF/dispatcher-servlet.xml file.

Finally, the Spring MVC project is deployed to Tomcat. If you do not have TOMCAT installed, see http://tomcat.apache.org/. (This article uses Tomcat 8).
The following illustration shows the Spring MVC built in this article.




To learn how to create a Spring MVC project by using Maven and IntelliJ IDE 2018, download this PDF.

Friday, 26 October 2018

Exporting Adobe Experience Manager Data 6.4 Using Sling Model Exporters

You can create an Experience Manager Sling Model Exporter to export Experience Manager data as JSON. You can invoke a Sling Model Exporter by using an HTTP Restful call and get back data. For example, assume that you want to get details of an image component located in the We Retail site:

 http://localhost:4502/editor.html/content/we-retail/us/en/experience.html

The following illustration shows the image component. 



You can use a Sling Model Exporter to get component details that are returned within JSON, as shown in the following illustration.  



To invoke the Sling Model Exporter, you can use this URL:

http://localhost:4502/content/we-retail/us/en/experience/jcr:content/root/responsivegrid/heroimage.model.tidy.json

The data is retrieved from the AEM JCR located here:

/content/we-retail/us/en/experience/jcr:content/root/responsivegrid/heroimage

To read this development article, click:



Join the Experience League

To become an Experience Business, you need more than just great tools and online help. You need a partner. Experience League is a new enablement program with guided learning to help you get the most out of Adobe Experience Cloud. With training materials, one-to-one expert support, and a thriving community of fellow professionals, Experience League is a comprehensive program designed to help you become your best.

Join the Adobe Experience League by clicking this banner.




I (Scott Macdonald) am a Senior Experience League 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 AEM or other end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked In: http://www.linkedin.com/in/scottmacdonald2010

YouTube: Subscribe to the AEM Community Channel. 


Sunday, 21 October 2018

Using NPM to compile SCSS files

You can use JS Node to compile a SASS file (.SCSS) to a CSS file. To compile a SASS file into CSS using NPM, you need to first install this on your system by using this command.

npm install -g scss-compile

NOTE - make sure you have NODE JS on your system.

Once successful, you will see:



Now you are ready to use a command line to compile a SCSS file into a CSS file.  Assume we have this HTML in a directory named  SampleProject.

HTML File

<html>
    
<head>
    <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>    
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

SCSS file

Under the SampleProject folder, we have a folder named css.  In this folder , there is a file named style.scss, as shown here: 


The following code represents the style.scss file. 

$font-stack:    Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}

Compile the SCSS into a CSS

To compile this SCSS into a CSS file using NPM, you need to create a file named package.json in the SampleProject folder. This package defines the command we need to convert this file. Here is the code for this JSON file. 

{
  "devDependencies": {
    "node-sass": "^6.4.1"
  },

  "scripts": {
    "scss-compile": "node-sass -o css css/style.scss"
  }
}

Now open the command line to the  SampleProject folder and enter this command: 

 npm run scss-compile

If successful, you will see this message in the command prompt. 



There you go, now you have successfully converted the SCSS into a CSS file. 




Hope this helps.

Monday, 15 October 2018

Creating a Login Component for the Experience Manager Weekend Site

You can develop a login component for the Adobe Experience Manager Weekend site. That is, using a login component, you can restrict unauthorized users from accessing it. A login component better secures your site and ensures that only registered users can access it. In addition, the login component should have Remember Me functionality to remember user name.(Using cookies).

This development article walks you through how to build a Login component for the Weekend site. The login component is created by using HTL. For more information, see HTML Template Language.


When the user enters a valid username and password, the login component redirects to the Weekend page. 


To read this Experience Manager 6.4 development article, click https://helpx.adobe.com/experience-manager/using/weekend_login.html


Join the Experience League

To become an Experience Business, you need more than just great tools and online help. You need a partner. Experience League is a new enablement program with guided learning to help you get the most out of Adobe Experience Cloud. With training materials, one-to-one expert support, and a thriving community of fellow professionals, Experience League is a comprehensive program designed to help you become your best.

Join the Adobe Experience League by clicking this banner.




I (Scott Macdonald) am a Senior Experience League 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 AEM or other end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked In: http://www.linkedin.com/in/scottmacdonald2010


Wednesday, 3 October 2018

[Webinar |October] AtACE Session: Creating a site structure to support your global business



Playback:

https://communities.adobeconnect.com/p4uc88amziyu/?proto=true

Topic:
AEM 6.4 Ready for the World:
Creating a site structure to support your global business

Presenter: Ankur Sial, a MTS-2, Core Technologies & Products at Adobe

Description: When deploying Experience Manager, one of the critical decisions is to determine the site structure that supports your business and desired customer experience. For global marketers, reaching customers in many countries and languages adds to the challenge. Learn how to structure global content and support international sites for multiple languages, mixed translations and adapted content. We'll walk through AEM 6.4 capabilities and a best practice case study for organizing international sites, including, creating the structure, translating the site, and publishing. Users will get familiar with the process of updating content and managing local adaptations.

Key learnings:
- How to create an international site using blueprints, live copies and language copies
- When to use MSM live copy vs language copy
- The concept of language masters vs country sites
- How to update source structure and content and iterate to translated sites


Join the Experience League

To become an Experience Business, you need more than just great tools and online help. You need a partner. Experience League is a new enablement program with guided learning to help you get the most out of Adobe Experience Cloud. With training materials, one-to-one expert support, and a thriving community of fellow professionals, Experience League is a comprehensive program designed to help you become your best.

Join the Adobe Experience League by clicking this banner.




I (Scott Macdonald) am a Senior Experience League 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 AEM or other end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked In: http://www.linkedin.com/in/scottmacdonald2010

YouTube: Subscribe to the AEM Community Channel. 

Monday, 1 October 2018

Integrating SOLR with Adobe Experience Manager 6.4

You can integrate SOLR with Adobe Experience Manager 6.4 to use searching. Solr is the popular, blazing-fast, open source enterprise search platform built on Apache Lucene. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated fail-over and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites. For more information, see Solr.

The following illustration video shows integration between AEM and SOLR.





NOTE: This article uses OSGi R6 Annotations. 

The previous video shows We Retail pages indexed with SOLR. To read this development article, click https://helpx.adobe.com/experience-manager/using/aem_solr64.html


Join the Experience League

To become an Experience Business, you need more than just great tools and online help. You need a partner. Experience League is a new enablement program with guided learning to help you get the most out of Adobe Experience Cloud. With training materials, one-to-one expert support, and a thriving community of fellow professionals, Experience League is a comprehensive program designed to help you become your best.

Join the Adobe Experience League by clicking this banner.




I (Scott Macdonald) am a Senior Experience League 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 AEM or other end to end articles like this, then leave a comment and let me know what content you would like to see.

Linked In: http://www.linkedin.com/in/scottmacdonald2010

YouTube: Subscribe to the AEM Community Channel.