News for hackers. Stuff that matters.
Re:Things that suck in AngularJS by camus2 on Monday October 28, 2013 @07:30PM (#6630586)
> Google has the chance to build the new framework that will run the web in 2-3 years. Much like Rails a few years ago. Angular is an amazing framework. It seems like they just don't care.

People use to say that about ExtJS a few years ago , then BackboneJS, etc ... There will never be one framework to rule them all , like Rails never ruled server-side developpment, Rails influenced other frameworks. Likewise Angular will , and something better than Angular will come by.

> Angular needs someone versed in developer usability to take control of the public facing Angular stuff and give it a complete overhaul. Right now, it's the result of hundreds of people haphazardly making changes.

that's how most open-source projects work. Angular is not a Google library, Google already has closure[1] , which is neat and scales(ie great performance,unlike Angular), Gmail is built on top of it , but strangely nobody else but google is using it...

EDIT :

[1] https://developers.google.com/closure/library/

Re:Things that suck in AngularJS by nostrademons on Monday October 28, 2013 @10:11PM (#6631437)
The problem with Closure is that it really sucks for small projects. It was built for large products with hundreds of developers and millions of users; many of the library features (eg. static typing; dependency management; compilation; CSS renaming; namespacing & scoping; full component libraries) are absolutely invaluable for that use case, but don't get you much when you're just prototyping a few ideas. I don't think Google's webapps could run on any framework but Closure, but when I and many of my coworkers want to do a quick prototype, we reach for JQuery or Angular. Or even just native DOM APIs.

All big projects have to start out as small projects first, and so most small projects. If a small project uses a framework that's great for big projects, they're paying all the overhead for that up-front, which puts them at a disadvantage in the marketplace. I could see Closure being quite useful for rewrites, but once a dev is in charge of rewriting a project with dozens of devs and hundreds of thousands of users, he probably doesn't have time to blog about the latest JS framework.

Re:Things that suck in AngularJS by lennel on Tuesday October 29, 2013 @04:58AM (#6632735)
We started our project from the get go in closure because this overhead can be automated. The benefits outweigh the pitfalls IMO, and a week spent on process will pay huge dividends down the line.
Re:Things that suck in AngularJS by k3n on Monday October 28, 2013 @09:22PM (#6631174)
I think Angular is just the latest in their web dev portofolio, driven by internal needs. They have Closure, which is basically their own jQuery + package/module/dependency loader & framework. Then there's Dart, which is kind of their version of CoffeeScript/TypeScript/etc. (and even looks strikingly like Angular at times[1]).

There are definitely overlapping concerns, but they've dogfooded Angular for both the YouTube TV[1] portal as well as their DoubleClick site, and so I don't think it's just for external purposes.

1. https://www.dartlang.org/polymer-dart/

Re:Things that suck in AngularJS by ahoge on Tuesday October 29, 2013 @04:20AM (#6632598)
> Then there's Dart, which is kind of their version of CoffeeScript/TypeScript/etc.

From my point of view, it's just the next logical step after GWT and Closure. The annotations are baked into the language's syntax, you get the usual JS-like development cycle (save -> F5), and Java/C#-like tooling.

TS is somewhat similar. CS, however, isn't. CS doesn't offer any tooling advantages over JS.

> looks strikingly like Angular at times

Heh. There is also a Dart version of Angular:

https://github.com/angular/angular.dart

Re:Things that suck in AngularJS by ne8il on Monday October 28, 2013 @08:59PM (#6631064)
We've been running a client side SaaS on the Closure library/tools/compiler for a couple years now. You are right that it is not widely used outside Google (and certainly not as popular as Angular) but it is well-tested and there are some people out there using it for production work.
Re:Things that suck in AngularJS by paultannenbaum on Monday October 28, 2013 @07:37PM (#6630626)
Maybe my understanding is wrong, but closure (and closurescript) are compiled languages. Angular is a UI framework, so comparing them is apples to oranges.

And I think the Angular community would be thrilled if it had even close to the kind of documentation that Rails has. You are correct, no one framework will rule them all, but there are examples of OS projects that have good docs (like jQuery and Rails) that can be used as comparisons when evaluating a framework.

Re:Things that suck in AngularJS by graue on Monday October 28, 2013 @09:06PM (#6631096)
You may be thinking of Clojure and ClojureScript — with a J. It's confusing naming, but those are different, and are not Google products.

In this thread, we're talking about Google's Closure (with an S) Library. Google also makes a Closure (with an S) Compiler, but it's more of an optimizer — it "compiles" from JavaScript to optimized JavaScript.

Re:Things that suck in AngularJS by chii on Monday October 28, 2013 @11:34PM (#6631840)
I would prefer to clear the confusion by calling Closure templates "soy templates", and differentiate it from the Closure compiler (for compiling javascript).
Re:Things that suck in AngularJS by TylerE on Tuesday October 29, 2013 @01:58AM (#6632279)
The pedant in me would like to emphasize that clojure-with-a-j predates the google product by over 2 years.
Re:Things that suck in AngularJS by cgag on Monday October 28, 2013 @10:25PM (#6631497)
further adding to the confusion, clojurescript targets closure compatible code
Re:Things that suck in AngularJS by camus2 on Monday October 28, 2013 @07:43PM (#6630659)
I'm talking about the closure library, it's a javascript library written by google :

https://developers.google.com/closure/library/

All google Saas apps use this lib.

Re:Things that suck in AngularJS by collyw on Tuesday October 29, 2013 @05:07AM (#6632763)
I am fairly sure I have seen tutorials on using the two together.
Re:Things that suck in AngularJS by pron on Monday October 28, 2013 @07:42PM (#6630653)
ClojureScript uses Closure.
Re:Things that suck in AngularJS by cgag on Monday October 28, 2013 @08:47PM (#6630990)
This seems like such a huge win, I'm it's not more common with other compile to js languages.
Re:Things that suck in AngularJS by film42 on Monday October 28, 2013 @10:59PM (#6631665)
It's not so common because:

- It requires a running JVM to compile it all down (not a bad thing).

- Can take upwards of a second to compile depending on code base size and compression setting (even if the JVM is warm).

- Kills all ability to debug. Looks like "a.call().call()" etc.

That said, ClojureScript has been fun to work with, but IMO, Google Closure as dependency thwarts a lot of people looking to try it out like they might try CoffeeScript or TypeScript.

Re:Things that suck in AngularJS by r4vik on Monday October 28, 2013 @11:32PM (#6631829)
http://cljsfiddle.net/ goes a long way towards having a tool people can just play with to try out ClojureScript without being twarted by setting up Clojure/JVM/Lein/Lein-cljsbuild/
Re:Things that suck in AngularJS by gtrak on Tuesday October 29, 2013 @05:10PM (#6637451)
Maybe I'm a bit of a masochist, but it's not that hard to read the compiled output, especially when you have a decent mental model of what it should be. It doesn't look like idiomatic javascript, but the structure is pretty regular.

Here's an example for the kids at home.

compiled: https://github.com/gtrak/node-cljs-template/blob/master/src/...

from: https://github.com/gtrak/node-cljs-template/blob/master/src-...

Re:Things that suck in AngularJS by chii on Monday October 28, 2013 @11:35PM (#6631845)
i m certain you can pretty print the resulting compiled js. see http://googleclosure.blogspot.com.au/2010/10/pretty-print-ja...
Re:Things that suck in AngularJS by lennel on Tuesday October 29, 2013 @01:54AM (#6632269)
and don't forget source maps
Re:Things that suck in AngularJS by ganarajpr on Tuesday October 29, 2013 @10:32AM (#6634359)
It uses the closure compiler. Not the closure library.
Re:Things that suck in AngularJS by hswolff on Monday October 28, 2013 @09:28PM (#6631203)
I thought Gmail was a compiled to JavaScript from Java application?
Re:Things that suck in AngularJS by nostrademons on Monday October 28, 2013 @09:55PM (#6631340)
Nope, you're thinking of GWT. Relatively few Google products actually use GWT; the bulk of them are on Closure. GMail's client (and Google+, and Docs, and Search) all use Javascript-compiled-to-Javascript for the client side.
Re:Things that suck in AngularJS by chii on Monday October 28, 2013 @11:33PM (#6631835)
I've always wondered why GWT isn't much more popular (at least, for google properties). I know of a half dozen apps written in GWT by google. The rest is probably in closure (or something else).

Perhaps they still haven't solved the SEO problem of GWT internally, and so only things that don't need SEO-features like control panels, dashboards (but ironically, the google groups forums too) are in GWT.

Re:Things that suck in AngularJS by randomfool on Tuesday October 29, 2013 @01:19AM (#6632178)
GWT is seen as extremely slow (especially compilation times) and not suited to heavy client-side applications.

I don't think the SEO nature of GWT is fundamentally different from Closure or Angular.

Re:Things that suck in AngularJS by coopdog on Tuesday October 29, 2013 @03:34AM (#6632485)
GWT on AppEngine (which it has great integration for) has a ten second startup time when not loaded, and on the free tier they unload it when not in use, so that's not the greatest.

I used GWT for a while and it would be great for enterprise and large teams. The static typing which I usually love/insist on though, does seem pretty cumbersome for something as simple as a web page. I've switched to scala play for the back end and lots of tiny angular 'apps' on the front, and it's so much faster to develop for.

Re:Things that suck in AngularJS by lennel on Tuesday October 29, 2013 @04:35AM (#6632654)
you should try out closure. it has static typing and a really well developed and tested library alongside the fantasitc compiler.
Re:Things that suck in AngularJS by chii on Tuesday October 29, 2013 @03:11AM (#6632430)
a lot of people who i've spoken to have the same impression of GWT (that it's slow, and not "webby"). I suspect it's because it has the same UI library model as java Swing, and that has the reputation of being slow (thru no fault of java to be honest - its usually the programmers who made it slow, when it could've been fast).

http://www.google.com/fonts <-- loads fast for me. In fact, i think GWT apps can do loading in such an optimized way that hand coding js will only beat it if the programmer is very very careful about it.

(ps, i have no affiliation with google, i just don't like mistunderstood tech to suffer…)

Re:Things that suck in AngularJS by Nitramp on Tuesday October 29, 2013 @12:47AM (#6632083)
Significant parts of the Ads management front ends are written in GWT, but Closure rules the consumer facing front ends.
Re:Things that suck in AngularJS by chii on Monday October 28, 2013 @11:31PM (#6631821)
gmail existed before GWT was created.

But i m pretty sure GWT was created as a result of the research/code written for closure (which, even tho it was opensourced after GWT, existed before GWT in some form or another).