ExamGecko
Home Home / Adobe / AD0-E134

Adobe AD0-E134 Practice Test - Questions Answers, Page 3

Question list
Search
Search

List of questions

Search

Related questions











An AEM Developer needs to create a new component to help support a new product launch.

• The client is on AEM 6.5 on-premise with the latest version of WCM Core Components

• The component must include text, image, and a link

• The component must support multiple designs

Which process should the AEM Developer use to support the launch?

A.
A.
Answers
B.
Extend the Teaser Component from Core Components
B.
Extend the Teaser Component from Core Components
Answers
C.
Create style variations to be used in the Style System
C.
Create style variations to be used in the Style System
Answers
D.
D.
Answers
E.
Create a new component by extending the Text Component from Core Components
E.
Create a new component by extending the Text Component from Core Components
Answers
F.
Add dialog properties and modify HTL to support images
F.
Add dialog properties and modify HTL to support images
Answers
G.
G.
Answers
H.
Extend the Text Component from Core Components
H.
Extend the Text Component from Core Components
Answers
I.
Enable image manipulations for the Text Component via policy
I.
Enable image manipulations for the Text Component via policy
Answers
J.
J.
Answers
K.
Create a new Image with Text component that exposes the Core Components authoring dialogs for those components
K.
Create a new Image with Text component that exposes the Core Components authoring dialogs for those components
Answers
L.
Add a policy to define which designs are used
L.
Add a policy to define which designs are used
Answers
Suggested answer: A

Explanation:

Extend the Teaser Component from Core Components

Create style variations to be used in the Style System** Comprehensive Explanation of Correct Answer Only: The Teaser Component from Core Components is a component that allows authors to display a title, description, image and link for a teaser item. The component supports multiple designs and can be extended to add custom features or logic. The Style System allows authors to define style variations for components without requiring code changes or new templates. Reference:

https://experienceleague.adobe.com/docs/experience-manager-corecomponents/ using/components/teaser.html?lang=en

https://experienceleague.adobe.com/docs/experience-manager-corecomponents/ using/components/style-system.html?lang=en

An AEM application is expected to export a content fragment in JSON format without any customization for a headless implementation.

What is the recommended approach?

A.
Use AEM Assets HTTP API
A.
Use AEM Assets HTTP API
Answers
B.
Use Core components to export JSON
B.
Use Core components to export JSON
Answers
C.
Use Sling Exporter framework
C.
Use Sling Exporter framework
Answers
Suggested answer: A

Explanation:

AEM Assets HTTP API is a RESTful API that allows access to content fragments in JSON format without any customization. The API supports CRUD operations on content fragments and their variations, as well as querying and searching for content fragments based on metadata or full-text search. Reference: https://experienceleague.adobe.com/docs/experience-manager- 65/assets/extending/assets-api-content-fragments.html?lang=en

In a non-optimized website, the final HTML generated for a typical page by publish instance includes a relatively large number of <script> elements that refer to other script files loaded from AEM environment. The developer wants to minimize these network calls by combining all required client library code into a single file to reduce the number of back-and-forth requests on page load.

Which step should a developer take to solve this issue?

A.
Embed the required libraries into an app-specific client library using the allowProxy property of the cq:Clientl_ibraryFolder node
A.
Embed the required libraries into an app-specific client library using the allowProxy property of the cq:Clientl_ibraryFolder node
Answers
B.
Add the categories property of the cq:Clientl_ibraryFolder node into an app-specific client library folder
B.
Add the categories property of the cq:Clientl_ibraryFolder node into an app-specific client library folder
Answers
C.
Embed the required libraries into an app-specific client library using the dependencies property of the cq:Clientl_ibraryFolder node
C.
Embed the required libraries into an app-specific client library using the dependencies property of the cq:Clientl_ibraryFolder node
Answers
D.
Embed the required libraries into an app-specific client library using the embed property of the cq:ClientLibraryFolder node
D.
Embed the required libraries into an app-specific client library using the embed property of the cq:ClientLibraryFolder node
Answers
Suggested answer: C

Explanation:

The embed property of the cq:ClientLibraryFolder node allows embedding code from a client library into another client library. At runtime, the generated JS and CSS files of the embedding library include the code of the embedded library. This reduces the number of network calls and improves performance. Embedding code is useful for providing access to libraries that are stored in secured areas of the repository. Reference: https://experienceleague.adobe.com/docs/experience-managercloud- service/content/implementing/developing/full-stack/clientlibs.html?lang=en#embed

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/embed-propertyin- client-libs/m-p/426858

An AEM application development team is assigned a task to create an Event-Driven Data Layer implementation for an Analytics solution.

Which Adobe recommended best practice should the developer choose?

A.
Use Adobe Experience Platform's data layer to integrate with AEM.
A.
Use Adobe Experience Platform's data layer to integrate with AEM.
Answers
B.
Create a custom data layer and add each component template, and its properties to the data layer
B.
Create a custom data layer and add each component template, and its properties to the data layer
Answers
C.
Use Adobe Client Data Layer and integrate with Core components.
C.
Use Adobe Client Data Layer and integrate with Core components.
Answers
D.
Create an Adobe Cloud Service configuration to use third-party tool's data layer.
D.
Create an Adobe Cloud Service configuration to use third-party tool's data layer.
Answers
Suggested answer: C

Explanation:

Adobe Client Data Layer is a JavaScript library that provides a standardized way to collect, structure, and manage data on a web page. It can be used to implement an event-driven data layer for analytics solutions. It integrates with Core components and allows authors to configure data layer properties for each component. It also supports custom events and data sources. Reference:

https://experienceleague.adobe.com/docs/experience-manager-corecomponents/ using/developing/data-layer.html?lang=en https://github.com/adobe/adobe-clientdata- layer

A developer is on an AEM application that is being used to calculate an employee's salary. The calculation is done in an OSGi service called CalculationService. This service class has a dependency on one other service, called the EmployeeService.

How should the developer make sure that the critical code in the CalculationService has a high unit test coverage?

A.
Use a mock framework in the unit test to inject the CalculationService
A.
Use a mock framework in the unit test to inject the CalculationService
Answers
B.
Instantiate the EmployeeService in the unit test and pass it to the constructor of theCalculationService
B.
Instantiate the EmployeeService in the unit test and pass it to the constructor of theCalculationService
Answers
C.
Use a mock framework in the unit test to inject the EmployeeService
C.
Use a mock framework in the unit test to inject the EmployeeService
Answers
D.
Use the feature flag in the unit test to disable the calls to the EmployeeService
D.
Use the feature flag in the unit test to disable the calls to the EmployeeService
Answers
Suggested answer: C

Explanation:

A mock framework is a tool that allows creating mock objects that simulate the behavior of real objects in a controlled way. A mock framework can be used in a unit test to inject the

EmployeeService dependency into the CalculationService and verify its interactions. This way, the unit test can focus on testing the logic of the CalculationService without relying on the actual implementation of the EmployeeService. Reference:

https://sling.apache.org/documentation/development/sling-testing-tools.html

https://wcm.io/testing/aem-mock/usage.html

An AEM Developer receives requirements for Sling Models in a human-readable yaml format. A custom application needs to be built. The dependency is as shown:

A.
A.
Answers
B.
Create OSGI models to export as yaml
B.
Create OSGI models to export as yaml
Answers
C.
Configure mime type in Apache Sling MIME Type Service
C.
Configure mime type in Apache Sling MIME Type Service
Answers
D.
D.
Answers
E.
Create OSGI models to export as yaml
E.
Create OSGI models to export as yaml
Answers
F.
Configure mime type in Apache Sling Servlet/Script Resolver and Error Handler
F.
Configure mime type in Apache Sling Servlet/Script Resolver and Error Handler
Answers
G.
G.
Answers
H.
Create Sling models to export as yaml
H.
Create Sling models to export as yaml
Answers
I.
Configure mime type in Apache Sling MIME Type Service
I.
Configure mime type in Apache Sling MIME Type Service
Answers
J.
J.
Answers
K.
Create Sling models to export as yaml
K.
Create Sling models to export as yaml
Answers
L.
Configure mime type in Apache Sling Referrer Filter
L.
Configure mime type in Apache Sling Referrer Filter
Answers
Suggested answer: C

Explanation:

To create Sling Models that can export data in a human-readable yaml format, the following steps are required:

Create Sling models to export as yaml. Sling models are Java classes that can be used to represent resources in AEM. Sling models can use annotations to define how they can be adapted from a resource and how they can export data in different formats. To export data in yaml format, the Sling model class needs to use the @Model annotation with the resourceType parameter set to the resource type of the resource that the model represents. The Sling model class also needs to implement the org.apache.sling.models.annotations.Exporter annotation with the name parameter set to "jackson" and the extensions parameter set to "yaml". The Sling model class also needs to use the @JsonProperty annotation on the fields or methods that need to be exported in yaml format. Configure mime type in Apache Sling MIME Type Service. The Apache Sling MIME Type Service is an OSGi service that maps file extensions to MIME types and vice vers a. To enable the yaml format for Sling models, the MIME Type Service needs to be configured with a new entry for the yaml extension and its corresponding MIME type, which is "application/x-yaml". This can be done by creating an OSGi configuration for the org.apache.sling.commons.mime.internal.MimeTypeServiceImpl service and adding the entry "yaml=application/x-yaml" to the mime.types property. Reference:

https://sling.apache.org/documentation/bundles/models.html

https://sling.apache.org/documentation/bundles/mime-type-support-commons-mime.html

A developer needs to create a workflow custom process step in AEM. In a custom process step, an OSGi component needs to implement the WorkflowProcess interface.

Which method should the developer implement?

A.
call
A.
call
Answers
B.
apply
B.
apply
Answers
C.
execute
C.
execute
Answers
D.
submit
D.
submit
Answers
Suggested answer: C

Explanation:

The WorkflowProcess interface is the interface to be used for automatic workflow steps implemented in Java. Classes implementing this interface define Java based processes that can be attached to a WorkflowNode and executed by the workflow engine. The method execute takes a WorkItem, a WorkflowSession and a MetaDataMap as parameters and performs the logic of the custom process step. Reference: https://developer.adobe.com/experience-manager/referencematerials/6-5/javadoc/com/adobe/granite/workflow/exec/WorkflowProcess.html

https://experienceleague.adobe.com/docs/experience-manager-learn/forms/adaptiveforms/custom-process-step-aem-workflow.html?lang=en

A customer adds third-party client libraries to add some features in an existing AEM application, which will significantly reduce performance.

How should the developer optimize the site?

A.
Embed client libraries to consolidate them into fewer files.
A.
Embed client libraries to consolidate them into fewer files.
Answers
B.
Debug third-party client lib and fix the code.
B.
Debug third-party client lib and fix the code.
Answers
C.
Rebuild Client libraries.
C.
Rebuild Client libraries.
Answers
Suggested answer: A

Explanation:

Embedding client libraries is a technique that allows combining code from multiple client libraries into a single file. This reduces the number of network requests and improves performance.

Embedding client libraries can be done by using the embed property of the cq:ClientLibraryFolder node and specifying the categories of the client libraries to be embedded. Reference:

https://experienceleague.adobe.com/docs/experience-manager-cloudservice/ content/implementing/developing/full-stack/clientlibs.html?lang=en#embed

https://experienceleague.adobe.com/docs/experience-manager- 65/developing/introduction/clientlibs.html?lang=en#embedded-files

A snippet throws an exception at runtime:

@Model(adaptables = {Resource.class}) public class MyCustomModel {

(SSIingObject

private Resource resource;

What should the developer add to fix it?

A.
defaultlnjectionStrategy = DefaultlnjectionStrategy property to @Model Class annotation
A.
defaultlnjectionStrategy = DefaultlnjectionStrategy property to @Model Class annotation
Answers
B.
(©Optional annotation to page field
B.
(©Optional annotation to page field
Answers
C.
throws Exception at the end of the init method declaration
C.
throws Exception at the end of the init method declaration
Answers
D.
SlingHttpServletRequest.class to adaptables property of ©Model Class annotation
D.
SlingHttpServletRequest.class to adaptables property of ©Model Class annotation
Answers
Suggested answer: A

Explanation:

The developer should add the defaultInjectionStrategy = DefaultInjectionStrategy property to the @Model Class annotation to fix the snippet. The defaultInjectionStrategy property defines how the Sling Model handles missing or null values for the injected fields. By default, the Sling Model uses the REQUIRED injection strategy, which means that all fields must have a non-null value or else an exception is thrown. By setting the defaultInjectionStrategy property to OPTIONAL, the Sling Model allows null values for the injected fields and does not throw an exception. This way, if the page field is null because the resource is not a page, the Sling Model can still work without errors. Reference:

https://sling.apache.org/documentation/bundles/models.html

https://sling.apache.org/documentation/bundles/models.html#optional-injection

Which two unit testing dependencies are generated by AEM archetype? (Select two.)

A.
JUnit
A.
JUnit
Answers
B.
Selenium
B.
Selenium
Answers
C.
PowerMock
C.
PowerMock
Answers
D.
Mockito
D.
Mockito
Answers
E.
Hobbes
E.
Hobbes
Answers
Suggested answer: A, D

Explanation:

JUnit and Mockito are two unit testing dependencies that are generated by AEM archetype. JUnit is a framework for writing and running unit tests in Java. Mockito is a framework for creating and using mock objects in unit tests. AEM archetype also adds Apache Sling Mocks and AEM Mocks Test Framework by io.wcm as dependencies for unit testing. Reference:

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wkndtutorial- develop/project-archetype/unit-testing.html?lang=en

https://experienceleague.adobe.com/docs/experience-manager-corecomponents/ using/developing/archetype/using.html?lang=en

Total 50 questions
Go to page: of 5