Saturday, October 26, 2013
braindump of Love it or Leave it JavaScript Frameworks as hosted by Ryan Vice at Pablo's Fiesta in room 104 which is jointly a session hosted by Derick Bailey called Backbone vs Angular vs Ember
Derick was Durango is what Knockout should have been as it brings in Require.js. Derick's Marionette framework sits ontop of Backbone. Guy in black hat: There are two different camps people who like to poop on HTML and those who want to write JavaScript apps. Ryan Vice is asking who has worked with what Frameworks. Ryan says a negative in Knockout is negative syntax based on proxies. In your models you have to wrap everything in proxies. He feels it is not fair to compare it to Angular and Ember as it is a microframework but Durangal brings it on par. Amir Rajan mentions painpoints and says Angluar feels like a better Knockout while Ember feels like a better Backbone. Derick, said the Ember people looked at Backbone and found user hated how verbose it is. An Ember guy was a Ruby on Rails guy and made Ember also stay "on rails" - Ember is phenomenal at large scale while Backbone is phenomenal at scalable - you do have to bring in larger constructs like Marionette or Chapel. Amir: Be aware that Ember and Ember data (for getting data) are two different things. Another guy in a github shirt: most frameworks are not very dictatorial about how you connect to the server. Amir: if you start with Backbone it feels natural going to Ember. Derick: There are two kinds of scalability, scaling out to a large number of users, scaling out features. Amir: two different backbone apps will look very different. Guy in black hat: does not like being told what to do, we likes to use his own pieces and fail horribly. Guy in tan clothes: Also doesn't like being locked in and constrained as is the case in Silverlight. Ryan: Outside of the documentation provided how much conversations and informal documentation is provided. Black hat guy bemoans view models in MVC and a second set of models in a JS framework. He is explaining his ways around the trouble... he feels it helps not to have Backbone view models for this which are too heavy. He uses KO.mapping. Ryan: Could not find an easy way to pull things out of the mapper. Black hat guy: You should send your view model up properly defined so that you don't have to mess with it on the frontend. Gabe is the guy who didn't want to be locked in and Derick asserts that is just the way it is. Your team has to embrace a core framework. Around the edges, beyond the core, there is more wiggleroom. Pick a framework your team can embrace. Ryan: Single page apps are becoming what smart client apps once were. Github shirt guy: Silverlight and Kendo lock you in but Angular will have forks. Ryan: Is it a good idea to create seams for loose coupling. Derick at github shirt guy say no as there is a performance hit. Dirty Checking in Angular (ectmascript, spelling?) has not yet shown to be a performance. Derick: you'd better virtual information on a phone app for virtual scrolling, dropping stuff as you load stuff from a long list. Amir: backbone is easy to jump to from spaghetti jQuery. Backbone to backbone marionette is the next step up and going to backbone marionette is the step to the top of scope. Ember is opinionated and makes you do dirty checking the right way. Guy in black hat introduced the Backbone view. He made every page have a convention and got his team used to writing code in a particular way. Amir: scoping feature in Angular is manipulatable you may specify... this Dom node is a view, this Dom node is a view.. Derick: Backbone.view should really be called Backbone.presenter. Guy in black hat: will refactor to that and hates the amibuigity of term view. Amir: I'm putting my weight behind Angular. Ryan: If you need a lot of resources in the future you may like Angular given all the meetups in town. There is a question about converting apps to a modern JS app. Jimmy Bogard assert that the gentleman who asked the question is on Silverlight and will have pain regardless in any migration scenario. Gabe uses a MVVM pattern. He does not use Silverlight patterns. Derick someone with a history of Silverlight might be comfortable with Durangal. Gabe is ambivalent about Google and wonders if it will be a big evil like Microsoft. Amir: AngularUI is another good piece if you are doing Angular. amirrajan.github.com/oak#peeps is a sample app comparing the frameworks and it has ASP.NET MVC and server side. Github guy: Breeze.js is a crud framework now integrated with Angular. Ryan: Breeze is like NHibernate in your browser. Derick: Breeze really shines when you need all of your data pulled up to the UI. Amir: You can have implied business logic in the links you return in Breeze. Guy in black hat: How do we decouple HTML and CSS from JS? Are all of the data binding frameworks friendly to this? Derick: Angular is bad at this. Ryan: Google is aligning itself for web components which is a spec that will trend in the future. Derick: If you are not building components you are building a spaghetti mess. Derick: You're not going to find any framework that doesn't have an HTML handing problem. The JS code will want something from your HTML in terms of formatting. Ember uses handlebars and handlebar helpers. Each handlebar template is going to have some looping logic which may be a bit dirty. Amir: Returns MVC Razor and then has JavaScript come in an dress it up based on HTML tags. Your Razor page is basically an HTML page with a .cshtml content. EmberJS has a precomipled thing which is supposed to be SEO friendly. Derick: there are services that crawl JS and make HTML content for Google to find of you point it there. Amir: microformat2 is a format that also helps with SEO. Another gentleman asks about testing. Amir: We tried to use Jasmine but the DOM is nasty. Do it at a higher level with Selenium. Don't mock you DOM. Guy in black hat: Uses knockout to totally abstract the DOM away. Another guy yet: Has been using Angular directives and has been attaching them to the DOM. Karma used to be testacular which sounds bad. Karma is a test runner for Angular. Browser uses socketIO to connect to the server.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment