r/javascript • u/treyhuffine • Dec 11 '18
A Recap of Frontend Development in 2018
https://medium.com/gitconnected/a-recap-of-frontend-development-in-2018-715724c9441d10
u/phouri Dec 11 '18
Great writeup! I didn’t realize angular is gaining traction, I thought it was losing the battle.
I think Vue will gain more popularity than you might think due to its super easy learning curve and better reactivity (imo) than react (without mobx).
Can’t wait to see what Webassembly is going todo.
12
u/treyhuffine Dec 11 '18
To be honest, I thought the same about Angular when I started the article. Then I started looking at the numbers, and I was totally wrong. I've talked to people that use it professionally and the consensus was that it forced everyone to be aligned on conventions (doing things the Angular way) and they didn't have to put in time keeping their build pipeline up to date
10
u/juicejug Dec 11 '18
Yeah I’ve heard from some engineering managers that they pick Angular precisely because it’s super opinionated and comes “batteries-included.” You spend much less time making technology decisions and onboarding new devs. If you hire someone with Angular experience you can hit the ground running, and even if they’re new it doesn’t take long to get them up to speed since there are not many ways to do things. It’s a trade-off for sure (not as flexible) but I can definitely see how it’s valuable.
2
u/Treolioe Dec 11 '18
You can still do pretty much what you want and abstain from the included batteries if you so wish. I don’t know why you would want to that though, heh
13
u/greygatch Dec 11 '18
only 1/5 frontend developers have used GraphQL, but a staggering 62.5% of developers have heard of it and want to use it
I'm in this camp. Personally, I'm waiting to see a GraphQL client (Apollo?) to become the standard.
P.S. Hey, Trey! Hope you're doing well since CH. Go Dawgs!
2
3
u/vidarc Dec 12 '18
I love apollo so much. I push for it at work whenever I can. Their libraries are so easy to use and well designed. With their client side stuff, you can even dump redux (or whatever state management you are using) and just use apollo.
17
u/omgdracula Dec 11 '18
I am not a fan of CSS-in-JS though this is the first time I have ever heard about it.
25
u/treyhuffine Dec 11 '18
I was skeptical at first too. I forced myself to build some projects with it though, and now I can't go back to normal CSS. The developer experience is just unbeatable.
9
u/omgdracula Dec 11 '18
I am curious since the css is within a js file that would remove it from being render blocking correct? Or is CSS-in-JS only used for certain things? I use Sass a lot and if I had to lose Sass I would hate it. Going back to projects written in normal css sucks already.
19
u/kgwebsites Dec 11 '18
If you use styled components, it essentially like using sass in js on steroids since your variables are actually dynamic and can change post compile.
6
u/omgdracula Dec 11 '18
Ah it seems like this would be used more for apps vs full website builds. At least to me. I could be wrong.
7
u/beeboobop91 Dec 11 '18
Well i think you can still make full websites with css in js, however i have noticed when doing it that way it becomes easier to drift away from some theme your building.
4
10
u/leeoniya Dec 11 '18
i write CSS in JS [1] precisely because SASS is its own language. its loops have specific semantics, mixins, etc. etc.
with a pure-JS solution, all i have to do is write regular javascript loops. mixins? just function calls. extending?
Object.assign(). you get ES6 module imports and tree-shaking for free. i don't have to learn any new languages, pull my hair out how to put together stylesheets that i could easily assemble myself if only i had the power of an actual programming language.1
1
4
Dec 12 '18
I'm not with the others, I hate it. It turns into even more of a spaghetti mess than anything else.
2
u/omgdracula Dec 12 '18
I could see that. It looks neat for certain states, but I would never write full css in it
0
Dec 12 '18 edited Dec 12 '18
Why though? Never understood the sentiment. Why the W3C is pushing for DI is beyond me, as well as introducing a shadow dom just to encapsulate. These are all backward incompatible features that need browser support, years to proliferate and are basically band-aids - all this trouble just to keep css as an artifact?
Have you tried styled-components yet? I think it makes so much more sense than what current specs are trying to do. And we've been there before with HTML, which was also brought to javascript, and it's better off that way. If you browse through code like this (click styles.js), what is it that irks you so much?
1
u/omgdracula Dec 12 '18
I said before in another comment thread that I am sure this is great for web apps, but for websites all the css animation I do with keyframes and everything would look like hell.
1
Dec 12 '18 edited Dec 12 '18
I don't see the contradiction. You can do keyframes just fine in there, as well as queries, special selectors, events and everything else. How, or why, would it look like hell? Also, web apps, web sites, to me they're the same thing, why would you change the way you work just because one project scrolls vertically and the other doesn't?
1
u/omgdracula Dec 12 '18
Styled components would literally do nothing for me at all. Sure you can do everything you need but it doesn't offer anything over Sass to me. I would have to download a specific library and keep it updated for literally no gain.
Not to mention a decent amount of our clients are heavy traffic clients where javascript being disabled has been an issue.
I would say web apps and sites differ more than you think.
4
u/stolinski Syntax.fm / Level Up Tutorials :upvote: Dec 11 '18
CCS-in-JS is a lot cooler than you would think at first glance. I was not a fan until I tried and loved it.
3
1
62
u/neotorama Dec 11 '18
i spent too much time upgrading packages and searching for solution than writing code
26
u/tsmuse Dec 11 '18
Don’t forget all the hours you’ve spent configuring or debugging webpack config :p
5
14
u/simkessy Dec 11 '18
Past week I've killed about 3 days trying to get various apis working without getting CORS errors :(
2
u/trollerroller Dec 12 '18
If you mean npm packages, I highly recommend going back to LTS carbon (v8.12.0) I tried to be cool a few months back going to the newest version (10.something.something) and all of my project dependencies, even create-react-app apps, went to shit. Since rolling back to 8.12.0, everything has been working super smooth.
1
u/TotesMessenger Dec 11 '18
1
u/bart2019 Dec 12 '18
So all front-end is React, Angular and their ilk? I feel like that is going overboard. Most websites don't need that heavy-handed approach.
0
u/arya-nix Dec 11 '18
WebAssembly seems promising if you want to use other languages. But my personal opinion is that it will not see much adoption if that remains the case. JavaScript is very mature and getting better everyday and is specialized for the job
I am not predicting the future but the only case I can see is WebAssembly being used by IDEs to provide augmented functionality.
Anyway thanks for good night read.
0
0
31
u/jrvkxzcf Dec 11 '18
This was a really balanced and well-researched article. Great work!
Since you mentioned Vue's scoping in the CSS-in-JS section, it might also be worth mentioning that Angular also supports CSS scoping out of the box. In fact, it's the default. In Angular, it's called "view encapsulation".
Docs here: https://angular.io/guide/component-styles#view-encapsulation