AngularJs 2.0 or Polymer ? Open Discussion and Views

by - 11:32 PM



+Mohit srivastav and I have written couple of years back blog of post on 'Getting Started on AngularJs with Salesforce'. Things are matured so much from there on, we have received massive feedback from people and some contribution on changes to make a template from Karthik on Github


What's new about Angular 2.0 ?

I like the new approach from Architects, team have approached carving this new framework by providing documents beforehand, which offer a rare opportunity for developer to understand and participate in Angular from early on.

I'll briefly review the cutting edge subjects, specially what Angular is focused and what new features are introduced or likely be introduced

  • Lose Coupled Components : Angular have detached is module from its core and are released in versions now. NgModules.Org holds vast components revisions. Version 2.0 is now gaining active support from participants.

  • Less Code more Application focus : Likewise Salesforce platform, Angular want's its developer to focus less on code and more on business objective. New annotation and ESC6 now backbone these standards



  • Mobile First Approach : As we see mobile is future, and is biggest potential marketing around the globe, angular team wants the adaption of this framework in the world of mobile development to a massive level. As we know, the mobile is all about improving performance, reducing memory consumption and load time. Improving on these measures will clearly upscale desktop application performance.

Few interesting features that Angular is focused on, are available in many new framework like Polymer, React, Brick and in Salesforce its Aura/Lightning they all offer component driven architecture or approach for development.

Polymer vs Angular 2 ? What's their status relationship ?


Is polymer a framework ? 

Well, effectively its not, basically polymer is more of a library that provides sugar layer of top of web-components which in turn effectively lets you to deal with components smoothly.

Most common question that I keep hearing is,  Will Polymer kill Angular down the line ? If you can answer, let me know your views

Are AngularJs or Polymer related ?

No, they are not, Angular 2.0 is rewritten with intention to support web-components, as we know creating components in Angular directive is relatively complex, while on the other hand polymer make it much easier with their polyfills. Since Polymer adoption is increasing inside google (check google I/O homepage) made on top of polymer and material design, I see polymer had bright future at the same time. Google Chrome team is working closely with Polymer and empowering the relationship in each release cycle.

AngularJs have wide adoption among developers and I believe it is the most graduated javascript framework existing on planet, clearly it needs to be future proof which is component driven model, rewriting is right choice. But few topics that I most interested to see are Dependency Injection, Templating, Anotation, Scaffolding and Touch Routing.

Those in angular snippets below demonstrates few of this topics clearly

Templates in AngularJS 2.0 

@ComponentDirective({
          selector: 'oye-hello',
          template: 'Oye Hello!'
        })

<oye-hello></oye-hello>

Touch Animations 

Angular have provided design documents for touch animation and gestures for devices programming here

Scaffolding 

Likewise Yomen in Polymer (read post on creating polymer apps with Yomen) Angular is working on develop a Yomen for AngularJS 2.0 but at the same time they have tailored workflow for Angular applications available here at NgTrailer


Yes, Angular is also working on Gulp to support AngularJs 2.0

Change Detection 

Polymer offer promising and easy feature for change detection, while Angular is progressing and its own its way to handle this using watchtower.js and zone.js. VictorSavin have written a blog post about change detection on AngularJS 2.0 here.



ESC6 Support 

Angular will be designged to follow ES6 for which you need to transpile. Read more about compiler here. For those who don't know what is ESC6, I recommend watching slidshow by  +Christophe Coenraets here.

Stay tuned for angular updates  and meantime you can check out the video by +Alex Eagle on getting started with Angular2.0 (Googler working on Angular)






You May Also Like

0 comments