Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) B2C-Commerce-Developer Question # 2 Topic 1 Discussion

Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) B2C-Commerce-Developer Question # 2 Topic 1 Discussion

B2C-Commerce-Developer Exam Topic 1 Question 2 Discussion:
Question #: 2
Topic #: 1

A developer needs to perform the same additional checks before completing multiple routes in a custom controller, in orderto decide whether to render a template or redirect the user to a different page.

According to SFRA best practices, what is the correct approach to improve code reusability in this scenario?


A.

Define a new middleware function and use it in the existing routes.


B.

Append a new function to all the existing routes with the server module.


C.

Replace the existing routes by creating a controller in separate new cartridge.


D.

Use the superModule property in the existing routes to extend their functionality.


Get Premium B2C-Commerce-Developer Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.