- Where are we going to?
- What is the sense behind this syntax?
- Can we go back to HTML/CSS/JS when the hype's over?
- Where are we going to?
- What is the sense behind this syntax?
- Can we go back to HTML/CSS/JS when the hype's over?
This is the root of your consternation. Like everything in our industry - experiment, build, then judge. I was a naysayer initially too. Then I tried React, Redux, styled-components, etc. and now I'm a believer. Combine this with modern CSS like Flexbox and CSS Grid and it truly is a golden age of web development!
On the one hand: It is powerful at automating some the typical tedium you always have. It gives you a better chance to end up with a decent view model, by forcing it upon you.
On the other hand: You lose control. Almost always you can gain it back, but it is an uphill battle. If you know you need low level control (for example over complex animations and interactions in your UI) you've got to think carefully.
It all comes back to perspective. As an interaction engineer I really hate the process of trying to make a specific animation work the way I want inside of a React managed DOM. As an application developer, the purity of the approach is extremely attractive.
Also I must brush up on Grid. It's about time we got rid of god damn tables.
What are the current Dojo? Or the current Mootools, prototype?
Backbone is an elegant library but I think its popularity and ecosystem were on a decline even before Walmart -- which was one of the biggest corporate contributors (e.g. Thorax [0]) -- did a complete overhaul in 2016 to React [1]
[0] https://github.com/walmartlabs/thorax
[1] https://medium.com/walmartlabs/publish-react-native-bundles-...
Backbone has Models, Collections, a Router, History, Sync, View and Utilities.
In contrast, React is only the view part.
So, it would be closer to say that React is just the View part of Backbone, you need to bring in the rest yourself.
Once you work a bit with React/Angular/Aurelia, you start noticing that having your styles somewhere in a stylesheet is somewhat clumsy for reusable components or overly dynamic components.
You end up having to refactor with your stylesheets very often as your app grows and things can quickly turn into a mess.
You are then tempted to put style="" declaration in your .jshtml (or equivalent) templates but that's a also mess. So your start developing a way to inject styles into dom elements. This then grow up into some strange frankeinstein that no other devs can work with because you documented nothing... so you simply start using https://www.styled-components.com instead.
>- Can we go back to HTML/CSS/JS when the hype's over?
Frameworks like React and Vue make building large, complicated front-ends a lot easier and predictable.
The alternatives are shoehorning React into simple content-centric pages (bloat), or stitching together a bespoke set of logic for a large complex app noone will be able to maintain (spaghetti).
I am quite happy with VanilaJS™, but I do sometimes use jQuery as well.
Likewise, I think there's value in scoped work, as opposed to the mess than can come of globals. Otherwise you find yourself hard-coding !important when you need to make something work.
I prefer "build on lessons learned from" to "going back to" :-)