SlideShare uma empresa Scribd logo
1 de 60
Baixar para ler offline
Enter the App Era
with Ruby on Rails

     @matteocollina
RubyDay.it
15 June 2012

   www.rubyday.it
Matteo Collina

Software Engineer

@matteocollina

matteocollina.com
www.mavigex.com
   www.wemobi.it
How is built an App?




               http://www.flickr.com/photos/dschulian/3173331821/
Code




       Icons by Fasticon
Code   Run




             Icons by Fasticon
Code   Run   Server




                      Icons by Fasticon
Code   Run   Server




                      Icons by Fasticon
Code   Run   Server




                      Icons by Fasticon
Code   I   need to
           serve
               Run   Server

     my data to
Web and Mobile Apps



                              Icons by Fasticon
We need an API
We need an API


Who has APIs?
Who has APIs?
Who has APIs?
Who has APIs?



And many many others..
We will develop an API
We need to be fast!




               http://www.flickr.com/photos/oneaustin/1261907803
We have just
twenty minutes




          http://www.flickr.com/photos/oneaustin/1261907803
What do we
want to build?   http://www.flickr.com/photos/oberazzi/318947873/
Another tool for nerds?




                          http://www.flickr.com/photos/eyesontheroad/2260731457/
Another Todo List?




                     http://www.flickr.com/photos/eyesontheroad/2260731457/
Enter MCDo.
http://github.com/mcollina/mcdo
Enter MCDo.

The First Todo List
   delivered as
   a REST API
The First Todo List
   delivered as
   a REST API
Signup API
http://github.com/mcollina/mcdo
Signup API
Feature: Signup API
  As a MCDO developer
  In order to develop apps
  I want to register new users

  Scenario: Succesful signup
    When I call "/users.json" in POST with:
      """
      {
        "user": {
          "email": "hello@abc.org",
          "password": "abcde",
          "password_confirmation": "abcde"
        }
      }
      """
    Then the JSON should be:
      """
      {
        "id": 1,
        "email": "hello@abc.org"
      }
      """
Signup API

Scenario: signup fails with a wrong password_confirmation
  When I call "/users.json" in POST with:
    """
    {
      "user": {
        "email": "hello@abc.org",
        "password": "abcde",
        "password_confirmation": "abcde1"
      }
    }
    """
  Then the JSON should be:
    """
    {
      "errors": { "password": ["doesn't match confirmation"] }
    }
    """
How?
How?

Ruby on Rails

Cucumber

RSpec

JSON-spec
How?

       Ruby on Rails


Let’s see some code!
       Cucumber

       RSpec

       JSON-spec
Login API
http://github.com/mcollina/mcdo
Login API
Feature: Login API
  As a MCDO developer
  In order to develop apps
  I want to login with an existing user

  Background:
    Given there is the following user:
      | email       | password | password_confirmation |
      | abcd@org.it | aa       | aa                    |

  Scenario: Succesful login
    When I call "/session.json" in POST with:
      """
      {
        "email": "abcd@org.it",
        "password": "aa"
      }
      """
    Then the JSON should be:
      """
      {
        "status": "authenticated"
      }
      """
Login API
Scenario: Failed login
  When I call "/session.json" in POST with:
    """
    {
      "email": "abcd@org.it",
      "password": "bb"
    }
    """
  Then the JSON should be:
    """
    {
      "status": "not authenticated"
    }
    """
Login API
Scenario: Validating an active session
    Given I call "/session.json" in POST with:
      """
      {
        "email": "abcd@org.it",
        "password": "aa"
      }
      """
    When I call "/session.json" in GET
    Then the JSON should be:
      """
      {
        "status": "authenticated"
      }
      """
Login API
  Scenario: Validating an active session
      Given I call "/session.json" in POST with:
        """
        {
          "email": "abcd@org.it",
          "password": "aa"
        }


Let’s see some code!
        """
      When I call "/session.json" in GET
      Then the JSON should be:
        """
        {
          "status": "authenticated"
        }
        """
Lists API
http://github.com/mcollina/mcdo
Lists API
Feature: Lists API
  As a MCDO developer
  In order to develop apps
  I want to manage a user's lists

  Background:
    Given I login succesfully with user "aaa@abc.org"

  Scenario: Default lists
    When I call "/lists.json" in GET
    Then the JSON should be:
      """
      {
        "lists": [{
           "id": 1,
           "name": "Personal",
           "link": "http://www.example.com/lists/1",
           "items_link": "http://www.example.com/lists/1/items"
        }]
      }
      """
Lists API

Scenario: Creating a list
  When I call "/lists.json" in POST with:
    """
    {
      "list": {
        "name": "foobar"
      }
    }
    """
  Then the JSON should be:
    """
    {
      "name": "foobar",
      "items_link": "http://www.example.com/lists/1/items"
    }
    """
Lists API
Scenario: Creating a list should add it to the index
  Given I call "/lists.json" in POST with:
    """
    {
      "list": {
         "name": "foobar"
      }
    }
    """
  When I call "/lists.json" in GET
  Then the JSON should be:
    """
    {
      "lists": [{
         "id": 2,
         "name": "foobar",
         "link": "http://www.example.com/lists/2",
         "items_link": "http://www.example.com/lists/2/items"
      }, {
         "id": 1,
         "name": "Personal",
         "link": "http://www.example.com/lists/1",
         "items_link": "http://www.example.com/lists/1/items"
      }]
    }
    """
Lists API
Scenario: Removing a list (and the index is empty)
  Given I call "/lists/1.json" in DELETE
  When I call "/lists.json"
  Then the JSON should be:
    """
    {
      "lists": []
    }
    """

Scenario: Updating a list's name
  When I call "/lists/1.json" in PUT with:
    """
    {
      "list": {
        "name": "foobar"
      }
    }
    """
  Then the JSON should be:
    """
    {
      "name": "foobar",
      "items_link": "http://www.example.com/lists/1/items"
    }
    """
Lists API
   Scenario: Removing a list (and the index is empty)
     Given I call "/lists/1.json" in DELETE
     When I call "/lists.json"
     Then the JSON should be:
       """
       {
         "lists": []
       }
       """


Let’s see some code!
   Scenario: Updating a list's name
     When I call "/lists/1.json" in PUT with:
       """
       {
         "list": {
           "name": "foobar"
         }
       }
       """
     Then the JSON should be:
       """
       {
         "name": "foobar",
         "items_link": "http://www.example.com/lists/1/items"
       }
       """
Items API
http://github.com/mcollina/mcdo
Items API
Feature: Manage a list's items
  As a developer
  In order to manipulate the list's item
  I want to access them through APIs

  Background:
    Given I login succesfully with user "aaa@abc.org"

  Scenario: Default items
    When I call "/lists/1/items.json" in GET
    Then the JSON should be:
    """
    {
      "items": [{
        "name": "Insert your items!",
        "position": 0
      }],
      "list_link": "http://www.example.com/lists/1"
    }
    """
Items API
Scenario: Moving an element to the top
  Given I call "/lists/1/items.json" in POST with:
  ...
  And I call "/lists/1/items.json" in POST with:
  ...
  When I call "/lists/1/items/2/move.json" in PUT with:
  """
  {
    "position": 0
  }
  """
  Then the JSON should be:
  """
  {
    "items": [{
      "name": "b",
      "position": 0
    }, {
      "name": "Insert your items!",
      "position": 1
    }, {
      "name": "c",
      "position": 2
    }],
    "list_link": "http://www.example.com/lists/1"
  }
  """
Items API
   Scenario: Moving an element to the top
     Given I call "/lists/1/items.json" in POST with:
     ...
     And I call "/lists/1/items.json" in POST with:
     ...
     When I call "/lists/1/items/2/move.json" in PUT with:
     """
     {
       "position": 0
     }


Let’s see some code!
     """
     Then the JSON should be:
     """
     {
       "items": [{
         "name": "b",
         "position": 0
       }, {
         "name": "Insert your items!",
         "position": 1
       }, {
         "name": "c",
         "position": 2
       }],
       "list_link": "http://www.example.com/lists/1"
     }
     """
Do we need
an admin panel?
Do we need
an admin panel?
Do we need
  an admin panel?
Put in your Gemfile:

  gem 'activeadmin'
  gem 'meta_search', '>= 1.1.0.pre'


Then run:

  $   bundle install
  $   rails g active_admin:install
  $   rails g active_admin:resource users
  $   rails g active_admin:resource lists
  $   rails g active_admin:resource items
  $   rake db:migrate
Do we need
  an admin panel?
Put in your Gemfile:




Let’s see some code!
  gem 'activeadmin'
  gem 'meta_search', '>= 1.1.0.pre'


Then run:

  $   bundle install
  $   rails g active_admin:install
  $   rails g active_admin:resource users
  $   rails g active_admin:resource lists
  $   rails g active_admin:resource items
  $   rake db:migrate
Build a JS App!
Build a JS App!


  Backbone.js: MVC in the browser

  Rails asset pipeline concatenate
and minifies our JS automatically

 We can even write our app in
CoffeeScript: it works out of the box.
Build a JS App!


   Backbone.js: MVC in the browser

to Rails asset pipeline concatenate
    the code.. again?
 and minifies our JS automatically

  We can even write our app in
 CoffeeScript: it works out of the box.
http://www.flickr.com/photos/oneaustin/1261907803
We are late,
   the #codemotion
crew are kicking me out



                 http://www.flickr.com/photos/oneaustin/1261907803
TL;DR




        http://www.flickr.com/photos/evilaugust/3307382858
TL;DR

  Mobile Apps need an API

  Ruby on Rails is good for writing APIs

  You can build nice admin interfaces
with ActiveAdmin

  You can craft Javascript Apps easily
using the asset pipeline.
RubyDay.it
15 June 2012

   www.rubyday.it
Any Questions?
Thank You!

Mais conteúdo relacionado

Mais procurados

REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterSachin G Kulkarni
 
Consume RESTful APIs with $resource and Restangular
Consume RESTful APIs with $resource and RestangularConsume RESTful APIs with $resource and Restangular
Consume RESTful APIs with $resource and RestangularJohn Schmidt
 
Finding Restfulness - Madrid.rb April 2014
Finding Restfulness - Madrid.rb April 2014Finding Restfulness - Madrid.rb April 2014
Finding Restfulness - Madrid.rb April 2014samlown
 
Denver emberjs-sept-2015
Denver emberjs-sept-2015Denver emberjs-sept-2015
Denver emberjs-sept-2015Ron White
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the FinishYehuda Katz
 
Introduction to plugin development
Introduction to plugin developmentIntroduction to plugin development
Introduction to plugin developmentCaldera Labs
 
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, TembooYandex
 
RESTful API Design Best Practices Using ASP.NET Web API
RESTful API Design Best Practices Using ASP.NET Web APIRESTful API Design Best Practices Using ASP.NET Web API
RESTful API Design Best Practices Using ASP.NET Web API💻 Spencer Schneidenbach
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIsPamela Fox
 
Building Better Web APIs with Rails
Building Better Web APIs with RailsBuilding Better Web APIs with Rails
Building Better Web APIs with RailsAll Things Open
 
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018Masashi Shibata
 
Building Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET CoreBuilding Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET CoreStormpath
 
Simple Web Apps With Sinatra
Simple Web Apps With SinatraSimple Web Apps With Sinatra
Simple Web Apps With Sinatraa_l
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à RubyMicrosoft
 
SproutCore is Awesome - HTML5 Summer DevFest
SproutCore is Awesome - HTML5 Summer DevFestSproutCore is Awesome - HTML5 Summer DevFest
SproutCore is Awesome - HTML5 Summer DevFesttomdale
 
Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)James Titcumb
 
Découplez votre appli en micro-APIs
Découplez votre appli en micro-APIsDécouplez votre appli en micro-APIs
Découplez votre appli en micro-APIsNicolas Blanco
 
Deliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDeliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDaniel Zivkovic
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)James Titcumb
 

Mais procurados (20)

REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
 
Consume RESTful APIs with $resource and Restangular
Consume RESTful APIs with $resource and RestangularConsume RESTful APIs with $resource and Restangular
Consume RESTful APIs with $resource and Restangular
 
Finding Restfulness - Madrid.rb April 2014
Finding Restfulness - Madrid.rb April 2014Finding Restfulness - Madrid.rb April 2014
Finding Restfulness - Madrid.rb April 2014
 
Denver emberjs-sept-2015
Denver emberjs-sept-2015Denver emberjs-sept-2015
Denver emberjs-sept-2015
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Introduction to plugin development
Introduction to plugin developmentIntroduction to plugin development
Introduction to plugin development
 
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo
 
RESTful API Design Best Practices Using ASP.NET Web API
RESTful API Design Best Practices Using ASP.NET Web APIRESTful API Design Best Practices Using ASP.NET Web API
RESTful API Design Best Practices Using ASP.NET Web API
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIs
 
Building Better Web APIs with Rails
Building Better Web APIs with RailsBuilding Better Web APIs with Rails
Building Better Web APIs with Rails
 
Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018Django REST Framework における API 実装プラクティス | PyCon JP 2018
Django REST Framework における API 実装プラクティス | PyCon JP 2018
 
Building Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET CoreBuilding Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET Core
 
Simple Web Apps With Sinatra
Simple Web Apps With SinatraSimple Web Apps With Sinatra
Simple Web Apps With Sinatra
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
 
SproutCore is Awesome - HTML5 Summer DevFest
SproutCore is Awesome - HTML5 Summer DevFestSproutCore is Awesome - HTML5 Summer DevFest
SproutCore is Awesome - HTML5 Summer DevFest
 
Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)
 
Rails 4.0
Rails 4.0Rails 4.0
Rails 4.0
 
Découplez votre appli en micro-APIs
Découplez votre appli en micro-APIsDécouplez votre appli en micro-APIs
Découplez votre appli en micro-APIs
 
Deliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step FunctionsDeliver Business Value Faster with AWS Step Functions
Deliver Business Value Faster with AWS Step Functions
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
 

Destaque

E così vuoi sviluppare un'app
E così vuoi sviluppare un'appE così vuoi sviluppare un'app
E così vuoi sviluppare un'appMatteo Collina
 
Making things that works with us codemotion
Making things that works with us   codemotionMaking things that works with us   codemotion
Making things that works with us codemotionMatteo Collina
 
Crea il TUO database con LevelDB e Node.js
Crea il TUO database con LevelDB e Node.jsCrea il TUO database con LevelDB e Node.js
Crea il TUO database con LevelDB e Node.jsMatteo Collina
 
E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)Matteo Collina
 
No. la sottile arte di trovare il tempo dove non esite.
No. la sottile arte di trovare il tempo dove non esite.No. la sottile arte di trovare il tempo dove non esite.
No. la sottile arte di trovare il tempo dove non esite.Matteo Collina
 
Making things that works with us
Making things that works with usMaking things that works with us
Making things that works with usMatteo Collina
 
The usability of open data
The usability of open dataThe usability of open data
The usability of open dataMatteo Collina
 
The internet of things - Rails Girls Galway
The internet of things - Rails Girls GalwayThe internet of things - Rails Girls Galway
The internet of things - Rails Girls GalwayMatteo Collina
 
Making things that works with us - First Italian Internet of Things Day
Making things that works with us - First Italian Internet of Things DayMaking things that works with us - First Italian Internet of Things Day
Making things that works with us - First Italian Internet of Things DayMatteo Collina
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Matteo Collina
 
Building a multi protocol broker for the internet of things using nodejs
Building a multi protocol broker for the internet of things using nodejsBuilding a multi protocol broker for the internet of things using nodejs
Building a multi protocol broker for the internet of things using nodejsMatteo Collina
 
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015Matteo Collina
 
L'universo dietro alle App
L'universo dietro alle AppL'universo dietro alle App
L'universo dietro alle AppMatteo Collina
 
Operational transformation
Operational transformationOperational transformation
Operational transformationMatteo Collina
 
Exposing M2M to the REST of us
Exposing M2M to the REST of usExposing M2M to the REST of us
Exposing M2M to the REST of usMatteo Collina
 
Making things that work with us - Distill
Making things that work with us - DistillMaking things that work with us - Distill
Making things that work with us - DistillMatteo Collina
 
Making your washing machine talk with a power plant
Making your washing machine talk with a power plantMaking your washing machine talk with a power plant
Making your washing machine talk with a power plantMatteo Collina
 

Destaque (18)

E così vuoi sviluppare un'app
E così vuoi sviluppare un'appE così vuoi sviluppare un'app
E così vuoi sviluppare un'app
 
Making things that works with us codemotion
Making things that works with us   codemotionMaking things that works with us   codemotion
Making things that works with us codemotion
 
Crea il TUO database con LevelDB e Node.js
Crea il TUO database con LevelDB e Node.jsCrea il TUO database con LevelDB e Node.js
Crea il TUO database con LevelDB e Node.js
 
E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)
 
No. la sottile arte di trovare il tempo dove non esite.
No. la sottile arte di trovare il tempo dove non esite.No. la sottile arte di trovare il tempo dove non esite.
No. la sottile arte di trovare il tempo dove non esite.
 
CI-18n
CI-18nCI-18n
CI-18n
 
Making things that works with us
Making things that works with usMaking things that works with us
Making things that works with us
 
The usability of open data
The usability of open dataThe usability of open data
The usability of open data
 
The internet of things - Rails Girls Galway
The internet of things - Rails Girls GalwayThe internet of things - Rails Girls Galway
The internet of things - Rails Girls Galway
 
Making things that works with us - First Italian Internet of Things Day
Making things that works with us - First Italian Internet of Things DayMaking things that works with us - First Italian Internet of Things Day
Making things that works with us - First Italian Internet of Things Day
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
 
Building a multi protocol broker for the internet of things using nodejs
Building a multi protocol broker for the internet of things using nodejsBuilding a multi protocol broker for the internet of things using nodejs
Building a multi protocol broker for the internet of things using nodejs
 
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
 
L'universo dietro alle App
L'universo dietro alle AppL'universo dietro alle App
L'universo dietro alle App
 
Operational transformation
Operational transformationOperational transformation
Operational transformation
 
Exposing M2M to the REST of us
Exposing M2M to the REST of usExposing M2M to the REST of us
Exposing M2M to the REST of us
 
Making things that work with us - Distill
Making things that work with us - DistillMaking things that work with us - Distill
Making things that work with us - Distill
 
Making your washing machine talk with a power plant
Making your washing machine talk with a power plantMaking your washing machine talk with a power plant
Making your washing machine talk with a power plant
 

Semelhante a Enter the app era with ruby on rails

RESTful Api practices Rails 3
RESTful Api practices Rails 3RESTful Api practices Rails 3
RESTful Api practices Rails 3Anton Narusberg
 
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and ExpressMIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and ExpressCharlie Key
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
KazooCon 2014 - Introduction to Kazoo APIs!
KazooCon 2014 - Introduction to Kazoo APIs!KazooCon 2014 - Introduction to Kazoo APIs!
KazooCon 2014 - Introduction to Kazoo APIs!2600Hz
 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPressTaylor Lovett
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBArangoDB Database
 
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Preply.com
 
Building RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeBuilding RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeDaniel Doubrovkine
 
JSON Fuzzing: New approach to old problems
JSON Fuzzing: New  approach to old problemsJSON Fuzzing: New  approach to old problems
JSON Fuzzing: New approach to old problemstitanlambda
 
Graph Analysis over JSON, Larus
Graph Analysis over JSON, LarusGraph Analysis over JSON, Larus
Graph Analysis over JSON, LarusNeo4j
 
APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...
APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...
APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...apidays
 
APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...
APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...
APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...apidays
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk OdessaJS Conf
 
Graphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiDGraphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiDCODEiD PHP Community
 
[2019 south bay meetup] Building more contextual message with Block Kit
[2019 south bay meetup] Building more contextual message with Block Kit[2019 south bay meetup] Building more contextual message with Block Kit
[2019 south bay meetup] Building more contextual message with Block KitTomomi Imura
 
【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解くAmazon Web Services Japan
 
Diseño y Desarrollo de APIs
Diseño y Desarrollo de APIsDiseño y Desarrollo de APIs
Diseño y Desarrollo de APIsRaúl Neis
 

Semelhante a Enter the app era with ruby on rails (20)

JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
RESTful Api practices Rails 3
RESTful Api practices Rails 3RESTful Api practices Rails 3
RESTful Api practices Rails 3
 
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and ExpressMIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
MIKE Stack Introduction - MongoDB, io.js, KendoUI, and Express
 
JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
KazooCon 2014 - Introduction to Kazoo APIs!
KazooCon 2014 - Introduction to Kazoo APIs!KazooCon 2014 - Introduction to Kazoo APIs!
KazooCon 2014 - Introduction to Kazoo APIs!
 
The JSON REST API for WordPress
The JSON REST API for WordPressThe JSON REST API for WordPress
The JSON REST API for WordPress
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDB
 
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
 
Building RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeBuilding RESTful APIs w/ Grape
Building RESTful APIs w/ Grape
 
JSON Fuzzing: New approach to old problems
JSON Fuzzing: New  approach to old problemsJSON Fuzzing: New  approach to old problems
JSON Fuzzing: New approach to old problems
 
Graph Analysis over JSON, Larus
Graph Analysis over JSON, LarusGraph Analysis over JSON, Larus
Graph Analysis over JSON, Larus
 
APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...
APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...
APIdays Zurich 2019 - Specification Driven Development for REST APIS Alexande...
 
APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...
APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...
APIdays Helsinki 2019 - Specification-Driven Development of REST APIs with Al...
 
Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk   Specification-Driven Development of REST APIs by Alexander Zinchuk
Specification-Driven Development of REST APIs by Alexander Zinchuk
 
Symfony + GraphQL
Symfony + GraphQLSymfony + GraphQL
Symfony + GraphQL
 
Graphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiDGraphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiD
 
[2019 south bay meetup] Building more contextual message with Block Kit
[2019 south bay meetup] Building more contextual message with Block Kit[2019 south bay meetup] Building more contextual message with Block Kit
[2019 south bay meetup] Building more contextual message with Block Kit
 
Serverless for Developers
Serverless for DevelopersServerless for Developers
Serverless for Developers
 
【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く【AWS Developers Meetup】RESTful APIをChaliceで紐解く
【AWS Developers Meetup】RESTful APIをChaliceで紐解く
 
Diseño y Desarrollo de APIs
Diseño y Desarrollo de APIsDiseño y Desarrollo de APIs
Diseño y Desarrollo de APIs
 

Último

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Último (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Enter the app era with ruby on rails

  • 1. Enter the App Era with Ruby on Rails @matteocollina
  • 2. RubyDay.it 15 June 2012 www.rubyday.it
  • 4. www.mavigex.com www.wemobi.it
  • 5. How is built an App? http://www.flickr.com/photos/dschulian/3173331821/
  • 6. Code Icons by Fasticon
  • 7. Code Run Icons by Fasticon
  • 8. Code Run Server Icons by Fasticon
  • 9. Code Run Server Icons by Fasticon
  • 10. Code Run Server Icons by Fasticon
  • 11. Code I need to serve Run Server my data to Web and Mobile Apps Icons by Fasticon
  • 12. We need an API
  • 13. We need an API Who has APIs?
  • 16. Who has APIs? And many many others..
  • 17. We will develop an API
  • 18. We need to be fast! http://www.flickr.com/photos/oneaustin/1261907803
  • 19. We have just twenty minutes http://www.flickr.com/photos/oneaustin/1261907803
  • 20. What do we want to build? http://www.flickr.com/photos/oberazzi/318947873/
  • 21. Another tool for nerds? http://www.flickr.com/photos/eyesontheroad/2260731457/
  • 22. Another Todo List? http://www.flickr.com/photos/eyesontheroad/2260731457/
  • 24. Enter MCDo. The First Todo List delivered as a REST API
  • 25. The First Todo List delivered as a REST API
  • 27. Signup API Feature: Signup API As a MCDO developer In order to develop apps I want to register new users Scenario: Succesful signup When I call "/users.json" in POST with: """ { "user": { "email": "hello@abc.org", "password": "abcde", "password_confirmation": "abcde" } } """ Then the JSON should be: """ { "id": 1, "email": "hello@abc.org" } """
  • 28. Signup API Scenario: signup fails with a wrong password_confirmation When I call "/users.json" in POST with: """ { "user": { "email": "hello@abc.org", "password": "abcde", "password_confirmation": "abcde1" } } """ Then the JSON should be: """ { "errors": { "password": ["doesn't match confirmation"] } } """
  • 29. How?
  • 31. How? Ruby on Rails Let’s see some code! Cucumber RSpec JSON-spec
  • 33. Login API Feature: Login API As a MCDO developer In order to develop apps I want to login with an existing user Background: Given there is the following user: | email | password | password_confirmation | | abcd@org.it | aa | aa | Scenario: Succesful login When I call "/session.json" in POST with: """ { "email": "abcd@org.it", "password": "aa" } """ Then the JSON should be: """ { "status": "authenticated" } """
  • 34. Login API Scenario: Failed login When I call "/session.json" in POST with: """ { "email": "abcd@org.it", "password": "bb" } """ Then the JSON should be: """ { "status": "not authenticated" } """
  • 35. Login API Scenario: Validating an active session Given I call "/session.json" in POST with: """ { "email": "abcd@org.it", "password": "aa" } """ When I call "/session.json" in GET Then the JSON should be: """ { "status": "authenticated" } """
  • 36. Login API Scenario: Validating an active session Given I call "/session.json" in POST with: """ { "email": "abcd@org.it", "password": "aa" } Let’s see some code! """ When I call "/session.json" in GET Then the JSON should be: """ { "status": "authenticated" } """
  • 38. Lists API Feature: Lists API As a MCDO developer In order to develop apps I want to manage a user's lists Background: Given I login succesfully with user "aaa@abc.org" Scenario: Default lists When I call "/lists.json" in GET Then the JSON should be: """ { "lists": [{ "id": 1, "name": "Personal", "link": "http://www.example.com/lists/1", "items_link": "http://www.example.com/lists/1/items" }] } """
  • 39. Lists API Scenario: Creating a list When I call "/lists.json" in POST with: """ { "list": { "name": "foobar" } } """ Then the JSON should be: """ { "name": "foobar", "items_link": "http://www.example.com/lists/1/items" } """
  • 40. Lists API Scenario: Creating a list should add it to the index Given I call "/lists.json" in POST with: """ { "list": { "name": "foobar" } } """ When I call "/lists.json" in GET Then the JSON should be: """ { "lists": [{ "id": 2, "name": "foobar", "link": "http://www.example.com/lists/2", "items_link": "http://www.example.com/lists/2/items" }, { "id": 1, "name": "Personal", "link": "http://www.example.com/lists/1", "items_link": "http://www.example.com/lists/1/items" }] } """
  • 41. Lists API Scenario: Removing a list (and the index is empty) Given I call "/lists/1.json" in DELETE When I call "/lists.json" Then the JSON should be: """ { "lists": [] } """ Scenario: Updating a list's name When I call "/lists/1.json" in PUT with: """ { "list": { "name": "foobar" } } """ Then the JSON should be: """ { "name": "foobar", "items_link": "http://www.example.com/lists/1/items" } """
  • 42. Lists API Scenario: Removing a list (and the index is empty) Given I call "/lists/1.json" in DELETE When I call "/lists.json" Then the JSON should be: """ { "lists": [] } """ Let’s see some code! Scenario: Updating a list's name When I call "/lists/1.json" in PUT with: """ { "list": { "name": "foobar" } } """ Then the JSON should be: """ { "name": "foobar", "items_link": "http://www.example.com/lists/1/items" } """
  • 44. Items API Feature: Manage a list's items As a developer In order to manipulate the list's item I want to access them through APIs Background: Given I login succesfully with user "aaa@abc.org" Scenario: Default items When I call "/lists/1/items.json" in GET Then the JSON should be: """ { "items": [{ "name": "Insert your items!", "position": 0 }], "list_link": "http://www.example.com/lists/1" } """
  • 45. Items API Scenario: Moving an element to the top Given I call "/lists/1/items.json" in POST with: ... And I call "/lists/1/items.json" in POST with: ... When I call "/lists/1/items/2/move.json" in PUT with: """ { "position": 0 } """ Then the JSON should be: """ { "items": [{ "name": "b", "position": 0 }, { "name": "Insert your items!", "position": 1 }, { "name": "c", "position": 2 }], "list_link": "http://www.example.com/lists/1" } """
  • 46. Items API Scenario: Moving an element to the top Given I call "/lists/1/items.json" in POST with: ... And I call "/lists/1/items.json" in POST with: ... When I call "/lists/1/items/2/move.json" in PUT with: """ { "position": 0 } Let’s see some code! """ Then the JSON should be: """ { "items": [{ "name": "b", "position": 0 }, { "name": "Insert your items!", "position": 1 }, { "name": "c", "position": 2 }], "list_link": "http://www.example.com/lists/1" } """
  • 47. Do we need an admin panel?
  • 48. Do we need an admin panel?
  • 49. Do we need an admin panel? Put in your Gemfile: gem 'activeadmin' gem 'meta_search', '>= 1.1.0.pre' Then run: $ bundle install $ rails g active_admin:install $ rails g active_admin:resource users $ rails g active_admin:resource lists $ rails g active_admin:resource items $ rake db:migrate
  • 50. Do we need an admin panel? Put in your Gemfile: Let’s see some code! gem 'activeadmin' gem 'meta_search', '>= 1.1.0.pre' Then run: $ bundle install $ rails g active_admin:install $ rails g active_admin:resource users $ rails g active_admin:resource lists $ rails g active_admin:resource items $ rake db:migrate
  • 51. Build a JS App!
  • 52. Build a JS App! Backbone.js: MVC in the browser Rails asset pipeline concatenate and minifies our JS automatically We can even write our app in CoffeeScript: it works out of the box.
  • 53. Build a JS App! Backbone.js: MVC in the browser to Rails asset pipeline concatenate the code.. again? and minifies our JS automatically We can even write our app in CoffeeScript: it works out of the box.
  • 55. We are late, the #codemotion crew are kicking me out http://www.flickr.com/photos/oneaustin/1261907803
  • 56. TL;DR http://www.flickr.com/photos/evilaugust/3307382858
  • 57. TL;DR Mobile Apps need an API Ruby on Rails is good for writing APIs You can build nice admin interfaces with ActiveAdmin You can craft Javascript Apps easily using the asset pipeline.
  • 58. RubyDay.it 15 June 2012 www.rubyday.it