Profile cover photo
Profile photo
Ben Tilford
61 followers
61 followers
About
Ben's posts

Post has shared content

Post has shared content

Post has attachment

Post has attachment

Post has attachment

Post has shared content
MVC vs MVVM vs MVP. What a controversial topic that many developers can spend hours and hours debating and arguing about.

For several years +AngularJS was closer to MVC (or rather one of its client-side variants), but over time and thanks to many refactorings and api improvements, it's now closer to MVVM – the $scope object could be considered the ViewModel that is being decorated by a function that we call a Controller.

Being able to categorize a framework and put it into one of the MV* buckets has some advantages. It can help developers get more comfortable with its apis by making it easier to create a mental model that represents the application that is being built with the framework. It can also help to establish terminology that is used by developers.

Having said, I'd rather see developers build kick-ass apps that are well-designed and follow separation of concerns, than see them waste time arguing about MV* nonsense. And for this reason, I hereby declare AngularJS to be MVW framework - Model-View-Whatever. Where Whatever stands for "whatever works for you".

Angular gives you a lot of flexibility to nicely separate presentation logic from business logic and presentation state. Please use it fuel your productivity and application maintainability rather than heated discussions about things that at the end of the day don't matter that much.

#AngularJS   #MVW

Post has attachment

Post has shared content
So +JavaScript has this feature where expressions may be joined with the , operator. Minifiers like closure compiler and uglify use it to make things into one statement that used to be 2, which enables them to e.g. use short circuiting operators like && and || instead of if/else.
Apparently Opera crashes when statements become too long and article suggests a fix by randomly inserting semicolons? That has #fail  written on it in very large letters!
http://my.opera.com/hallvors/blog/2012/07/17/twitter-crashes-itself-with-commas?1

Post has shared content
Wait while more posts are being loaded