RoR Ironhack

About Me

  • Joaquin Rivera Padron @joahking
  • thinking about changing that nick :-D
  • doing RoR since 2006
  • working for XING
  • ifeelmaps = where ecologic, spiritual consumers and businesses meet
  • https://github.com/joahking

Ruby On Rails

  • Build for Productivity
  • Best practices
  • MVC = Model/View/Controller
  • Convention over Configuration
  • Strong OSS Momentum

Ruby gems

 

  • In Ruby the Gems are libraries
  • Ruby gems https://rubygems.org/
  • Rails is a gem, each component is a gem, and for each there's always an alternative
  • Bundler http://bundler.io/
  • Gemfile

Rails generators FTW

 

  • rails g scaffold
  • many generators available: rails g
  • gems can add their own

 

http://guides.rubyonrails.org/generators.html

Pro tip

to see Best Practice code

  • use generators
  • check rails code itself

 

https://github.com/rails/rails

View helpers FTW

  • writing HTML is tedious
  • form control naming and models' attributes

 

http://guides.rubyonrails.org/form_helpers.html

CSS to start with

  • HTML, CSS, and JS framework for responsive, mobile webs
  • e.g. Twitter Bootstrap http://getbootstrap.com/
  • find free or cheap templates
  • dump it in your repo

 

Asset pipeline

 

  • concatenate assets, which can reduce the number of requests that a browser performs
  • fingerprint into filenames for cache busting
  • asset minification or compression. Configurable.
  • Precompilation: e.g. Sass for CSS, CoffeeScript for JS, and ERB for both by default.

 

http://guides.rubyonrails.org/asset_pipeline.html

Made with Slides.com