by ganarajpr · 13y ago · 0 comments
Regarding AngularJS, please use it only if you are new javascript and prefer learning Angular Javascript (which is not javascript by the way) :)
I am not sure you "know" javascript. If you are saying that there is an Angular version of javascript then you are terribly mistaken. Angular is probably one of the only mainstream framework that stays true to javascript. All other frameworks ( Backbone, Ember etc.. ) are the ones that actually mould javascript into an OOP language. I would say that Angular uses the prototype chain ( you know javascript is a prototypical language right? ) the best. The whole scope object inherits prototypicaly while in all other frameworks we create an illusion of OOP. Someone correct me if I am wrong here.Just for clarity, I believe that when you write Angular code you are writing the purest form of javascript. Because thats what you are writing there. Just plain javascript. There is no constructs imposed by the framework at all. This is probably why most people think "Angular's javascript" is not javascript. They have been always fed layers on top of javascript because "javascript is somehow not optimal, not right" and it has to be "changed" and "corrected" . OOP is shoved down the throat. This is probably gone on to the extent that when someone actually writes in pure javascript it starts looking like a foreign language !!
Do you realise that JS is an object oriented language? Prototypes are a means for inheritance (i.e. reuse of code), just as classes are in more traditional languages - it does not mean JS is not OO.
My interpretation of the GP comment is that he means angular to JS is like jQuery to JS, it's effectively a DSL that you have to learn in itself. Someone once said "people don't write javascript anymore, they write jQuery". That's what I think he meant
If you're not convinced of the benefits of MV* frameworks on the client, please write a complex client-side app with vanilla JS and share what you learnt.
I'm being sincere there - I've tried, and I quickly started drowning in sea of boiler plate code I'd rather not have to write. Not that it's not fun to write some of that stuff, but I'd rather be delivering value. And what happens when I create a second app? Hmm seems there's lot of similar boiler plate stuff, why don't I just abstract that into a framewo.. oh wait
1) Is MVC an OOP concept ?
2) Is JS an Classical or Functional language ?
3) How does JS support Closures ?
4) What is Unobtrusive JavaScript and why its so popular ?
5) Is it necessary to add declarations in markup or templates to implement bindings in client side ?
6) Differences between Model Backed View and Markup Driven views ?
7) which should be fat in MVC model or controller ?
8) How does multiple controllers in JS MVC App are controlled?
If you answer these questions and score 80%, you will know what i am talking about.
P.S: If you want some, Come on get some :)