At this year's Adobe Summit, over 200 visitors to our booth took our AEM developer challenge! The developer challenge is a brief quiz that tests the participant's knowledge about several key areas of AEM projects. We created it to foster a conversation about the best practices and tools that can help make AEM implementations successful. Here are the questions we asked and our answers to those questions:
- What should your project's UX experts focus on?
- Site experience for the customers
- Authoring experience for Adobe Experience Manager
- Understanding the component/template model of Adobe Experience Manager
It's important to engineer a usable experience for the end users of your website, but it is also important that your content authors have usable tools at their disposal when creating the website. A full understanding of the AEM component/template model is useful for everyone on the team, frontend as well as backend, because frontend code written with AEM in mind requires much less refactoring to work with the backend.
- Why should your site use versioned CSS and JS files?
- To allow browsers to cache the assets forever and speed up page rendering
- To audit the CSS/JS code at a later time
- To minimize page rendering time for recurring visitors
Versioning CSS and JS files (appending a hash or timestamp to the filename when AEM outputs them to the page) allows you to set long timeouts for those files, since any changes to those files will result in a new filename. The browser can essentially keep cached copies indefinitely, so once a user loads the page once, their subsequent visits will be faster. ACS AEM Commons offers this feature out of the box.
- What's the best way to implement search for your web presence?
- External search engine
- Search within Adobe Experience Manager
- Omni search strategy with a search engine, like Solr, customized to your needs
If your company's web presence is entirely contained within AEM, using the built-in search can be fine. However, many large companies have their web presences comprised out of many separate systems. If that is the case, it's better to aggregate search data with a search engine (such as Solr) to provide a consistent search experience across all of the web properties.
- Why should your site serve images from a different domain name?
- To reduce the request size with a cookieless domain
- To speed up downloads from the browser
- To scale image requests separately from other web application artifacts
AEM attaches all of its cookies, of which there are many, to every request it makes. If you route your image requests through a different domain, they will not share the same cookies as main site requests, so they will be served more quickly. Modern browsers also load a limited number of requests from a single domain at a time (e.g. Chrome will only load 4 requests per domain at the same time), so having image requests on their own domain can effectively double the speed at which the browser can load your page.
- How can you best promote relevant content on pages and continue to engage the client?
- Surface search-driven, relevant content on pages from all customer-facing web sites
- Manually manage relevant content on each page
- Track the customer to adjust relevant content on the site accordingly
Manually managing relevant content is simply not scalable with high numbers of users and pages. Using a search engine such as Solr, you can automatically serve content that is related linguistically or through tags to the topic of a page. It is also useful to track customer behavior with analytics to determine their interests and behavior and serve content that is specifically tailored to them.
- How should you ensure that your site is performing well?
- Make sure all architects and developers think about the caching strategy for the site from the beginning
- Enable the team to test with dispatcher and publish instances, not just author
- Provide a full stack infrastructure to the team throughout the project
All too often, AEM developers will do all of their work against an author instance and never consider the publish environment or the web server and dispatcher beyond it. There are often many different runmodes, security settings, and other differences between author and publish that should be accounted for as the code is developed - not just when they are discovered during testing near the end. Caching is also vital to ensuring that your site performs well and remains stable under heavy load. Providing a full infrastructure that can be shared between all of the developers helps ensure that they keep these considerations in mind and stay on the same page.
- What's the best way to start a new Maven project for Adobe Experience Manager?
- The ACS Lazybones Archetype
- Write your Maven project structure by hand
- Use the Adobe Maven Archetype
We strongly recommend the ACS Lazybones Archetype for starting new Maven projects. It provides a foolproof method for setting up your entire project structure through a simple command line interface.
- What does Sling Model Exporter solve for your project?
- It provides a way to export Sling Models to JSON through annotations
- Allows for a model class to be exported into an arbitrary Java object type
- Automatically registers Servlets for exported models
The exporter is a new feature of Sling Models. It can be registered with an annotation in your model class and provides all of the benefits listed above.
- What's the fastest way to transfer content from one Adobe Experience Manager instance to another?
- Export content with VLT from one instance and import it on the target instance
- Use Grabbit
- Use VLT-RCP
Grabbit is an open source content synchronization tool. Unlike VLT-RCP and other previous solutions which open a separate connection for each file being transfered, Grabbit uses continues streams which greatly reduces the latency during the transfer.
- What's the best way to transform content in Adobe Experience Manager?
- Export content with VLT, transform the XML structure on the file system and import it with VLT
- Use the Sling Pipes tool
- Write custom code to transform the content
Sling Pipes is a tool for transforming content that can be easily set up using nodes in CRX. As the name implies, the tool creates a pipeline where multiple transformation steps can be chained together.