Blog
Division of roles
Working traditionally with Magento 2, as a frontend developer, is a difficult path to tread. The code is somewhat intertwined and this division between frontend/backend is almost non-existent. For example, let’s say you are working with a PHTML file and you discover you need to move the location of the associated block on the page. At this point you are writing XML… the browser never sees this, it is not frontend code. Then, you discover that you need to render some additional information on the page, which results in you inspecting PHP block classes. Again, not something the browser directly sees. It is easy to make the argument here that you are no longer a frontend developer, but more full stack – with a specialism in frontend development.
Venia clearly illustrates the intended architecture for Magento PWAs: the react/frontend code is entirely separate from the Magento instance; they can indeed be served by entirely different servers. For agencies and for specialised developers this is great. What this allows is for agencies is to more easily employ and keep dedicated frontend/backend developers. They don’t even need to be working from the same repository.
I would argue that an agency working with PWA Magento applications would ideally have more in-house skill on the frontend side of things than on the flip side. Sure, there will be custom features with custom API work, and someone/ some people will be required to work on that, but this will likely be a minority of the work involved with constructing potentially bespoke PWAs.
JavaScript developers needed
It was previously possible to work as a full stack Magento developer with fairly basic knowledge of JavaScript, excluding maybe some certain areas – such as the checkout and admin – as a lot of the pages were just server-rendered PHTML files, with associated blocks/layout. It was certainly possible for full stack developers to comfortably work with Magento. The code written on the frontend may have been syntactically invalid, inefficient or not reusable, but they could certainly get by.
The PWA movement will change this. Working with React shifts a lot of the complexity to the frontend and makes it so that a full stack developer’s role is someone less focused on the backend. If a full stack role was previously backend 70%/frontend 30%, working with a modern SPA/PWA reverses this.
More responsibility given to UI / Frontend developers
A frontend developer’s role working with Magento could previously consist of 90% HTML/Layout/CSS updates. It would often seem much more of a visual, high throughput but low complexity role – providing you have the necessary experience and are comfortable working with it.
React applications, on the other hand, can be truly complex systems. Just as, or even more, complicated than server-side code. Components can be highly nested, they can be manipulated and respond to global state changes (with redux) and they can also be highly reusable. This means at least two things for frontend developers working with Magento: more responsibility and more complexity.
The potential to minimise repetition
Good developers hate repeating themselves. They will go to whatever lengths necessary, to not do work that is not necessary. That is, by no means, to say that they’re lazy: it is that good code is reusable code – in a lot of cases, anyway. React opens up the possibility of agencies developing React Component libraries that somewhat springboard new applications. Venia is an example of this. It can be included and used as a library, you can import components and reuse as you see fit. You can also do this yourself, if you feel like there could be some minimised duplicate effort across multiple projects you have upcoming.