10 minutes to read

Interview with Warp award winner Alexander Barton: “My experiences as a developer with Shopware Cloud”

Interview with Warp award winner Alexander Barton: “My experiences as a developer with Shopware Cloud”

To the German article

Alexander Barton from Shop Studio is the winner of our Warp award – the special prize for the fastest app developer in our app contest. He already introduced his winning app Back in stock notification on the SCD. He tells us all about it in this blog article because he would like to share his Shopware Cloud experiences with other developers.

It is now here - the new Shopware Cloud. Your own shop as an all-round carefree package in the cloud. For shop operators this means: no more looking for hosts, no bringing in manual updates, no creating of cronjobs in the background, no SSL certificate renewals, and much more. Almost all the initial hurdles to developing a shop seem to simply disappear before your eyes! But what about us shop developers? Should we be worried that we won’t be needed in future? Now that routine Shopware tasks themselves are increasingly being taken over in the cloud? Not at all – there is plenty to be done! In Shopware Cloud too, everything always revolves around just one thing: apps and themes. In this article, I want to give practical insights into the experiences I have had as a developer with Shopware Cloud and why the future of ecommerce might feel like “cloud 9”.

Where do I start…?

How did I actually come to develop apps for the new Shopware Cloud? That is an interesting question. Admittedly, I took quite some time to make friends with the mystery that was Shopware Cloud. Somehow it was just suddenly there, but I didn’t really know what to do with it. What was possible? Where are the limitations? Is it worth investing time and energy in development?
So I started my research with my trusted search engine to find answers to these questions. I found out that the Shopware Cloud offers some advantages to us as developers, as for certain extensions it is much more useful to develop them as apps rather than as traditional plugins.

The benefits of the cloud

I would like to clarify one thing straight away: no, you cannot directly extend or alter the PHP code of the Shopware core, as the cloud has no option for this. That is no bad thing in itself. It simply means that only with the help of Twig, JavaScript, Webhooks and REST API can 100% compliant functionalities be developed for the cloud (packaged in apps and themes). Each developer must adhere to these standards and best practices, for there are virtually no technical options to cheat and send shop operators into a state of panic with random third party code. And, because it is so clearly defined, even after a larger Shopware version upgrade, it is highly likely the application will work without major adaptations. That saves a great deal of time with the maintenance of apps and themes. My recommendation is actually that with new functionalities we should always check first whether these are compatible with the Shopware Cloud. If, for example, your new functionality can only run with JavaScript and Twig, then you should create an app rather than a traditional plugin. Another benefit with apps: not only do these run in the Shopware Cloud but also in self-hosted shops.

But my app has to be able to do XY and Z

Of course, not every application can be implemented with JavaScript and Twig alone. Sometimes there has to be a reaction to certain events such as a sale, to then execute a user-defined code such as sending an order SMS. What happens here? None of it is a problem as there are webhooks and REST APIs! With webhooks, notifications can be sent to a URL that you specify, if for example, something new has occurred in the shop. With the REST API additional large volumes of data can also be retrieved and manipulated. However, this ultimately also means that your own server, which is accessible for communication with the Shopware shop online, must be booted up. Admittedly, this type of app takes more effort to programme than, for example, using JavaScript and Twig. The more so because there is the question to start with of where you should actually host this server? The positive thing is the flexibility. As I have a strong AWS background, for example, I decided upon AWS. That gives me maximum flexibility to implement my ideas. “Oh no, the mighty AWS”, you will probably think? I’ll let you into a secret: for 95% of applications only a webspace and a standard MySQL database are required. Therefore, shared or managed hosting can also be used. My tip: Platform.sh is a really good choice for this.

How do I extend the admin?

Believe me, it’s not that difficult. As with PHP classes too, the JavaScript of the admin cannot simply be adapted. The insertion of admin modules runs a bit differently to normal, namely via iFrames. In our context, iFrames offer the option of displaying a URL you have selected within the admin in Shopware. It is therefore possible to extend the admin with the help of your server. For example, you can send notification via a special configuration file (manifest.xml) that Shopware needs to prepare a special page in admin, where your own content can be loaded. Everything can be presented within this special page. For example, your own Vue or React scripts can be integrated and an attractive UI prepared for comprehensive functionality. However, there is good and bad news here. The bad news first: within iFrames, for security reasons, there is no access to styles and scripts from Shopware admin. This presents a problem in this sense, as the look and feel of Shopware should be preserved and many time-consuming admin UI elements now have to be reprogrammed. And now the good news: there is already a complete and free Vue plugin, in which these same UI elements can be used outside of Shopware. So, the shop operator will barely be able to differentiate between whether your UI comes directly from Shopware or another server. Almost magical isn’t it?

How the journey continues

Shopware Cloud is a journey that has only just begun. Thus, there is still a lot to do. Personally, I am very excited about how the cloud and associated app ecosystem will develop. Also, about the thrilling technologies that can be used in the future to create a new pace in the ecommerce environment, which will lead shop operators and end clients through everyday online business. As a developer, I can say one thing already: simply try out Shopware Cloud and use the huge potential for your own apps and themes. It will be worth it!

Take part in the app contest

Have Alexander’s experiences inspired you to develop an app too? Then take part in the app contest. Submit your app by 15 October 2021 for a chance to win prizes worth more than EUR 100,000 in total.

To the app contest

This content might also interest you:

Newsletter

Never miss out - get all the latest news sent straight to your inbox.

To the newsletter manager