Friday 15 June 2012

angularjs - Replacing angular with standard web technologies -



angularjs - Replacing angular with standard web technologies -

i'm working on project has luxury of using ecma 6 on latest browsers product shipped in 1.5 years. thought why not utilize web components angular 2 isn't available (which going ecma 6). , while @ it, can replace angular altogether without having go stone age?

how replace angular?

there's site called youmightnotneedjquery.com how modern browsers have of stuff jquery traditionally used for. i'm interested see angular.

we utilize 4 angular features. options replacing them?

angular directives --> web components angular modules --> ecma 6 modules (not same thing) angular routes --> ??? angular 2-way databinding --> ???

ps. don't want replace angular similar backbone or ember. want replace standard web technologies if have utilize little tools fill gap, we'll consider it.

i've been researching in past 3 weeks , turns out many people thinking alternative after angular took drastic alter path. fortunately upcomming w3c web components standard has need , works right polyfills polymer project. reply question:

angular directives --> web components utilize polyfill until browsers back upwards it. angular modules --> ecma 6 modules part of problem solved html imports. can utilize traceur until browsers back upwards it. angular routes --> there's component that™ utilize <app-router>. angular 2-way databinding --> polymer adds "magic" layer on top of plain standard web components. includes many features including data-binding. +plus more

if you're wondering build process concatenating files in order cut down number of http requests, take @ addy osmani's post vulcanize. spoiler: may not need upcoming http 2 optimizations.

many angular projects utilize twitter bootstrap layout. polymer can plus plays nicely google's paper elements (totally optional superbly awesome).

if want create familiar web components in general, here bunch of nice articles: http://webcomponents.org/articles/

and here wealth of web components: http://customelements.io/ don't know if it's going new npm, list components pretty impressive , growing.

it's relatively complicated expose api angular component. people have come sorts of methods link function emitting events. in web components, however, it's easy create component interact world outside , indeed api , events expose aren't much different standard html tags <audio>.

just angular, can utilize polymer dart well.

conclusion

overall, don't see reason utilize angular except if:

you have huge source code investment in angular , don't want port standard web. (angular 2.0 deprecate code anyway, you're stuck angular 1.*) your team lazy larn new technology (in case web might not right platform mental attitude anyway).

angular doing , had own hype cycle. web components solve many of issues angular trying address. angular had role proof of concept web components. it's time move on. web reinventing everyday , it's inevitable moves someone's cheese.

i'm not saying polymer ultimate reply everything. @ best it's angular render useless in couple of years, it's time larn , utilize it. w3c standards don't die though, , polymer tends much closer them.

there's element that™ new there's app that™

angularjs angularjs-directive web-component ecmascript-6

No comments:

Post a Comment