Your SlideShare is downloading. ×
Emberjs as a rails_developer
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Emberjs as a rails_developer

548
views

Published on

For "Firday Tech talks" @ JN Solutions (http://jnsolutions.com.au/)

For "Firday Tech talks" @ JN Solutions (http://jnsolutions.com.au/)

Published in: Technology, Education

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
548
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Understanding As a Rails developer
  • 2. Why client side JS frameworks? Rich user experience Persistence Best practices Much more..
  • 3. Why ember...
  • 4. Core Concepts Templates Views Models Controller Router
  • 5. Templates Expressions, {{firstName}} Outlets, {{outlet}} Views, {{view}}
  • 6. Views {{view Ember.TextField valueBinding='name' name='name' viewName='nameField'}}
  • 7. Controllers App.TodosNewController = Ember.ObjectController.extend save: -> @content.save().then => @transitionToRoute 'todos.index' buttonTitle: 'Create' app/assets/javascripts/controllers/todos/newController.coffee
  • 8. Models App.Todo = DS.Model.extend( name: DS.attr('string'') task: (-> "#{@get('name')}" ).property('name') ) DS.RESTAdapter
  • 9. Router App.Router.map -> @resource 'todos', -> @route 'new' App.IndexRoute = Ember.Route.extend setupController: (controller, model) -> @controllerFor('application')
  • 10. Naming conventions When your application boots, Ember will look for these objects: App.ApplicationRoute App.ApplicationController the application template
  • 11. How it flows.. App.ApplicationRoute = Ember.Route.extend({ setupController: function(controller) { // `controller` is the instance of ApplicationController controller.set('title', "Hello world!"); } }); #router App.ApplicationController = Ember.Controller.extend({ appName: 'My First Example' }); #controller <!-- application template --> <h1>{{appName}}</h1> <h2>{{title}}</h2> #template (hbs)
  • 12. Demo
  • 13. Demo
  • 14. Thanks http://emberjs.com/ http://reefpoints.dockyard.com/ember/2013/01/0 7/building-an-ember-app-with-rails-api-part-1. html http://railscasts.com/ http://blog.dcxn.com/2013/03/23/getting-startedwith-ember-js-on-rails/ http://www.cerebris.com/blog/2012/01/24/beginni ng-ember-js-on-rails-part-1/ Google.com

×