Building modern apps with scaffolding tools

guillermo{at}guerreroibarra{dot}com

Follow me on github: https://github.com/ryanfox1985

March 16th, 2016

Why?

  • Time/Productivity
  • Easy
  • Extensible
  • Quality
  • Prototyping

Rupibox

Components: [Price ~ 80€]

Rupibox: Images

Rupibox: Images

Rupibox: Images

Rupibox: Images

Design: Architecture

Design: Choosing the language, frameworks, databases...

  • Ruby, Python, Java
  • Sinatra, RoR, Django, Flask, ...
  • PostgreSQL, MySQL, Sqlite

Operating system

Hypriot Rom

Server: Ruby on Rails

  • API REST
  • Sqlite

Server: Ruby on Rails

                    
$ rails new rupibox
$ cd rupibox
$ rails g scaffold Pin name:string pin_pi:integer value:boolean
                    
                

Github repo

Server: Routes Map

                  
Prefix Verb         URI Pattern            Controller#Action
pins      GET     /pins(.:format)          pins#index
          POST    /pins(.:format)          pins#create
new_pin   GET     /pins/new(.:format)      pins#new
edit_pin  GET     /pins/:id/edit(.:format) pins#edit
 pin      GET     /pins/:id(.:format)      pins#show
          PATCH   /pins/:id(.:format)      pins#update
          PUT     /pins/:id(.:format)      pins#update
          DELETE  /pins/:id(.:format)      pins#destroy
                   
               

Server: Done!

Frontend: AngularJS

Yeoman.io
                      
$ mkdir angular; cd angular
$ yo webapp
                      
                  

Frontend: AngularJS

[Bower, Grunt]

Frontend: AngularJS

[Factory]
                    
app.factory("Pin", function ($resource, ENV) {
  return $resource(ENV.apiEndpoint + "/pins/:id.json", {id: "@id"},
    {
      'create': {method: 'POST'},
      'index': {method: 'GET', isArray: true},
      'show': {method: 'GET', isArray: false},
      'update': {method: 'PUT'},
      'destroy': {method: 'DELETE'}
    }
  );
});
                    
                
                    
// Query all pins
$scope.pins = Pin.query();

// Update value
Pin.update({id: pin.id}, {pin: pin});
                    
                

Frontend: AngularJS

[Bower components]
                    
                        $ bower install BOWER_MODULE --save
                    
                
                    
$ bower install bootstrap-switch --save
$ bower install angular-xeditable --save
                    
                

Github repo

Frontend: Done!

Android client

Github repo

Android client: Screenshot

Android client: Video

Questions?