Rails & Backbone.js
-
Upload
cheenu-madan -
Category
Technology
-
view
257 -
download
0
Transcript of Rails & Backbone.js
+!
Hi I’m…!!Cheenu Madan Web development foralmost 15 years.Last 4 years on Ruby on RailsBuilt most of ClinchPadon Backbone.js!- 30k+ LOC Javascript!- 20k+ LOC Ruby!
!!!!
Built with Backbone.js
Lets dive straight into code !
1. git clone https://github.com/dthtvwls/rails-backbone-todos.git!
2. bundle install!3. rails s!4. localhost:3000 !
Mapping
Models & Collec+ons Views & Routers Templates
Models Controllers Views
Advantages!!• Separation of business logic & presentation
logic!
• Add structure to applications!
• Single page “desktop style” applications!
• Technically less data sent over the wire!
Disadvantages!!!• Harder to get started !
• Code duplication !
• SEO!
• Dealing with non-RESTful backends !
Where you should use it !• Applications where responsiveness is
important!
• Large code bases!
• API driven development !
• Dynamic data that is frequently transformed!
Where you shouldn’t use it !• Small projects - <1000 LOC!
• Public facing websites e.g. news portals!
• Applications which aren’t very interactive !
• Mobile first applications that need to run on old phones (e.g. Android 2.2)!
Light (11.5kb) Building blocks Sinatra like
Heavy (71kb) Opinionated Rails like
Heavy (75kb) Opinionated Futuris+c
Comparison!
Also written by the creator of Backbone.js, works great with Backbone.js!
More expressive than the!default underscore templates!
Will make your life much, much easier. Just ignore the huge size and include it!!
Stuff that plays nice!
Popular Backbone.js Extensions