Future of the Standard Storefront #4856
Replies: 17 comments 25 replies
|
Thank you very much. A centralised component system is a good step.
|
|
First of all, I’m really happy to see that Shopware continues to show support for the traditional Storefront, rather than focusing solely on the headless Shopware components. 💙 I want to express my concern about the potential impact the new component-based system might have on template overrides, which are crucial for custom plugin development. Currently, with the Twig-based approach, we have the flexibility to override specific parts of templates without needing to rewrite entire files. This allows multiple plugins to work together seamlessly, as long as they follow best practices, like using {{ parent }}. However, with the shift to a component-based system, I fear we may lose this granular control. One of my main concerns is that the new system could force developers to override entire components, making it difficult for multiple plugins to modify the same component without conflicts. This would not only reduce flexibility but could also discourage modular plugin development, where small, targeted changes are crucial. Additionally, third-party plugins that currently don’t follow best practices (like failing to use {{ parent }}) often cause issues, and I worry this problem could persist or even worsen with components. It’s important that the new system maintains the ability to override specific parts of a component, or provides a similarly powerful mechanism, to ensure that plugins can still work collaboratively. |
|
First, I'd love to express the gratitude for reaching out and listening to our feedback! 🚀 🔥 Things I really like
|
|
I fear that the rewrite of templates and plugins to the new component system will be a huge effort and a lot of flexibility will be lost. I would like to see a practical example of how this works. Inserting or exchanging content via slots - no problem and makes sense. But how do I adjust the price in the example above - e.g. to hide it under certain circumstances? This hardly works with slots. If the entire area is a separate component, I have to replace it completely with one of my own. In the worst case, I only have to replace one line - but then copy 30 other lines of code from the original component. And then check this “duplicate code” again during Shopware updates and adapt it if necessary. In my opinion, this is the same problem as with the private methods in the PHP core. Sometimes I have to copy a lot of unnecessary (private) methods in my plugin just to adapt one line of code in a public method. This would be much more elegant and update-proof with protected methods. And I fear the same problem with the component system. In contrast, the following is absolutely the right direction for me:
|
|
If there is a need to redo everything AGAIN, we just moved to SW6, with many problems and missing features.. |
|
Thank you for giving us the opportunity to share our thoughts on the subject. Regardless of what the technical solution will look like, as an agency and plugin manufacturer I would urge you to only introduce such a major change in Shopware 7. The main reason is that such a major change would destroy the entire Shopware 6 ecosystem. No manufacturer - especially those with more than 10 plugins - will be thrilled to adapt each of their plugins so extensively. As an agency, it is becoming increasingly difficult to explain to customers why the theme has to be completely revised for the umpteenth time. The argument "reducing the total cost of ownership" no longer holds water, as every major version, e.g. from 6.4 to 6.5 and then to 6.6, was always sold with the same buzzword bingo arguments. Customers no longer buy that and are no longer willing to pay for such major changes every year. In the real world, shop operators need a stable shop system and a diverse plugin ecosystem. Each update costs a lot of time and therefore money, just to introduce a new 0.1 millisecond improvement that no one notices in the end and that costs an unbelievable amount of effort. |
|
I am familiar with the component system from the Ionic Framwork with stencil. For simple customizations - or customizations that are provided in the component - great. But for everything that goes beyond that, it gets complicated or doesn't work at all - or I have to write my own component for it. If I want a system that is as stable as possible, with limited customization options, the component-based system is unbeatable. But for a highly customizable system, which is definitely Shopware's strength, I think it's the wrong way to go. By the way: Thank you for the opportunity to share your thoughts. |
|
"Components will not be part of a multi-level inheritance system. Delivered components will always stay as they are, apart from the slotted content and exposed configuration options. Instead, a typical extend mechanism could be an option where you create your own custom version of another component, but which will always be a separate component." |
|
Start off by learning Bootstrap in Schöppingen ... and gain some confidence in removing all the extra wrapping divs as well as duplicates in your CSS. Half of the DOM depth you set up by now can be thrown away without even causing any issues. Then ... remove all the empty blocks you create rendering into the customer's browser. That'll do for starters and increase site speed by reasonable digits. That said, I doubt the idea of throwing SCSS compilation out to result in a smaller footprint. |
|
Hi, first of all, i think it's great that you have an open ear for your community! the idea with the slots sounds very interesting. i am looking forward, how it will actually be in the daily use process. especially regarding the development of own CMS Elements / slots. |
|
I come from a project developer's perspective. I do care about plugin developer but this is not my daily biz. We cannot get rid of the inheritance feature as other parts of the applications are likely not covered by Twig Components and still need overwrites. See document templates, comparison sales channels and email templates. Vue like slots are already possible using Twig embed ( soon sw_embed #4980 ). Twig really helps us to add just content, where you likely will not have a Twig component: the entrypoint for the administration SPA see https://github.com/HEPTACOM/HeptacomShopwarePlatformAdminOpenAuth/tree/500eeba261c5b450cad27d401980bb5f59fae6f8/src/Resources/views/administration Symfony Twig inheritance AFAIK is not aware of shared bundle overwrite approach like you have. Otherwise you would not have had to implement it yourself ( halbherzig :/ ) I think we still need some processor to either ensure backwards compatibility and minify assets. I see that saberworm css is slow and likely one does not want to use it. But I fear, that entry-level extension providers seeing the easy development and those, who intentionally write well-formatted code with comments, will lack a well packed JavaScript or CSS in their shared code. The Twig components need to have their own CSS file so they feel like components. We really like the way to re-compose styles by just dropping styles and collect some files and overwrite some variables. The variables are default CSS now but it reads like we will only be able to overwrite CSS by specificity instead of removing it. Maybe theme.json will just become even more powerful. I feel, that the Twig components come really handy with ESI in combination and we can make better use of the cache. When we have a development mode which just symlinks the assets into the public folder we likely can just edit files in the browser and have live editing without to reload (let it reload from a watcher). That would be great as in-browser-style editing has been really good these days. I am in doubt of the adoption. Plugin developers need to adapt this change and you have to either have a big-bang or a way to have both. Looking to the different headless based UIs they are not really supported by plugin vendors and I am not sure whether this work well. The bootstrap 4 to 5 change was already heavy. The removal of csrf_token was heavy for support of two major versions. I do not want to stop you from doing it. But it is just one bumpy ride. And this does not just affect plugin developers. It will also hurt project developers indirectly and they won't see it coming: If you just work on projects you likely do not have to look into release candidates. They likely will just make an update when required (new feature, end of life, …) and then they have to evaluate the costs of an update.
This feels like we have to build a new shop each year for each shop owner. I understand, that this is the issue with technical debt, framework development and a question of support an agency provides by knowing these updates and their way of handling these. The estimation/prediction for the future is also exaggerated. But these are costs each year, that shop owners face. I assume I will read/hear the phrase "We did not have these high upgrade costs with Shopware 5. When we had a plugin for 5.1 it was still working with 5.6" each year again. |
|
I understand most of your suggestions only superficially, so I can't seriously discuss their pros and cons. However, they spontaneously scare me, so I still want to contribute my perspective. We have been supporting Shopware customers for roughly 10 years now. We built our first shop with version 3.5. Since then, we have convinced many customers to use Shopware. Our strength lies in creating highly individualized solutions. If a customer has a request that we find reasonable, we find a way to implement it. Therefore, our customers' shops are highly customized. The themes are self-built and complex. Typically, 20-30 plugins are running, half of which are ours. Many of them relate to the frontend. Migrating to Shopware 6 means carrying over most of this customization. Depending on the project, 30-50% of the project volume goes into the frontend. If everything has to be rebuilt anyway, it also leads to discussions about whether Shopware is still the right shop system. So far, we have been able to convince all major customers that Shopware is still the right solution despite the immense migration costs because it gives us the freedom to customize. The last major updates have also been painful for us. Most of the time we complete a migration only to have to discuss a complex update with the customer shortly after. There are indeed things I would like to see differently in the frontend. They mainly relate to the layout system, which often gets in our way. If I could wish for something, it would be more inheritance, not less. Your proposals primarily scare me. I'm afraid I will have to explain to my customers that we need to completely redo their expensive theme. The proposed changes sound to me as if they were conceived from the perspective of the SaaS version. From my point of view, the target audience for Shopware (in Germany) is not the typical SaaS customer but the customer with complex requirements and special requests. If we can customize less, we lose the crucial USP for Shopware. This is a purely emotional reaction, which may be irrational – hence, I have no clever suggestions, just a plea: Please don't make us rebuild all the themes of our painstakingly migrated customers and don't take away our ability to customize. |
|
My View on the Proposed Changes:
However, in projects where an agency has full control over the template, I see components as potentially more of a hindrance. These client templates tend to be highly customized, and shop owners typically don’t need (or want) the option to adjust them through the admin panel. My recommendation: Develop a "Bare Theme" that carries a long-term backward compatibility commitment. This way, agencies won’t have to worry about Twig blocks shifting with every major update. The Bare Theme could also be structured with minimal includes and blocks to keep the public API as streamlined as possible. This would allow default adjustments without impacting the agency’s customizations, as outer blocks would remain under the agency’s control. Once this foundation is established, the component system could be applied to the current Storefront theme, even if this introduces major breaks at that point. |
|
Thank you for giving us the opportunity to give feedback ✌️ Getting rid of the SCSS theme compilationIf Shopware moves away from SCSS, several critical functionalities currently enabled by SCSS would no longer be possible: Theme Configuration and Variables:Shopware themes heavily rely on SCSS variables to dynamically control aspects like color schemes, spacing, and typography. CSS variables alone are insufficient to achieve the same level of dynamic customization because SCSS variables are processed during compilation, allowing for conditional logic and calculations that static CSS variables cannot replicate. Mixins and Functions:SCSS mixins and functions, such as
Bootstrap Integration:Bootstrap, which is a foundational framework in many themes, relies heavily on SCSS for its theming and customization. Moving away from SCSS would break this integration, making it impossible to use Bootstrap’s responsive grid system and utility classes, which depend on SCSS variables and mixins for dynamic customization. It would also mean that overriding Bootstrap variables would no longer be feasible. Precompiled CSSMany of these dynamic styles rely on runtime theme configurations. Delivering precompiled CSS using static CSS variables alone would not provide the same level of flexibility. SCSS compilation during production is crucial to maintain the flexibility and functionality of current themes. These functionalities are not easily removed, as they are integral to how the themes work and are essential to their success. It’s not just about losing the convenience of reusable code—it’s about themes no longer being able to function as intended without SCSS. This change would lead to frustration among developers and customers alike, undermining the ecosystem rather than improving it. |
|
I'm a big fan of minimalism. I love the opportunity to remove all possible complexity. If we could get rid of webpack and scss that would be amazing! I mena, they were good features back in the day, but modern browser features enable us to build outstanding software with no build process, and that's incredible. Of course, realistically, such break change should only come for Shopware 7. |
|
First of all: Thank you for your continuous effort! I was wondering, if there are any ways/plans to make the storefront "separable" from the core? Reasons being: Load Balancing and, especially, security in depth. In this case, Storefront would have no DB credentials, only the second server would access the DB directly. From the code I can already see that separation, e.g. AccountOrderPageLoader calls $this->orderRoute->load(...) which is the controller method from core that is exposed through an API route. Also, I know of the, more general, Frontends idea. But this would loose the benefit of existing plugins, mostly. Did I miss anything? Is there already a way to achieve this separation for Storefront? Or are there any plans? |
|
Hello Community, Thank you for all your feedback. I am closing this discussion in favour of our new content system prototype. Thank you very much. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Introduction
In this document, we would like to share our ideas for evolving the standard Storefront and the corresponding goals we are focusing on. This concept is subject to change, and its goal is to receive feedback from the community. Please share your thoughts on our ideas and add your own ideas if you like.
To frame it right, the described changes are not the goal of a big-bang update or a Storefront 2.0 or similar. Instead, we want to share the bigger picture of how the Storefront could evolve in the future. We will work towards that step by step.
Goals
Reducing the total cost of ownership
One argument against Shopware, which is often discussed, is the total cost of operating it. Besides typical license and hosting costs, there might be additional costs for customization efforts and the general operation of the system, such as software updates. Major updates, which are due once a year, have the most significant influence on this. The Storefront plays an important part in this, as template changes are currently the most difficult to handle during such an update. They are harder to check and fix programmatically and require more manual effort. One reason is the complex inheritance system used for extending and customizing the Storefront. To tackle this issue, we aim to:
Create a new substantial component system with a more robust public API, which will reduce the need for fragile template overrides via the multi-level inheritance system.
Increasing the possibilities of no-code customization by leveraging the CMS and Theme Builder functionalities in combination with the named component system.
Smaller footprint and better developer experience
We want to reduce the complexity of the tech stack further to make the Storefront easier to operate. One topic that stands out the most is the current theme compilation. It is prone to errors and is a roadblock during deployments. We also want to reduce custom Shopware implementations with existing solutions from used frameworks or native web standards, which will also improve the overall developer experience. The more prominent topics on our list are:
Solutions
New Component System
Our solution is a new component system that offers a more robust public interface designed to streamline and improve the Storefront's flexibility and stability. This new system allows for a seamless extension of the Storefront by adding new elements without the pitfalls associated with the traditional multi-level inheritance. By eliminating the complexities and side effects caused by multiple overrides of template blocks, the new component system provides better control and reduces the need for additional code changes. Moreover, it facilitates faster evolution of the Storefront, enabling significant improvements to be implemented without waiting for major releases, thereby reducing the workload for merchants. Through this new approach, we aim to introduce the following concepts:
Slots instead of blocks
The usage of Twig blocks inside the templates of these new components will be reduced to a bare minimum, reducing the public surface of the component template. Instead, there will be slots, which are named reserved spaces within the component template, that can be filled from the outside with additional content. This will create more encapsulated components with a well-defined public interface. The slot system will also be integrated into the Shopping Experience feature, which significantly increases the possibilities for no-code customization via the administration.
Typical extending instead of multi-level overrides
Components will not be part of a multi-level inheritance system. Delivered components will always stay as they are, apart from the slotted content and exposed configuration options. Instead, a typical extend mechanism could be an option where you create your own custom version of another component, but which will always be a separate component.
More configuration options
The components will offer more configuration options that can be passed from the outside to create more possibilities for adjusting existing components to your needs. These options will also be integrated into the Shopping Experience feature to make it possible to configure components without the need for code changes.
Easy creation of new components
One crucial aspect of the success of such a component system is that creating new components should be as easy as possible. In the best case, a new component can be created by just providing the HTML, CSS, and JS files needed for the Storefront and a little bit of configuration info. We would like to achieve a major goal: every created component should be immediately available in the Shopping Experience feature to make it usable for no-code templating. One option we are currently looking into is Twig Components. It would make use of an existing framework, and the solution would stay close to the Symfony ecosystem. However, one major requirement is that components can be provided via apps, limiting the possibility of PHP code execution. So, we are currently still looking for the best solution here.
Making CSS styling of components more agnostic with CVA
We would like to make it easier to change CSS class definitions on components without the need for actual markup adjustments. The idea is to use the CVA concept, which is also part of Twig Components. Additionally, the styling attributes could be passed via a component’s properties. This also opens the door for optionally using other CSS frameworks in the future.
Getting rid of the SCSS theme compilation
First, we would like to remove the requirement of compiling the theme files during runtime. The Storefront, themes, plugins, and apps will all deliver ready-to-use CSS files, making compilers an optional tool on the developer side. In the second step, we would like to move away from SCSS and rely fully on modern web standards, like using native CSS variables for theme configuration. This would also offer more possibilities for the Theme Manager feature to create custom themes with a lot of customization options without the need for code changes.
Getting rid of Webpack and the general need for bundlers
Besides the theme compilation, we would like to remove the requirement for Webpack and bundling during runtime. The need to compile extensions together with the Shopware core files is especially a big roadblock. Therefore, we will make the use of bundlers optional and leave it to the developer's tooling. Instead, we would like to stay closer to modern web standards and use native ES module loading.
Reducing the amount of Shopware custom CSS
There is still a lot of additional styling on top of the standard Bootstrap implementation. This is actually not needed in many areas, and we would like to remove our custom CSS as much as possible. In addition, we will try to use Bootstrap’s components in the way they are intended and also replace custom components with native Bootstrap components, for example, sliders. With this change, we want to achieve a more clean standard theme, mostly based on the Bootstrap default, that offers more space for individual customization. Making more Bootstrap configuration options available in the Theme Manager will also increase customization possibilities without the need for code changes.
Increasing the possibilities of no-code customization
As you can see from the previous sections, we make these changes with our CMS features in mind. Already named topics for improving the Theme Manager and Shopping Experience capabilities are:
These are already great improvements that will increase the possibilities of no-code customization via the administration. But we don’t want to stop there.
Store Templates
We want to implement a new form of “master” template that lets you create layouts not only for the inner content but for the whole store, including the header and footer sections.
With the additional configuration and theming options, more advanced layouts can be built right from within the administration.
Grid Block
In addition to existing layout blocks, we would like to introduce a flexible grid block where you can configure your own column grid for placing your content.
Outlook
We have a lot more ideas, but these are the short- and mid-term goals we would like to tackle. We'd love to discuss them in more detail. Feel free to take part in the discussion. Please give us feedback and share your own ideas to shape the future of the Storefront.
All reactions