background preloader

Ember

Facebook Twitter

Every Web App Is (at Least) Two Applications. Yesterday I came across "Rails' Degenerate Front-End Support" taking Rails to task for slipping behind the state of the art when it comes to front-end dependency management.

Every Web App Is (at Least) Two Applications

The pain is real, but the problem isn't that Rails does a bad job with front-end dependencies. The problem is that the front-end has no business living in a Rails app at all. Web applications in 2005 were engines of request and response. You were always interacting with a snapshot of the data, never the data itself. In this era, it made perfect sense for the server to generate the HTML that landed in the browser. Sure, AJAX existed and could be cajoled into helping out here and there. What has happened since 2005 came about so gradually that many haven't even realized it happened. Backbone, Mind Blown It all started with Backbone, first of the mainstream modern JavaScript frameworks. The seed of the idea had been planted. So where does that leave Rails? We're Gonna Need a Bigger Toolbox A Modern Approach.

Getting Started with Ember.js using Ember CLI. Goal: Build an app that will record a list of todos.

Getting Started with Ember.js using Ember CLI

Time: 90 minutes (let me know if it's very different for you) Introduction I'm writing the tutorial that I wish I had 6 months ago when I was starting out with Ember. The tutorial that doesn't assume that I've been using jQuery for 5 years, know what state is, eat 'promises' for breakfast or even understand the term 'hook'. It's a tutorial for beginners, beginners to coding, beginners to JavaScript or beginners to front end frameworks. Ember is a front end framework for creating ambitious apps. You might be wondering how this is different from the Todo MVC guide on www.emberjs.com. Building a tested, documented and versioned JSON API using Rails 4 - Emil Soman's blog.

Use the leaner rails-api.

Building a tested, documented and versioned JSON API using Rails 4 - Emil Soman's blog

This removes a lot of stuff Rails that you don't need for an API. This ensures that the API works for non-browser clients which do not support cookies. Also, there is no "View" layer that renders an HTML view for every request. This makes the response faster.Use Cucumber for integration tests. This serves as a way for testing the APIs and also for documenting them.Use devise gem for authentication and support token based authentication. Rails-api Setting up Rails::Api is fairly straightforward. Add rails-api to the Gemfile and bundle install .ApplicationController should inherit from ActionController::Api which doesn't include many modules that are not required for an API. Cucumber for testing JSON API's Cucumber is a Behavior driven development tool and by default it ships with "capybara" which simulates a user's browser actions like filling up forms or clicking elements on the page. Ember CLI & ember-simple-auth-devise. We will build a Rails project and an Ember project from scratch.

Ember CLI & ember-simple-auth-devise

The backend will manage authentication with the gem Devise. The frontend will be able to `login`, to the Rails backend, using the library Ember Simple Auth (ESA) with its Devise extension. Playing with Ember.js and Devise. I have been playing with Ember in and out since the beginning of 2012, you may have seen my two (obsolete?)

Playing with Ember.js and Devise

Libraries ember-facebook and ember-formbuilder. I wrote them out of real needs I had on projects back then. I was away from ember since version 0.9.8 and ember-data I don’t even remember if it had a version number yet, and I started playing around with it again this last few weeks. How to Deploy a Rails 4 App With Git and Capistrano // Rob McLarty. I think the two key aspects of any deployment process are speed and consistency.

How to Deploy a Rails 4 App With Git and Capistrano // Rob McLarty

Speed means you can iterate and fix bugs fast and keep your production code in sync with your development code. Consistency means you know it's going to do the same thing every time so you're not afraid to actually do it and stay up to date. Rails-api/rails-api. Building an Ember App with Rails Part 1. This series will take us through building and structuring an application with an Ember front-end built with ember-cli and a Ruby on Rails backend.

Building an Ember App with Rails Part 1

We'll discuss project structure, testing, and deployment to Heroku. During the course of this series I am going to re-build the Boston Ember website. (if it looks terrible that means I'm not done yet) Getting setup with our tools Let's start by making sure all relevant dev tools are installed on our machine.