What is the difference in Extension & Add Ons in Hybris
Asked Answered
K

4

5

I suppose Default Extension can Encapsulate Business Logic, Type Definitions, Configurations & Add Ons.

I Know that Add On is Also a Type Of Extensions that Extend Normal Extensions.

I further know that Add Ons Extend Functionality without Touching CODE Base.

Any Inputs from Hybris Experts Highly Appreciated.

Kernel answered 24/10, 2015 at 12:6 Comment(0)
D
8

An extension is an encapsulated piece of the Hybris Commerce Suite that can contain business logic, type definitions, a web application, or Hybris Management Console(hMC) configuration.

Hybris shipped with number of extension templates eg yempty, yaddon, ycockpit, ybackoffice and ycommercewebservices.

Addon is also a kind of extension which is generally used to extend Accelerator StoreFront functionality. For example, suppose you want to create a new CMS component and want to use it in your storefront but you don't want to touch the code base then the best way is to create an addon.

A normal extension doesn't need to install but addon needs to. It means if you are creating an addon, you need to install it in your existing storefront template.

ant addoninstall -Daddonnames="customaddon"  -DaddonStorefront.yacceleratorstorefront="customstorefront"

This will insert the dependency between customstorefront and customaddon in the storefront extensioninfo.xml file as well as provide the additional web-spring.xml configs defined in the customaddon's project.properties. A build callback will now copy the web application content to the storefront.

After ant all, you should find the view JSP duplicated to customstorefront /web/webroot/WEB-INF/views/addons/customaddon/desktop/cms.

This way you can customize accelerator storefront without touching the actual one.

Demanding answered 25/10, 2015 at 6:44 Comment(1)
thanks for such a lucid illustration. i had seen your blog... really brilliant. incidentally my other question ... how to configure hybris for CLUSTER mode ... i had posted earlier also, but didn't get response. is the answer too LONG to explain in this limited spaceKernel
P
2

Extensions are self-contained independent packages, add-ons are not. In general terms, an extension is the larger unit. You can use add-ons to enhance functionality in an extension but not vice versa.

The Hybris Diary has a glossary with detailed descriptions:

http://hybrisdiary.com/?s=add+on

http://hybrisdiary.com/tag/extension/

Pigment answered 24/10, 2015 at 12:27 Comment(3)
thanks for my first answer and sharing this invaluable hybris resource. incidentally do u know how to u know how to configure hybris for cluster modeKernel
hybrisdiary look downCoffle
Indeed - the links added on this ticket are both down. It would really helpful if anyone knows where were these pages migrated (hopefully they were moved somewhere else)Haven
E
2

I will tell u my understanding of bot extensions and addons. We get default extensions ( through ant modulegen) in hybris. If you look closely every extension has a single purpose. Whether it is storefront(view and controller), facade( Business logic), commercewebservice(rest services),etc...

Now imagine someone approach you with already settled hybris store. But you can't have access to any of their extensions. Then all they want is some plugin code i.e. not complete codebase.

But now you can't create another facade extension, storefront extension,...

So Addon will be the best choice, because it comes handy and can play any role required. (e.g. It has *-items.xml to add or modify the Hybris Types, you can write controllers for storefront, you can write your own services or facades, or cms component). I hope you find it helpful.

Episcopacy answered 26/8, 2016 at 4:52 Comment(0)
S
2

Addon Basically, you should create an addon if you want to create or extend some storefront functionality. - Create storefront functionality. For example, you'd like to create a new CMS Component which is a Vimeo video. - Extend current storefront functionality. For example, If you'd like to extend a controller or something from standard accelerator.

Extension This is your option if you want to create new something that it is not related with storefront. Sometimes your functionality will be only related with backoffice or services, so creates an addon is not necessary.

Shandishandie answered 26/9, 2018 at 7:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.