Differences between Extension and AddOn in SAP Hybris
In this article, I have explained differences between Extension and AddOn in details in SAP Commerce [Hybris] and also described when to use Extensions and when to use AddOn's.
- An Extension is a self-contained module that adds or modifies functionality in SAP Commerce.
- An Extension generally represents a larger functionality and it contains business logic, type definitions, back-office configurations and other configuration files like xml, properties and etc, whereas AddOns are used to extend the functionality of SAP Commerce Accelerator[storefront] without modifying the core code base.
- AddOns are plugin kind of extension, you can easily remove your AddOns without refactoring the code of your Accelerator extension.
- Extension can work independently or extend the another extension whereas AddOn always depends on an existing extension (e.g. acceleratorstorefront).
- Extensions are used for business logic whereas AddOns are mostly used for Frontend/UI customization.
Extensions examples: commercefacades,commercewebservices, yacceleratorstorefront.
AddOns examples: captchaaddon, whishlist.
AddOns examples: captchaaddon, whishlist.
- During the SAP Hybris upgrade extensions can require code updates whereas AddOns can be easier to maintain as it doesn’t require and code changes.
- An Extension can be registered in localextnsions.xml file whereas AddOns can be installed using command ant addoninstall.
Note: We can use same ant command ant extgen to create both Extension and AddOn. The only difference is while creating AddOn we need to provide template name as ‘yaddon’.
When to Use Extensions?
- Extensions can be used when you want to implement new functionality or modify existing features in SAP Commerce.
- Extensions can be used when you want to extend and enhance the service, dao or OCC API’s.
When to Use AddOns?
- AddOns can be used when you want to customize the Storefront UI without modifying existing storefront extension.
- AddOns can be used when you want to implement plug and play kind of feature and that can be easily install or uninstall.
If you have any questions or need further clarification on any of the steps, feel free to reach out to me at rameshvanka8@gmail.com. I’m happy to help and would love to hear your feedback!
Happy Learning🙂
Comments
Post a Comment