Would an Angular PWA be the better Venia theme for Magento2?

Dec
7
2018

There shouldn´t be the question if it would be better. The question should be for who?

Really nobody likes this Angular vs React stuff, every solution has it’s pros and cons. The essential question is would you choose Angular because you know React is not the right tool in this case for your customer? Sometimes this also means to send this customer away. But when is React the right tool and when is Angular the right tool? So I´d like to do is not present you a typical Angular vs. React comparison.

Some general key-comparison facts

Angular vs React - Some general key-comparison facts

After reading these key facts you might think React is heaps better because it has more stars, more contributors and fewer issues. But the big difference is the application type and React is still a frontend-library. So if you want to reach the same features with React that Angular brings out of the box you need a lot of components. To give you an impression about how many, you can check this React awesome list. So to update the key-comparison facts table above you need to add the issues and starts of the React components that are provided by Angular out of the box.

So what have we learned already? React is more lightweight then Angular. React gives the developer more flexibility. But with big flexibility there comes the big chance to build legacy code that nobody understands afterwards. It depends on the experience of the developer team you have or hire to build your new shiny Venia frontend.

I often asked myself why Magento choose React as the base for their Venia theme? Sometimes when I’m in a bad mood I hear a voice that is saying: “They liked to mix HTML and PHP and now they like to mix HTML and JS.” and when I’m in a good mood I hear the same voice telling me: “There are more React developers out there, also Magento need a lightweight frontend and not a complete framework.”. You see it depends 😉

So when would I suggest to choose Angular instead of React for your customer? First and the most important thing: You need skillful and experienced javascript developers that like to build a storefront from the ground up and they are not shy to throw things away or rebuild complete components. Secondly, you need a big customer with a vision, time and, of cource, money. Thirdly, you need an idea how to build up a flexible headless infrastructure. Fourthly, the storefront you will build will solve a lot of pain points for the customer and will bring shiny new features to the buyers of your customer like easily personalized category pages, homepages, offline shopping and so on.

Would I suggest somebody to use the Venia theme at the moment (this is written in December 2018)? Yes, if you have really good javascript developer team 😉 and they want to build a lot of features from the ground up. If you are a small- or middle-sized customer I would not suggest using the Venia theme to you. If you want to know what kind of features are already in the Venia theme you can check the roadmap (at the moment we are in phase 2). You see a lot of important features will be ready in the future. Maybe you should check if DEITY Falcon or Vue Storefront has all the features you need.

I already wrote a blog post about PWA for small- and middle-sized customer (in german). Additional hint: Please do not think that PWA === Headless this is just not true. It is possible to use a lot of features without the need for a headless application. But normally when you do a complete new frontend then you also want to have the headless and offline shopping stuff.

If you want to use Angular as a headless frontend, Magento2 for the backend, Lizards and Pumpkins as a middleware, ElasticSearch for search, payment provider like Klarna or Payone or Paypal and you want an enterprise solution that is unit-tested then you have to ask Flagbit about their solution. In 2019 we will give back our angular storefront and our base components to the community (open source).

At the end I will leave you with a Quote from Andrei Neagoie from 8. November 2018

Angular is the entire kitchen that gives you all the tools necessary for you to build the meal that is your web app . If I am a bank with lots of developers, I like Angular to keep everyone working in the same pattern.

React is the oven. You most likely will need more tools to bake that cake, but it allows you the flexibility to pick and choose what tools you want based on your needs. If I’m a tech company with strong senior developers that can make good decisions, I like React.js.

Vue is the microwave that allows you to get up and running really fast and make your cooking life efficient and easy. If I am a startup with a young developer team and a strict deadline, I like Vue.js.

Resource List

Kommentieren

Your email address will not be published. Required fields are marked *