Magento 2 from a front-end developer perspective

I had hard times with front-end part of M2 a the beginning… Oh, wait. Still have. Unfortunately.

That’s why I decide to create this blog – yeah, it’s my first post here.

“What happens? Everybody says M2 is awesome!”

I really like to be honest, even when shouldn’t, so please have in mind that:

  1. I’m a developer
  2. I’m a front-end guy
  3. It’s  just mine point of view
  4. It’s not official statement of any company

Magento 2 is huge step forward, especially when it comes to open source part – moving whole codebase to Github is best what can possibly happened to us.

Overall engine performance was increased, back-end devs says that many things was changed to better solutions and working with 2.x going to be nicer than with 1.x.

But… When it comes to front-end part, unfortunately changes aren’t looking that good. At the beginning let me try to explain, how different are goals of back-end vs. front-end.

Goals of front-end dev

Provide best possible UI and UX to end users. So we should care about:

  1. Implementing design fast and precise
  2. Compatibility with maaaaany browsers
  3. Variety of devices  – Hardware trends, screen sizes, types of input (touch, mouse, screen readers etc.), performance…
  4. Overall web app performance
  5. Accessibility

Hardware trends, users and clients expectations, networks speeds and many more factors are changing rapidly through time. That’s why front-end tools evolves much faster than others.

I’m not into big frameworks (Angular, React etc.), SPAs, ES6, MEAN… whole “JavaScript oriented” world, but care a lot about one thing – front-end devs should make front-end using front-end oriented tools, instead of “weird, limited version of name_of_your_engine_of_choice (i.e. Magento) front-end”.

In our beautiful, full of not keeping up standards browsers, world of front-end, every year brings a lot of changes changes, thats why people laugh about “day without new JS framework”.

(Possible) Goals of back-end dev

Create cost effective, rock stable and scalable infrastructure for processing clients data fast and secure. So any rapid changes, just consistent evolution, improving things one by one.

I know that this might be too simplified description, but hey – I’m not back-end guy, just want to notice different.

1655877_1267887059891336_5563402787800190734_n

Summary

As you see differences are huge, almost like two separate worlds (connected via API)

What is wrong with front-end of M2?

  1. Use PHP to build font-end tools
  2. This tools are slooooow and we can’t extend or customize them, because lack of extensions and our knowledge of PHP
  3. Grunt, LESS, RequireJS, jQuery, Knockout, Prototype and Scriptaculous (yeah, it’s still here for some reason), LiveReload… and possibly many more. All of this things are outdated right now, slowly dying or not popular anymore, but it doesn’t really matter.

You know what really sucks? This things are so damn deeply integrated with whole Magento and closely unchangeable without hard overrides or creating everything from scratch.

That’s my point – Magento 2 font-end looks like designed by back-end devs.

“But you can use whatever you want”

I dreamed whole life about spending thousands of hours overriding Magento core. Cool. Indeed. Thanks for making this possible.

sarcasm_font

Summary

I know I’m now just hating someone else (really hard!) work, but don’t get me wrong – I’m happy that M2 is up, but I don’t like marketing bullshit and talking only about pros of some software software, because software by design is something with cons.

What we should do?

Definitely keep idea of open source – discuss about problems, possible solutions, share ideas, contribute creating documentation or “simply” write code.
We have so strong community around Magento and projects like #RoadToImagine with “Four Horsemen of the Apocalypse™”, proves that good people stands behind Magento, not only technology.

“Did you make first step?”

Yup. We, as Snowdog, created  Frontools, set of Gulp based tools for front-end devs and SASS version of “Blank” theme (LESS sucks… I said few weeks ago about blog post with detailed description of differences between LESS based theme and our version – will be soon, I promise :) )

Of course it’s not a game changer, but definitely good foundation for further projects.

It’s also entry point for me, that’s my first attempts ever in creating something almost from scratch and sharing them to you.

 

Afterword

My English skills are not even close to be good (I’m working on it), so my thoughts were described using simple language and might not express my real feelings in proper way. It might looks like hate speech, but I just want to notice problem and invite people to start working on it.