What are components?
As the name suggests, components are little pieces of the bigger puzzle (that is your website). They are one of the best implementations of the decoupling concept of object oriented programming in a website. Each component serves a single purpose (ideally) and when called, you can see that functionality being performed. The portability of the components is what makes them so interesting. I could create a component that says "Hello World!" and I could call it in multiple places throughout my website and I would see the message "Hello World!" displayed wherever it is called. Just imagine the possibilities that are there if the components are implemented in your website. The basic purpose is to prevent the need for rewriting a certain functionality (eg, a datepicker with certain properties and styling). Just create a component once and call it wherever you need.
How are components created?
For every platform and technology, the method might vary. However, the basic concept remains the same. This concept is to create a functionality once and call it wherever its needed. Let us look into Shopware 6 and see how it allows the creation of your custom components.
Now its your turn to experiment and learn. Dont forget to give your feedback. Cheers!!
Comments
Post a Comment