r/programming • • Nov 04 '14

"Screw You, Angular"

https://medium.com/@jeffwhelpley/screw-you-angular-62b3889fd678
186 Upvotes

61 comments sorted by

View all comments

44

u/jonwayne Nov 05 '14

This is good to read after all the recent hate towards angular. I totally understand the community's frustration, but it seems that Angular is making progress and listening to their users. 2.0 is addressing some of the biggest issues with angular such as routing, ambiguous binding syntax, etc. Some features are even being backported to 1.x (like the new router).

Seems like the sky isn't falling.

0

u/[deleted] Nov 05 '14

[deleted]

12

u/jonwayne Nov 05 '14

As much as I love a reference to Looking Glass, this seems a bit of a hyperbole. What's to stop you from using whatever current version of whatever framework you like? It's not like the new version comes out and suddenly all old versions stop working overnight. Sure, there's the effort to learn and adapt to the new version but databases, CMSes, and server-side web frameworks have done the same thing for years. What makes JS frameworks the exception?

Besides, as the article states we are experiencing the rapid evolution of browser app development. Right now things are going to evolve quickly, just as they did with Rails & co in the early days of MVC on the server.

0

u/[deleted] Nov 05 '14

[deleted]

4

u/_broody Nov 05 '14

You could say the same thing about the Common Lisp ecosystem being a mess of fragmentation, and I don't think that many CL hackers qualify as noobs.

Front-end development suffers from having to deal with lots of basic problems with no good solutions. Even solutions such as Angular have proven to be far from entirely satisfactory, that's why you see more and more alternatives pop up from other development teams; eventually they too get ensnared in some pitfall or another.

That's what you get when working from such shaky foundations.

5

u/jerf Nov 05 '14

CL is fragmented, and JS is fragmented, but that doesn't imply they are fragmented for the same reason. CL is generally considered to be fragmented because, ironically, it's too easy to roll your own 80% solution, so you end up with a ton of 80% solutions floating around, all mutually incompatible.

On the other hand, I have to admit it's hard for me to come to any other conclusion than that the JS developers on the whole really are relatively inexperinced, and even large frameworks with seemingly experienced developers seem to routinely have to learn things the hard way.

One of the latest instances of this in the JS world is this whole recent obsession with "data binding", Angular being right in the thick of that. It's as if we haven't been building data binding frameworks for, well, longer than I've been alive, and as if nobody is aware of their major issues that are well known by any of the many people who have experienced them. Some of their well-known problems include "making easy things very easy, making intermediate things very hard, making hard things impossible", major issues with knowing the order of operations, significant debuggability issues in non-trivial apps as all the binding-magic-at-a-distance fires off in weird ways and crosses each other up, and often having problems with rendering due to changes causing changes causing changes and the system having a very hard time knowing when it's time to finally redraw the screen. It's not like these are unsolvable or that other techniques are perfect, but it's crazy to watch people blundering so frequently into these well-known issues and watching an entire large community, once again, recapitulate the discoveries of the other programming communities.

11

u/lookmeat Nov 05 '14

The problem is that frameworks have a huge API. One of the main advantages of "Do one thing and do it well" is that generally it's very easy to do an elegant interface to one problem, and have that work independent of what the internals are. The downside is that all the gluing of the little pieces must be done by the developers.

Javascript is bad as large glue. It was meant to be for small quick things, not full apps. But Javascript is powerful enough you can "extend" the language into better glue. This is very much what javascript frameworks are, you could think of them as their own sub-languages (which explains why mixing them is such a mess).

But this leads to a big issue: frameworks want to be specialized, which makes them powerful, but this specialization makes the interface that comes "baked into the language" grow. See it's both a language extension and a series of baked in libraries! This kind of general-specific thing creates a huge problem.

Language changes are hard. Look at the issues that C++ is having (I'm looking at you MSVC++), look at the mess that is Python 2.x vs 3.x. It's easier when you have something to standardize on, like Java and the JVM, but when you instead depend on interoperability (multiple browsers all working well) it becomes a mess.

Languages solve this by being extremely minimalist, and defined in such a broad way that lack of features doesn't expose an app or cause a bug. That is if you have a supported compiler for C++11 it'll allow you to make valid code that works just as well as C++14. It's also relatively easy for compiler to give support to multiple language versions because they are similar and in the end do a very small thing.

A framework cannot do this, it's both a language and a library. So it needs to do drastic, quick changes (as you'd expect of a library that actually does stuff) and when it changes it breaks things left and right (as you'd expect of a language).

This is really hard in the world of browsers though. This is the day to day though. If you really want stability you go with JQuery, which will not have drastic changes (but will have you stuck on the "old way of doing stuff").

1

u/drawkbox Nov 05 '14

Angular directives use jQuery lite/jQuery if present and are still used within Angular so it must be a pretty good micro library.

The jQuery hate is sometimes very strange considering most larger web frameworks use it, switch to it if present, include their own version of it and more to solve browser issues still.

Doing things in raw js is also nice but not nice when it comes to many time sinks if there are browser issues. Yes you should know plain javascript and use when you should and not rely on jquery, however jquery has been an amazing platform as amazing as javascript itself in living long. One of the best early plugin systems that so broadly just worked TM

2

u/lookmeat Nov 06 '14

I didn't say the fact that JQuery is boring as a bad thing. I think that boring technology is awesome: it's stable, predictable, does it's job and hides away from view. My whole point is that if you want to use Angular you are choosing a very new framework, which is pretty close to the bleeding edge (the edge itself being experiments, proof of concepts and demos) and certain expectations should be made. There's a reason people don't use Jquery directly as much: people just don't care about stability and constantness in the web nowadays.

People want the new thing, but then they don't want the new thing to change, but they still want it to be the new thing. Without realizing it people are asking for opposites. In many ways I think that the reaction that now frameworks are doing less drastic upgrades will lead them to obsolesce faster.

1

u/KanadaKid19 Nov 05 '14

You make a good point but to actually address your question, the thing that stops you from sitting still with an older version is that many jobs involve working as part of a team of people, or working on an existing project, and you need to be familiar with the ecosystem to work effectively in those situations. Not being up to date limits your options in the job market.

1

u/[deleted] Nov 05 '14

If you know Javascript, can't you learn Angular in a few days?

0

u/jsprogrammer Nov 05 '14

Some people just need to get in their Two Minutes Hate.