r/programming • • Nov 04 '14

"Screw You, Angular"

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

61 comments sorted by

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.

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.

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.

14

u/Cuddlefluff_Grim Nov 05 '14

If you need handholding with factories and providers and service provider factories then consider that the world doesn’t need your bullshit code and go and get a job you’re actually good at. Stop ruining it for the rest of us.

That's a fairly stupid quote..

17

u/x-skeww Nov 05 '14

7 months ago, no one at /r/javascript bat an eyelash.

We’re working with the Traceur team to build support for a few extensions like annotations and assertions. We call this set of extensions "ES6 +A".

They just renamed that to AtScript.

We’ll see a less complex DI by eliminating the config phase, simplifying the syntax by using declarative-style ES6+ annotations instead of imperative.

In the Q&A section they also mentioned that there will be breaking changes. "Porting will be fairly straightforward but not free", they said.

Anyhow, all those knee-jerk reactions are pretty misguided. You won't have to port your 1.x project to 2.x. In the vast majority of cases, you probably want to stick with 1.x until your application retires. Even if it sticks around for another 5 years or so. Simply because it's the more economical option.

It will take at least a year until the first stable-ish build of 2.x is out and it probably won't support IE8. It probably also won't support 9 and 10, because those already dropped below IE8's levels about a year ago.

If you can't drop those browsers in 18 months or so, you won't be in a position to make the switch anyways. 2.x is aimed at the evergreen browsers. The seemingly utopian future where horribly outdated IE versions are irrelevant.

The IE update rate accelerated quite a bit in recent years. If Microsoft keeps that up, we'll get there, eventually.

0

u/[deleted] Nov 05 '14

[deleted]

6

u/KGZM Nov 05 '14

From Misko's keynote it seems the intention is not to create a new language.

He explained that the goal is for this to be true: AtScript ⊃ TypeScript ⊃ ES6 ⊃ ES5

And the intention is for Angular 2.x to work fine in all of these languages. Possibly with the help of Traceur to compile ES6 to ES5. So people will still be able to write JS or use CoffeeScript or something else. So AtScript will basically be a bunch of macros to add decorates to TypeScript, and TypeScript adds type annotations to JS.

He said they're very interested in working with the TypeScript team to standardized type annotations in a way that allows run-time introspection and such.

He said they're not making a language and it really doesn't sound like they're trying to force everyone to accept a language just to use Angular. Instead it seems like they want to add a few features on top of what TypeScript provides to allow for more concise code and greater expressiveness without breaking support for standard JS.

Personally, I'm excited for Angular 2 whether or not I adopt AtScript. (I'm also really excited for the ES6 features to become available.)

8

u/mariusg Nov 05 '14

Actually Golang is the front runner when it comes to languages at Google. Dart seems just a distraction.

3

u/x-skeww Nov 05 '14

I've played around with both Dart and TypeScript and I have to say that TypeScript is just a better experience overall.

TS interacts seamlessly with JavaScript. That's the only thing it does better than Dart.

That's a very nice feature, but it isn't necessarily the most important thing for everyone.

Personally, I don't care if interacting with JS is a bit clunky. Only some of my code is run in browsers and I don't intend to interact with any JS libraries. I might interact with Google Maps stuff at some point, but that's about it.

Anyhow, AtS also compiles to Dart, in case you weren't aware. While Dart compiles to JS, it's currently not a viable choice for writing frameworks/libraries which are meant to be used from JS land.

If AtScript is going to be driven by the needs of frameworks like Angular then that is the wrong motivation.

Is it? Aren't pretty much all languages driven by some need of some individual/group/company/whatever?

JS is like that. TS is like that. Dart is like that. C# is like that.

Well, some esoteric languages would probably meet your criteria, but I don't really see how "dicking around for the lulz" is a more legitimate motivation.

Anyhow, keep in mind that AtS isn't really a new language. It's ES6 with some type and metadata annotations hot-glued to it. It's a fairly simplistic stopgap solution.

0

u/[deleted] Nov 05 '14

[deleted]

1

u/x-skeww Nov 05 '14

Furthermore the people doing all the design work on C# and TypeScript are actual language designers who have been doing this kind of work for decades.

AtS is design-free. It contains zero new features.

I still can't tell if [Dart] is mostly server-side or client-side language.

You can use it for whatever you want. The standalone VM comes with libraries for doing I/O. It's basically like Node right off the bat.

Like V8, the VM itself is a C++ library which can be embedded in other applications.

I use Dart for everything: client, server, and command line tools.

The tooling gives you plenty of room to scale. It's also pretty fast, which means you can also do some number-crunching if you want. It's a nice mix of good tooling, terseness, and performance. You can use it for a very wide range of applications.

If all AtS is doing is adding metadata annotations then I'd much rather see those additions in TypeScript and for Angular to co-opt TypeScript.

Yes, AtS only exists because TS doesn't do these things yet.

That's not gonna happen though is it?

It probably will, to some degree. Ideally, ES7 will do all those things and TS and AtS will be put on eternal hold.

Anyhow, before that happens TS and AtS might merge. Personally, I think that would be the best case scenario. We really only need one TS-like language, but it probably should support things like metadata annotations and type introspection, because those features are kinda handy.

0

u/[deleted] Nov 05 '14

[deleted]

2

u/x-skeww Nov 05 '14

As far as I understand it, this stuff is mostly interesting for having some kind of "developer mode".

With Dart, you use the so-called "checked" mode during development. This helps to catch and identify all type-related errors.

With AtS, you could do something similar. You'd generate instrumented JS to make development easier, but you won't ship it like that.

-1

u/myringotomy Nov 05 '14

Of the two companies more people trust Google than Microsoft.

6

u/el_muchacho Nov 05 '14

Not when it comes to languages and language tools. In this regard, Google is made of independant groups of hackers that don't talk to each other. There is no large scale vision.

-18

u/myringotomy Nov 05 '14

Especially when it comes to languages and language tools. Only windows developers use microsoft languages and tools. It's a closed ecosystem. Just like only windows developers use typescript.

4

u/e5ee37 Nov 05 '14

please atleast read the wiki page about something before commenting

-1

u/myringotomy Nov 06 '14

Sorry didn't mean to insult your favorite corporation.

2

u/e5ee37 Nov 06 '14

thank you.. :) hope u start reading!!

0

u/[deleted] Nov 05 '14

[deleted]

2

u/atakomu Nov 05 '14

I trust Google more. Why? Tools work on Linux. :) Eclipse for android is multiplatform same with new intelij. Same with Dart editor.

Microsoft has Typescript which is only thing that actually has official Linux "port". It isn't actually a port but official plugin for Vim and Emacs. Other things from MS are MS only. There is Mono. But this is pure C# without Forms and new stuff. And no form creator and other goodies.

-23

u/myringotomy Nov 05 '14

When it comes to the tools I use as a programmer Microsoft is leagues ahead of most others.

You are one of the people who live in the Microsoft ecosystem. You use windows, you develop in windows, you use microsoft tools to do that. It's the so called "golden cage". People who develop in windows use microsoft products people who use microsoft products use windows.

Google has a terrible track record with tools for programmers.

This is an outrageous statement and one that is going to cause me to disregard everything you say from now on. I just can't trust your rationality any longer.

4

u/[deleted] Nov 05 '14 edited Nov 05 '14

Google has a terrible track record with tools for programmers

Android developer here. This is absolutely correct. Google has plenty of great developers doing work on core frameworks and libraries. A lot of this is open source, which is nice and cant say that often from the other big companies. However their developer support (tools, documentation, sample projects) is years behind apple and MS. For example the fact that getting TDD up and running in their primary IDE (Android Studio) for android development is nearly undocumented and breaks with every new release of gradle is outrageous from a development standpoint but is basically just a "developer" issue for google and not a consumer issue so is somewhere lower down their priorities.

-10

u/myringotomy Nov 05 '14

You are confusing issues.

You think google documentation sucks, you think their tools suck well that's your opinion and you are entitled to it. But to say that programmers don't trust google is something completely different.

0

u/[deleted] Nov 05 '14

[deleted]

-25

u/myringotomy Nov 05 '14

Disregard whatever you want but instead of getting so offended and holding others to such a high standard of rationality that even you can not meet I'd suggest a more relaxed attitude towards strangers on the internet.

I am not offended at all. I simply lack respect for your opinion. The fact that you mistook the two is confirmation of my assessment of you.

0

u/[deleted] Nov 05 '14

[deleted]

2

u/x-skeww Nov 05 '14

http://www.reddit.com/r/programming/comments/2lb2nk/screw_you_angular/cltcrex

AtS also compiles to Dart, in case you weren't aware. While Dart compiles to JS, it's currently not a viable choice for writing frameworks/libraries which are meant to be used from JS land.

By the way, most of the fancy 2.x ideas came from AngularDart.

0

u/[deleted] Nov 05 '14

[deleted]

1

u/x-skeww Nov 05 '14

Right now there is AngularJS (written in JS) and AngularDart (written in Dart).

The big idea is to have a single codebase for both (written in AtS).

2

u/el_muchacho Nov 05 '14

He said they're very interested in working with the TypeScript team to standardized type annotations in a way that allows run-time introspection and such.

By creating a third codebase. That's not a big idea, it's a stupid idea.

8

u/[deleted] Nov 05 '14

[removed] — view removed comment

2

u/chrisoverzero Nov 05 '14 edited Nov 05 '14

I think they said that they are, in their presentations. I can't easily cite a video, though, so the best I can back that up is from the TypeScript team. I'll try to get a timestamp when I have video access. (Or admit that I misremembered.)

Edit: This video outright claims that AtScript is a TypeScript superset, around 28:45.

-11

u/myringotomy Nov 05 '14

Microsoft doesn't work with other companies very well. It rarely works with them at all.

7

u/[deleted] Nov 05 '14

It really seems like the Angular guys never read up on the Osborne effect. http://en.wikipedia.org/wiki/Osborne_effect

11

u/GeorgeForemanGrillz Nov 05 '14

Angular is too bloated. I prefer knockout.js

7

u/d_abernathy89 Nov 05 '14

I like Knockout, but they are very different tools.

2

u/dotnetjohn Nov 05 '14

I think really it was Durandal vs Angular with Knockout just being the data-binding aspect of the Durandal stack. For me personally I will keep using Knockout until Angular 2.0 is released then reassess the situation.

3

u/strattonbrazil Nov 05 '14

They are very different approaches to solve the same problem. Let's not take the tool analogy too far.

5

u/d_abernathy89 Nov 05 '14

nah, I don't even think that's true. knockout does data-binding/components and that's about it. it isn't opinionated and can be dropped into any project, even for just a tiny piece of UI.

I haven't used angular myself, but my understanding is that it's extremely opinionated, and it can't just be dropped into a project to handle a small piece - either your project is an Angular project or it's not. it does a whole lot more than knockout.

so I think they solve pretty different problems.

3

u/ridicalis Nov 05 '14

As a Wordpress developer in my day job, I regularly toss in Angular to spruce up various components (both admin-side and public-facing) that are data-heavy. I think once you introduce routing that you're essentially defining your code as a single-page app, but up to that point it lives in its own happy little world as a child of whatever it runs in.

1

u/d_abernathy89 Nov 05 '14

perhaps i haven't understood Angular that well then. if it really can be dropped into an existing project and live alongside your existing code well, then i'd say /u/strattonbrazil was right.

however, that makes me wonder - why not use Knockout for that purpose? It still seems to me better suited for handling data-binding outside of a SPA or a very large project.

1

u/strattonbrazil Nov 05 '14

why not use Knockout for that purpose? It still seems to me better suited for handling data-binding outside of a SPA or a very large project.

I think that's an opinion of which one you like better. Some people describe angular's binding as "magic"--some in a good way and others not. Knockout uses MVVMs while angular has these Model-View-Whatever's scopes, but both embed their "directives" in html, which makes them more similar in many respects than backbone or react, for instance. At that point I don't see how one is really better suited than the other besides not using all the features of angularjs, but I wouldn't hold that against angular. I've only built smaller snippets with angular and have really enjoyed knockout professionally and on personal projects, but I wouldn't say I've seen enough of angular to say confidently it shouldn't be used on small projects. I haven't seen anything that would say it wouldn't do fine on a small portion of a web page.

1

u/ridicalis Nov 06 '14

The honest answer is that I found Angular first. I enjoy its templating syntax and after taking the time to understand it found it enjoyable. If I had found Knockout first, the story may have been different.

1

u/d_abernathy89 Nov 06 '14

That's my story with Knockout versus Backbone, etc, too :)

1

u/[deleted] Nov 06 '14

As a Wordpress developer

Just say PHP, Wordpress might bring incorrect assumptions on your skill level. :)

1

u/GeorgeForemanGrillz Nov 05 '14

Different paradigms/approach to solving the same problem.

8

u/santiagobasulto Nov 05 '14

Why people keep comparing this to Python 2 vs Python 3???????

0

u/[deleted] Nov 05 '14

[deleted]

17

u/santiagobasulto Nov 05 '14

I'm only qualified to speak about Python. Python didn't have that much change from version 2 to version 3. The problem was the libraries and tooling. Angular is changing almost everything! I don't think they even compare.

2

u/atakomu Nov 05 '14

The most breaking thing is change from string to bytes, and print function.

I wanted to start a project in Python 3 many times. But I want to use library X and is not available in Python 3 and I'm back at Python 2. But it's getting better and better. Maybe when Python 4 will be out we could move to Python 3.

1

u/santiagobasulto Nov 06 '14

Yes, the problem are the libraries. They didn't change the whole freaking language (like Angular did changing the framework and even introducing a new language)

3

u/[deleted] Nov 05 '14

Python did change a lot between 2 and 3, enough they they're different languages that aren't easily interoperable; so much so that the projected end of life for python 2 keeps being pushed back.

1

u/not_a_novel_account Nov 06 '14 edited Nov 06 '14

The handful of total incompatibilities are almost entirely limited to string handling. Python2 and 3 are so close that the same codebase can often run under both with only a minor amount of foresight and negligible coding overhead.

The problem lies in the mature Python 3rd-party ecosystem that (understandably) took a long time to port to Python3 while continuing development for Python2 in the same codebase.

Angular1 to 2 is a drastic departure in comparison to Python, but I can understand the comparison from a "the language founders don't understand what this will do to the community" point of view.

37

u/[deleted] Nov 05 '14

[removed] — view removed comment

38

u/ameoba Nov 05 '14

... and nobody wants to admit to being a VB programmer.

2

u/[deleted] Nov 05 '14

Wait... there was a VB7?

6

u/LeslieHughesLDP Nov 05 '14

VB7 = First version of VB.NET

1

u/drawkbox Nov 05 '14 edited Nov 05 '14

Simple question to ask about your framework: Does it help you build your app, or do you spend all your time getting your framework to do what you want? Does it get you closer to standards that are actually used in web development or does it create new ones that don't translate outside of the monolithic box?

Monolithic frameworks take over, microframeworks help fill atomic feature needs. If you like monolithic you will like Angular, if you like microframeworks, eventually Angular will bloat and become a problem.

If you are on a team, monolithic frameworks can help make code consistent instead of 10 competing custom or microframeworks. But ultimately angular is closer to rails than sinatra, django than flask, etc. If you like that you'll like that, if not you will hate Angular as it takes over the root of your app rather than enhances an existing design. You have to start with an Angular app.

Javascript full frameworks are new so of course they will be monolithic to start developers in it. I would hate to work on a large EOL system built in Angular in years though. Monolithic frameworks are all good when they are still the stuff, when noone cares if they are on their resume's they become a pain in my opinion and people realize the bloat that they were. Ask how much fun life is for Drupal, WebForms or Rails apps today, or how much fun it is when security holes and new versions break things.

1

u/arcadiajohnson Nov 06 '14

I think the biggest hate stems from the removal of ng bindings and this whole weird AtScript development approach. It's still a year away and I professionally like the 1.x approach of building modules. But I'm ready to see where this goes. It's in pretty good hands