Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E722 Topic 4 Question 20 Discussion

Actual exam question for Adobe's AD0-E722 exam
Question #: 20
Topic #: 4
[All AD0-E722 Questions]

A client is migrating to Adobe Commerce Cloud and has approximately 800 existing redirects that must be implemented. The number of redirects cannot be reduced because all redirects are specific, and do not match any pattern.

How should the redirects be configured to ensure performance?

Show Suggested Answer Hide Answer
Suggested Answer: C

Option C is correct because adjusting the ruleset.xml file with the new rule is the simplest and most effective way to implement the new code rule. The ruleset.xml file defines the coding standards that are applied by PHP_CodeSniffer. By extending the Magento 2 Coding Standard and adding a new rule, the Architect can customize the code analysis and enforce the company coding standards.The new rule can use the Magento2.Namespaces.ForbiddenNamespaces sniff to check for any usage of Helper classes in the code and report them as errors or warnings1.

Option A is incorrect because creating a new composer package under the AwesomeAgencyCodingStandard namespace is not enough to implement the new code rule. The composer package is just a way to distribute and install the coding standard, but it does not define the rules themselves.The Architect still needs to create a ruleset.xml file and register it with PHP_CodeSniffer2.

Option B is incorrect because creating a new class AwesomeAgencyCodingStandardRulesetForbiddenNamespaces and specifying the rule inside the process method is unnecessary and complicated. The Architect does not need to create a new class or a new sniff for this rule, as there is already an existing sniff in the Magento 2 Coding Standard that can be used for this purpose.The Magento2.Namespaces.ForbiddenNamespaces sniff can be configured with an include-pattern element to specify which namespaces are forbidden1.


1: Magento 2 Coding Standards | Adobe Commerce Developer Guide

2: How to create a custom coding standard | PHP_CodeSniffer Documentation

Contribute your Thoughts:

Melissa
18 days ago
Option B all the way! Redirects are like the annoying little siblings of the internet – you want to keep them as far away from the main event as possible. Fastly's the perfect babysitter for these 800 redirect rascals.
upvoted 0 times
...
Blair
19 days ago
I'm a big fan of Option B. Letting Fastly do the heavy lifting on the redirects is a smart move. Plus, it'll free up the Commerce Cloud servers to focus on the important stuff.
upvoted 0 times
...
Clay
24 days ago
Wow, 800 redirects? That's a lot! I think Option B is the best choice here. Fastly can handle that kind of volume without breaking a sweat.
upvoted 0 times
...
Ardella
1 months ago
I'm tempted to go with Option C, as it seems like the most straightforward approach. But I'm worried about the potential performance impact of that many URL rewrites in the admin UI.
upvoted 0 times
Wilson
9 days ago
Adding each redirect in the magento/routes.yaml file could also be a good choice to ensure performance.
upvoted 0 times
...
Linn
24 days ago
I think using VCL snippets to offload the redirect to Fastly might be a better option for performance.
upvoted 0 times
...
Sage
27 days ago
Option C may be straightforward, but it could slow down the site with so many URL rewrites.
upvoted 0 times
...
...
Shawna
2 months ago
Option B seems like the way to go. Offloading the redirects to Fastly will ensure optimal performance and reduce the load on the Commerce Cloud infrastructure.
upvoted 0 times
Truman
23 days ago
That's a good point. Offloading to Fastly will definitely help with performance.
upvoted 0 times
...
Lemuel
28 days ago
B) Use VCL snippets to offload the redirect to Fastly.
upvoted 0 times
...
...
Socorro
2 months ago
I think adding each redirect as a URL rewrite via the admin UI would be the best option for performance.
upvoted 0 times
...
Lawrence
2 months ago
I disagree, I believe using VCL snippets to offload the redirect to Fastly would be more efficient.
upvoted 0 times
...
Kimberely
2 months ago
I think we should add each redirect in the magento/routes.yaml file.
upvoted 0 times
...

Save Cancel