Live data from Hacker News

The Future of AngularJS

docs.google.com

61–70 of 74 posts

Re: The Future of AngularJS

#61
post #33
post #2

Neato. Angular reimplementing it's own module system (when many developers already have a large body of code in existing module formats, particularly AMD) was one of the things that turned me off when first looking at it. Do ES6 modules have all the dependency injection stuff the Angular developers wanted?

Module system =/= Dependency injection. AngularJS modules =/= CommonJS modules Module system = way to FIND object definitions physically(files) or logically(name). Python has one, NodeJS has one. Dependency injection = way to WRITE objects by creating dependencies between them in order to separate concerns. RequireJS = gives Javascript a module system ( fetching files according to the module name to find module defin…

Please read posts before replying to them.

- Nowhere in my post did I say a module system was dependency injection

- Nowhere in my post did I say angular JS modules were CommonJS.

Please don't use uppercase for emphasis, see http://ycombinator.com/newsguidelines.html

Explaining in further detail: a feature of some module systems is dependency injection (yes, dependency injection can also be performed outside a module system, but the slides discusses module systems so we will too).

DI gives module systems the ability to instantiate objects using different dependencies. This is handy for things like testing, where eg, a name that would normally resolve to a network API module would instead be resolved to a stub module with pre-canned responses, so any calls to that network API module return consistent responses.

Lack of dependency injection in existing JS module systems (you can do it in AMD, but using file paths so it's kind of hacky) is cited in the angular docs as the reason Angular includes its own unique module system.

Weather people still use AMD or CommonJS or Angular modules after ES6 modules really depends on the feature set of ES6 modules. Hence asking about the feature set of ES6 modules.

Re: The Future of AngularJS

#63

Earlier quoted context omitted.

downvoted? No, you're totally right. We need to move on. see my rant below. upvoted.

I know. Browsers are free. What's the hold up? Of course, its those creaky old IT departments. Stop catering to these old browsers and people who want your app will download a capable browser or pressure their IT or just use their phone.

Maybe what we need is a general strike. Have every app go dark for these old browsers on January 1st 2014 for one hour a day. Then double it every day until its 24/7.

If they can deal with Y2K, they can deal with something this trivial.

Re: The Future of AngularJS

#65

Being able to avoid $scope.$apply() will certainly be nice. As it stands now, if you want to leave the Angular reservation and use something like the Parse JS SDK (which is a customized set of Backbone models) your code will be littered with $scope.$apply(). Not very DRY, and also adds, from the dev's point of view, a needless level of nesting functions.

Parse.com has a perfectly capable REST API[1] that you can use with Angular's $resource. If you use Restangular, then your life becomes even easier. It won't be as convenient as using their JS SDK, but your code will end up looking much cleaner. --- [1] https://www.parse.com/docs/rest

I've spent my fair share of time pouring over Parse's REST docs[1][2]. It's a fairly large undertaking to fully support all REST features, so it's still a decent trade-off to just use the JS SDK. If there are any Parse + Angular REST client projects, I'd be happy to contribute some code.

[1] https://github.com/adelevie/parse_resource

[2] https://github.com/adelevie/parse-ruby-client

Re: The Future of AngularJS

#66
post #14

Unfortunately, I didn't see improved documentation in their future vision... I'm not sure how a lot of those ideas will work with compatibility with older versions of IE. You already have issues using the element tags for new attributes.

If you must support outdated versions of IE then your future is grim. The working tools you have today are all you will ever get. An expectation for ongoing framework support for these legacy environments is wholly unrealistic.

> If you must support outdated versions of IE then your future is grim.

Hello from military industrial complex business world. A hundreds of billions of dollars market where exactly almost nobody uses latest firefox, chrome and quite a few use IE8.

What looks grim for you is a boon over here. Supporting IE8 puts money in the pocket, money in the pocket makes the future not so "grim" ;-) Saying you need latest Chrome or Firefox guarantees just getting laughed at and shown the door.

Re: The Future of AngularJS

#68
post #61
post #33

Earlier quoted context omitted.

Module system =/= Dependency injection. AngularJS modules =/= CommonJS modules Module system = way to FIND object definitions physically(files) or logically(name). Python has one, NodeJS has one. Dependency injection = way to WRITE objects by creating dependencies between them in order to separate concerns. RequireJS = gives Javascript a module system ( fetching files according to the module name to find module defin…

Please read posts before replying to them. - Nowhere in my post did I say a module system was dependency injection - Nowhere in my post did I say angular JS modules were CommonJS. Please don't use uppercase for emphasis, see http://ycombinator.com/newsguidelines.html Explaining in further detail: a feature of some module systems is dependency injection (yes, dependency injection can also be performed outside a module…

>- Nowhere in my post did I say a module system was dependency injection

Let me remind you then:

"Do ES6 modules have all the dependency injection stuff the Angular developers wanted?"

>Explaining in further detail: a feature of some module systems is dependency injection

An orthogonal, non relevant feature, that has nothing to do with the core role of a module system.

That some module systems have this frankensteinian stuff included doesn't mean much.

Re: The Future of AngularJS

#69

Earlier quoted context omitted.

downvoted? No, you're totally right. We need to move on. see my rant below. upvoted.

I know. Browsers are free. What's the hold up? Of course, its those creaky old IT departments. Stop catering to these old browsers and people who want your app will download a capable browser or pressure their IT or just use their phone.

Ah yes, the "creaky old IT department"... Gosh darn it, if it weren't for those old fogies and their weird inclination to worry about making sure things actually work, and their bizarre insistence of mapping technological choices to the strategic concerns of the business (as opposed to just providing the coolest new toys for all the geeks to play with) - then, we might actually be able to get something done!

Re: The Future of AngularJS

#70
post #14

Unfortunately, I didn't see improved documentation in their future vision... I'm not sure how a lot of those ideas will work with compatibility with older versions of IE. You already have issues using the element tags for new attributes.

hahaha. Did you ust say "compatibility with older versions of IE". I'll probably get downvoted for this but. If you want to maintain "compatibility with older versions of IE" try an older version of HTML, an older version of CSS, an older version of javascript and an older x86 processor, and an older version of windows (95 sounds nice). Sorry. If future features should try to remain compatible with older versions of…

Well, the thing is both Chrome and Firefox get updated automatically but IE doesn't.

So the problem will not IE versions that are already old (IE6, IE7) but current versions of IE - even future versions before they implement these new standards.

As these features roll out to Firefox and Chrome, users of these browsers will have to them because of the auto-update pretty quickly.

Eventually IE will implement them, maybe in version 12, and you'll have users still using IE10. Heck, maybe they won't be able to upgrade their IE because it won't run on their aging Windows 7.

Unless IE switches to the auto-update used by Firefox and Chrome, and stops dropping Windows versions in their new IE, I don't see the problem going away.

Post reply on HN