SonarQube Setup for AEM Development

Published
In AEM development, prioritizing code quality is essential. Even during deployment via Cloud Manager, it's crucial to meet specific metrics for security, reliability, maintainability, and code coverage. SonarQube enables continuous code inspections, identifying issues early in the development lifecycle that could affect these metrics. Though integration, developers can ensure the maintenance of clean, efficient, and secure code throughout the AEM development process.

Caching Experience Fragments

Published
Experience Fragments (XF) often face cache invalidation issues, where modifying and publishing an XF does not update the pages referencing it because the XF content is cached within each individual page rather than a shared repository. As a result, authors have to manually activate or invalidate each page to see the updated XF content, making the process tedious and impractical.

Custom Metadata in AEM Assets

Published
Custom metadata that allows authors to define additional properties for digital assets beyond the standard metadata fields. These custom metadata fields in AEM Assets enhance asset management by allowing organizations to tailor information to their specific needs. They facilitate the inclusion of project specific details, campaign tags, and other relevant data, streamlining more effective asset categorization and management.

Content Fragments vs Experience Fragments

Published
Adobe Experience Manager (AEM) provides powerful tools for managing and delivering content efficiently. Two essential components in AEM are Content Fragments (CF) and Experience Fragments (XF). While both are used to create reusable content, each serves a distinct purpose and offers unique capabilities.

Best Practices Analyzer for AEMaaCS Migration

Published
Best Practices Analyzer (BPA) evaluates the current AEM implementation, identifying areas not in alignment with AEM best practices and offering guidance on how to improve. It also expedites the assessment of readiness for transitioning from an existing Adobe Experience Manager (AEM) deployment to AEM as a Cloud Service. This tool generates a report pinpointing potential areas for refactoring, marking the initial phase of migrating to AEM as a Cloud Service.

Extend AEM Page Properties

Published
Page properties in AEM serve as metadata that provide essential information about a webpage. While AEM provides a standard set of properties to meet basic web project needs, organizations often enhance them with extra functionalities or custom data fields to effectively address more complex or unique requirements in content management.

AEM Workflow Custom Process

Published
AEM provides a set of pre-defined workflow process that cover common scenarios, but sometimes these built-in features may not fully handle the complexities of specific workflows. In such cases, AEM allows developers to create custom processes, enhancing the functionality of standard workflows to meet unique requirements.

Setting Up Headless Authentication with Salesforce

Published
Modified
With headless authentication, backend authentication can be segregated from frontend identity experiences, enhancing faster login experience. It enables each channel to provide unique UI experiences according to their brand guidelines.

Replicate data-sly-resource in AEM SPA Component

Published
In traditional AEM development, composite components are built by combining several atomic components through the data-sly-resource statement. For instance, Teaser component is built using image, text, and button components. However, in the SPA paradigm, neither React nor Angular implementations offer direct alternatives for this approach.

Caching AEM Pages with Dynamic Content

Published
In general, when a page is retrieved from cache, all users view identical content. However, websites with gated or authenticated pages, certain sections — such as displaying a logged-in user's name or a login button for anonymous users — must remain dynamic and not be cached. Considering this scenario, Sling Dynamic Include (SDI) in AEM supports the dynamic generation of specific components, while also enabling the retrieval of others from cache.

Mock Static Methods with Mockito

Published
In the pursuit of clean object-oriented code, the need to mock static methods may suggest design flaws or code smells, prompting consideration for refactoring. Nevertheless, there are situations where mocking static methods remains crucial despite refactoring efforts.

Show/Hide AEM Dialog Fields on Dropdown Selection

Published
Enabling Show/Hide functionality for AEM dialog fields improves user experience by allowing content authors to focus on relevant fields, thereby making the authoring process more efficient and less error-prone.

Web Optimized Image Delivery for Custom Components

Published
Web Optimized Image Delivery feature of AEM as a Cloud service delivers image assets from the DAM in WebP format. WebP can reduce the download size of an image by about 25% on average, which results in faster page loading.

Form Submission from Publish to Author Instance

Published
Modified
In General, when an end user submits a form, the request is routed to the publish environment. Any modifications made at the CRX/DE during the execution of the post request are stored in the publish environment. However, a request may arise where upon form submission, certain data such as a content fragment needs to be created on the author instance. Following approval from business-level users, the content will be published to the publish environment, making it publicly accessible on the internet.

Install SSL Certificate from PFX file

Published
Installing SSL certificate is crucial for securing websites, ensuring encryption of data transmission between users browser and the site to protect sensitive information. Let's explore the process of installing SSL certificate from PFX file, providing step-by-step instructions for a seamless setup.

AEM Gated Pages Caching Strategies

Published
In General, requests containing authentication information are not cached because the cached document is served to the client without authentication. However, if the requirements permit the caching of authenticated documents, this can be activated by setting the /allowAuthorized property to "1". Additionally, need to implement the AuthChecker module, which verifies users access permissions for a page before delivering the cached content.

Project Lombok in AEM Projects

Published
In AEM backend Java development, Sling Models are utilized to retrieve dialog values using annotations. However, writing boilerplate code such as getter methods for passing these values to HTL can be tedious. To simplify this process, Project Lombok can be integrated, automatically generating the necessary boilerplate code with annotations like @Getter. This streamlines development tasks by eliminating the need for manual getter method creation.

Query Builder CheatSheet

Published
Modified
Query Builder offers an easy way of querying the content repository of AEM. The API is built using the JCR API. AEM includes a Query Debugger tool that allows you to execute search queries on the JCR (Java Content Repository). Utilize this tool to perform a dry run of the AEM queries, optimize them, and then implement them into your code.

Fetch Multifield Values using Sling Model

Published
In accordance with specific project requirements, there might be a need to incorporate Multifield within the component dialog. Let's explore how to retrieve Multifield data and effectively utilize it in HTL.

Restricting AEM Dispatcher Access in Lower Environments

Published
AEM's dispatcher is not restricted and is publicly accessible by default. While unrestricted access is suitable for production environments, it's recommended to restrict access in lower environments such as dev and stage to your organization or specific users. This can be achieved through IP Allow Lists or Basic Authentication.

Integrate Adaptive Forms in AEM Sites

Published
Modified
There are two potential scenarios for integrating Adaptive forms into AEM Sites: one for new projects and another for existing projects. Adobe has developed the aem-core-forms-components which can be used to incorporate forms standard components into AEM Sites.

AEM Component Dialog CheatSheet

Published
Modified
Granite UI provides a large range of the basic components needed to create component dialog on the authoring environment. These components are constructed using Coral UI-based elements.

Create Content Fragment Programmatically

Published
Creating a content fragment programmatically requires setting up a system user with Read permission for the content fragment model and Read, Modify, Create permissions for the asset folder where the content fragment will be stored. Additionally, ensure the content fragment model and asset folder are created for saving the content fragment.

Setting Default Values in AEM Component Dialog

Published
Modified
In AEM components, it's often necessary to establish default values. This ensures that when components are dragged onto the page, they display predefined initial values. This functionality is achievable through the utilization of cq:template and cq:templatePath.