

AngularJS: If HTML were built for writing web apps  - phren0logy
http://www.angularjs.org/Main_Page

======
arkitaip
This looks interesting but I am not sure about the use of additional
attributes. Will AngularJS produce well-formed markup? Can't help to notice
that the example code on the front page uses tables for layout purposes...

I just love the formidable "comeback" that JavaScript has made. It has gone
from being hated and patronized to become an incredibly flexible and
completely invaluable tool in every web develper's toolkit. With all these
frameworks and libraries - jQuery, YUI, node.js - JavaScript is becoming even
more powerful and actually fun to code it.

~~~
ericost
> Can't help to notice that the example code on the front page uses tables for
> layout purposes...

The table is used to layout tabular data. This is a good use of tables.

------
lukifer
I'm very curious as to what are the philosophy differences and trade-offs
between Angular, Knockout, and more lightweight plugins such as jQuery Data-
Link [1].

(1) <https://github.com/jquery/jquery-datalink>

------
lazylland
The neatest solution for handling forms I've seen was XForms
(<http://www.w3.org/TR/xforms11/>), originally part of the XHTML2 proposal.
You had multiple, potentially schema-validated models per page, the ability to
neatly segue in RESTful behaviour and custom controls for dates, ranges, tabs,
composite controls etc.

However, the standard relied on robust browser support instead of being added
on as a library (here's a current attempt at this:
<http://code.google.com/p/ubiquity-xforms/>). There was also an almost slavish
adherence to XPath which was too clunky for certain uses, and finally it ended
up as an unfortunate victim of the XHTML2 debacle.

------
dantheta
This definitely looks interesting to me. Although I only occasionally write
webapps, the web developers who sit near me regularly seem to have to spend a
lot of time dealing with problems like jQuery event handler race conditions,
JS and server-side state mismatch and so on.

All of it made me wonder if HTML and JS (with jQuery et al) were really the
right tools for developing rich user interfaces, or if it was time to look at
an alternatives for apps in the browser - although Flash, Adobe Air and
Silverlight all seem to be highly unpalatable choices.

(as for me, I'm generally happy with unstyled well-formed XHTML and doing all
the work on the server with form submits and page reloads - but that's why I'm
not doing webapps for a living!)

------
user24
Interesting timing - Just today I blogged about HTML5 and how it still doesn't
fully address the needs of web apps -
[http://www.puremango.co.uk/2011/01/what-is-the-point-of-
html...](http://www.puremango.co.uk/2011/01/what-is-the-point-of-html-5/)

Seems like there are a few projects filling this gap - backbone's been
mentioned, there's also sproutcore.

XUL is a great little language but as I say in the blog post: XUL is designed
to produce apps with a consistent look-and-feel. HTML is emphatically not (and
shouldn't be).

It's tricky to design a web application language which doesn't end up with all
apps looking the same.

------
ubasu
Older discussion:

<http://news.ycombinator.com/item?id=2118417>

------
liamk
I wonder how this differs from backbone.js?

~~~
jashkenas
A good place to start would be to give them a quick read-through:

Angular.js Source: <http://www.angularjs.org/ng/js/angular-debug.js>

Backbone.js Source:
<http://documentcloud.github.com/backbone/docs/backbone.html>

[Edit]: Just skimming through, you'll notice that Angular includes a custom
JavaScript parser for it's JS-in-HTML attributes (Knockout.js uses eval()), as
well as things like Social Security Number validation ... and it's own version
of jQuery, internally referenced as "jqLite".

------
ericmsimons
I feel like the web is such a chaotic mess of technologies...we need some sort
of universal language in the future. I hope HTML5 will deliver that although I
doubt it. I remember reading a blog from Joe Hewitt talking about how he would
love to see objective-c for creating web apps (like cappuccino, but tied in
with the backend as well). Should be interesting to see what happens

~~~
jashkenas
For better or for worse, JavaScript is that language. (Along with all of the
languages that compile to JS: [https://github.com/jashkenas/coffee-
script/wiki/List-of-lang...](https://github.com/jashkenas/coffee-
script/wiki/List-of-languages-that-compile-to-JS))

------
prodigal_erik
Found I had to disable CSS (there's something wonky hiding their content) but
I'm glad to see their documents are still usable if you don't blindly trust
everyone's js by default. A lot of sloppy or ignorant authors would have done
the js version first and then failed to finish the job.

------
jamesu
XUL anyone?

~~~
user24
XUL isn't cross browser. Though a xul.js which allowed you to define webapps
in XUL and it converts them into HTML on the client side would be an
interesting project.

