Ruby+rails

13
Josh Dvir Founder @ h0ps://tooveo.com

description

 

Transcript of Ruby+rails

Page 1: Ruby+rails

Josh  Dvir  Founder  @  

h0ps://tooveo.com  

Page 2: Ruby+rails

Ruby  On  Rails  Workshop  

+  

Page 3: Ruby+rails
Page 4: Ruby+rails

Ruby  Philosophy  

•  “A  programming  language  for  human  beings”.  •  Expressive  code  •  Powerful  expansion  by  Metaprogramming  /  FuncKonal  Paradigm    • Make  programming  more  fun  •  Be  producKve    

Page 5: Ruby+rails

Ruby  Community  One  of  most  innovaKve  and  acKve  today:    

•  Ruby  on  Rails  

•  TDD  /  BDD,  ConfiguraKon  Management  

•  A  LOT  of  libraries  that  inspired  other  communiKes  (Python,  Go,  Java,  C#  etc.)    

•  Has  created  other  Virtual  Machine  implementaKons  (default  is  MRI):    •  JRuby  (runs  on  JVM)  •  Rubinius  (wri0en  in  C++  with  LLVM)  •  Maglev  (wri0en  in  Smalltalk)    •  RubyMoKon  (runs  on  iOS  and  OSX)    

Page 6: Ruby+rails

Ruby  On  Rails  A  framework  to  create  web  applicaKons.  

•  Ruby  on  Rails  is  a  great  example  of  opinionated  so[ware.    •  ConvenKon  over  ConfiguraKon  •  Principle  of  Least  Astonishment  •  KISS  (Keep  It  Simple,  Stupid)    •  DRY  (Don’t  Repeat  Yourself)    

Architecture:  

Rails  is  a  MVC  (Model-­‐View-­‐Controller)  framework.  •  Model:  main  business  rules  and  persistence  •  View:  presentaKon  layer  of  data  •  Controller:  a  bridge  between  models  and  views,  based  on  acKons.  

Page 7: Ruby+rails

   

Page 8: Ruby+rails

Quick  Example  J  

Page 9: Ruby+rails

Hello.java  

hello.rb    

Page 10: Ruby+rails
Page 11: Ruby+rails

Hello.java  

hello.rb    

119  chars  

19  chars  

Page 12: Ruby+rails

626%  ProducKvity  Gain  

Page 13: Ruby+rails

Let’s  Start    Code!