We could say that a Hello World code in Java is 5 times bigger than in Python, and both has it's pros and cons. Same thing happen with tools and frameworks.
Coding the Angular Tutorial App in Backbone
11–20 of 71 posts
Re: Coding the Angular Tutorial App in Backbone
#12> but I’m really fond of the less restrictive nature of Backbone, so I’ll probably end up sticking with Backbone. Backbone is terribly devious in that it tricks you into thinking that it is unrestrictive and unopinionated. Backbone manages state with mutable models and model change callbacks, so Backbone's opinion naturally is that models and change callbacks are a good way to organize your application. "I want to wr…
Re: Coding the Angular Tutorial App in Backbone
#13That said, lines of code is really the wrong metric to gauge the merits of the frameworks. Fewer lines of code may mean better abstractions, but it also may mean more 'magic'.
A metric that may be more useful would be to have one developer write half the project and have another finish and then compare the time they take to the time they take to do the same project with angular.
Re: Coding the Angular Tutorial App in Backbone
#14I think another good comparison to make that is missing from both demo application stacks is testing. It becomes increasingly difficult to test backbone with the side effects of having jQuery selectors, html elements and general DOM operations directly in your view models. One of the great advantages of angular is it's attempt to make invert your thinking about dom binding compared to other frameworks. Meaning it tries to keep the DOM and the MVVM separated so there aren't unintended side effects if you add or change html node ids or classes. Backbone more tightly couples you to a specific html model and makes testing your javascript code complex and coupled to also looking for changes to the physical DOM during tests.
In the end, the more complex problems see to cause equal headaches in both frameworks, but at least angular give you less lines of headaches.
Re: Coding the Angular Tutorial App in Backbone
#15> but I’m really fond of the less restrictive nature of Backbone, so I’ll probably end up sticking with Backbone. Backbone is terribly devious in that it tricks you into thinking that it is unrestrictive and unopinionated. Backbone manages state with mutable models and model change callbacks, so Backbone's opinion naturally is that models and change callbacks are a good way to organize your application. "I want to wr…
Re: Coding the Angular Tutorial App in Backbone
#16I am not a Backbone expert, but telling coding a piece of software with Backbone takes more lines of code than AngularJS doesn't really tell you something. We could say that a Hello World code in Java is 5 times bigger than in Python, and both has it's pros and cons. Same thing happen with tools and frameworks.
LOC is certainly a useful metric in this case. It doesn't necessarily mean one framework is superior than the other but can and should be used when comparing frameworks.
Re: Coding the Angular Tutorial App in Backbone
#17> but I’m really fond of the less restrictive nature of Backbone, so I’ll probably end up sticking with Backbone. Backbone is terribly devious in that it tricks you into thinking that it is unrestrictive and unopinionated. Backbone manages state with mutable models and model change callbacks, so Backbone's opinion naturally is that models and change callbacks are a good way to organize your application. "I want to wr…
"I want to write a bunch of gross code to perform dirty checking of objects to keep everything in sync" said no UI developer ever.
That's the point of libraries and frameworks. They do the repetitive or "ugly" or "hard" things that we don't want to do over and over.
Re: Coding the Angular Tutorial App in Backbone
#18I am not a Backbone expert, but telling coding a piece of software with Backbone takes more lines of code than AngularJS doesn't really tell you something. We could say that a Hello World code in Java is 5 times bigger than in Python, and both has it's pros and cons. Same thing happen with tools and frameworks.
Java and Python are not the same language. AngularJS and Backbone are both Javascript frameworks. LOC is certainly a useful metric in this case. It doesn't necessarily mean one framework is superior than the other but can and should be used when comparing frameworks.
If I had to choose between frameworks, tools or languages. LOC is not the reason why I would choose A or B. Another thing is comparing one of the following: support, active community, features, future improvements, documentation.
Re: Coding the Angular Tutorial App in Backbone
#19> but I’m really fond of the less restrictive nature of Backbone, so I’ll probably end up sticking with Backbone. Backbone is terribly devious in that it tricks you into thinking that it is unrestrictive and unopinionated. Backbone manages state with mutable models and model change callbacks, so Backbone's opinion naturally is that models and change callbacks are a good way to organize your application. "I want to wr…
That's sort of a weird way to frame it. I could make the same argument against Angular: "I want to write a bunch of gross code to perform dirty checking of objects to keep everything in sync" said no UI developer ever. That's the point of libraries and frameworks. They do the repetitive or "ugly" or "hard" things that we don't want to do over and over.
Re: Coding the Angular Tutorial App in Backbone
#20> but I’m really fond of the less restrictive nature of Backbone, so I’ll probably end up sticking with Backbone. Backbone is terribly devious in that it tricks you into thinking that it is unrestrictive and unopinionated. Backbone manages state with mutable models and model change callbacks, so Backbone's opinion naturally is that models and change callbacks are a good way to organize your application. "I want to wr…
That's sort of a weird way to frame it. I could make the same argument against Angular: "I want to write a bunch of gross code to perform dirty checking of objects to keep everything in sync" said no UI developer ever. That's the point of libraries and frameworks. They do the repetitive or "ugly" or "hard" things that we don't want to do over and over.
Except that this is in no way an equivalent comparison. With Backbone, you actually have to write the hundreds of callbacks in your application code.
Whereas with Angular, you attach a value to a scope, and declare it in a template. In that case, the framework actually does take care of the 'ugly' for you.
Backbone keeps the ugly in front of your face, it just gives you a slightly neater way to organize it (i.e. as compared to jQuery soup).