5 ms·
AngularJS: If HTML were built for writing web apps
- arkitaip 16y agoThis 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 16y ago> 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.
- pornel 16y ago> I am not sure about the use of additional attributes. Will AngularJS produce well-formed markup? Definitely has better chances with attributes than without them. <tr ng:repeat="…">…</tr> This guarantees that whole element will be repeated. If there were custom tags you could easily create ill-formed markup: {repeat}<tr>{/repeat}</tr>
- jamesu 16y agoXUL anyone?
- liamk 16y agoI wonder how this differs from backbone.js?
- moe 16y agoThis is closer to knockout.js than backbone.js. Backbone.js does not depend on custom attributes inside the HTML, which makes it a little bit more modular than the "all encompassing" knockout and angular.
- jashkenas 16y agoA 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 http://www.angularjs.org/ng/js/angular-debug.js Backbone.js Source: http://documentcloud.github.com/backbone/docs/backbone.html 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".
- user24 16y agoInteresting 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-5/ http://www.puremango.co.uk/2011/01/what-is-the-point-of-html... 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.
- deleted 16y ago[deleted]
- lazylland 16y agoThe neatest solution for handling forms I've seen was XForms (http://www.w3.org/TR/xforms11/ 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/ 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.
- ericmsimons 16y agoI 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 16y agoFor 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-languages-that-compile-to-JS https://github.com/jashkenas/coffee-script/wiki/List-of-lang...)
- chc 16y agoThat Objective-C Web framework exists. Check out http://www.frothkit.org/ http://www.frothkit.org/ Honestly, though, I don't know why you'd want Objective-C. The language itself is not clearly better than many others. It's Cocoa (Touch) that makes programming on Apple's platforms so pleasant.
- ubasu 16y agoOlder discussion: http://news.ycombinator.com/item?id=2118417 http://news.ycombinator.com/item?id=2118417
- lukifer 16y agoI'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 https://github.com/jquery/jquery-datalink
- prodigal_erik 16y agoFound 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.
- dantheta 16y agoThis 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!)