1 / 30

Chapter 3.1 – RoR: An introduction

Chapter 3.1 – RoR: An introduction. RoR: An introduction. Presented b y :. Maciej Mensfeld. senior ruby developer@wordwatch.com senior ruby developer@furioustribe.com. maciej@mensfeld.pl dev.mensfeld.pl github.com/mensfeld. Maciej Mensfeld. Ruby on Rails: An introduction - Rules.

Download Presentation

Chapter 3.1 – RoR: An introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 3.1 – RoR: An introduction RoR: An introduction Presented by: Maciej Mensfeld senior ruby developer@wordwatch.com senior ruby developer@furioustribe.com maciej@mensfeld.pl dev.mensfeld.pl github.com/mensfeld Maciej Mensfeld

  2. Ruby on Rails: An introduction - Rules RoR: An introduction Please… • …ask me to slow down, if I speak to quickly; • …ask me again, if I forget; • …ask questions, if anything i say is not clear; • …feel free to share your own observations Maciej Mensfeld

  3. Ruby on Rails: An introduction – Rails what? RoR: An introduction Maciej Mensfeld

  4. Ruby on Rails: An introduction – What is Ruby on Rails? RoR: What is Ruby on Rails? • Full stack web application framework • Written in the Ruby programming language • Growing community since 2004 • Open Source and Free • Focused on developer productivity and getting thejob done – fast! Maciej Mensfeld

  5. Ruby on Rails: An introduction – What is Ruby on Rails? RoR: Why Ruby on Rails? Lot of frameworks exists on the market and a lot of programming languages for the web but… Rails leads Maciej Mensfeld

  6. Ruby on Rails: An introduction – What is Ruby on Rails? RoR: Why Ruby on Rails? • Rails give the developers a real productivity boost fordeveloping web applications • Because of Ruby and domain specific languages • Convention over Configuration • Productivity boost! 3-4 timesfasterthandevwithzend Reallyfaster? Maciej Mensfeld

  7. Ruby on Rails: An introduction – What is Ruby on Rails? RoR: Why Ruby on Rails? Designed to make it easier to develop, deploy, and maintain web applications Design with Model-View-Controller Also based on DRY concept Don’t Repeat Yourself (DRY) Every piece of knowledge should be expressed in just one place Maciej Mensfeld

  8. Ruby on Rails: An introduction – Who uses RoR? I do! ;) (but not only…) and thousands of other… Maciej Mensfeld

  9. Ruby on Rails: An introduction – The framework Lil bit bout Rails structure The Framework Maciej Mensfeld

  10. Ruby on Rails: An introduction – The framework Lil bit bout Rails structure Tryit out! cd ~ railsnewmy_blog … (output): create create README createRakefile createconfig.ru create .gitignore createGemfile createapp createapp/assets/images/rails.png … To much stuff! WTF?! Maciej Mensfeld

  11. Ruby on Rails: An introduction – The framework Lil bit bout Rails structure Fortunatelyyoudon’tneed to careaboutthis :) Maciej Mensfeld

  12. Ruby on Rails: An introduction – The framework MVC Maciej Mensfeld

  13. Ruby on Rails: An introduction – The framework Rails MVC Maciej Mensfeld

  14. Ruby on Rails: An introduction – The framework Models ;) Maciej Mensfeld

  15. Ruby on Rails: An introduction – The framework ActiveRecord models Maciej Mensfeld

  16. Ruby on Rails: An introduction – The framework Models should be… Fat! Fat! Fat!!!! Fat! Fat! Fat!!!! Fat models, thin controllers Fat! Fat! Fat!!!! Fat! Fat! Fat!!!! Fat! Fat! Fat!!!! Maciej Mensfeld

  17. Ruby on Rails: An introduction – The framework But… don’t piss off Vegeta ;) Make fat models and thin controllers or Vegeta will visit U… Maciej Mensfeld

  18. Ruby on Rails: An introduction – The framework ActionController Maciej Mensfeld

  19. Ruby on Rails: An introduction – The framework ActionController – be Restful Maciej Mensfeld

  20. Ruby on Rails: An introduction – The framework ActionController – be Restful Maciej Mensfeld

  21. Ruby on Rails: An introduction – The framework ActionView Maciej Mensfeld

  22. Ruby on Rails: An introduction – The framework ActionView templates ERB – templateswith HTM and Ruby code – used to display dinamicstufffromprepared by controllers Maciej Mensfeld

  23. Ruby on Rails: An introduction – Example app Enough theory, let’s start the magic! Maciej Mensfeld

  24. Ruby on Rails: An introduction – Example app Generate Rails scaffold… Tryit out! Maciej Mensfeld

  25. Ruby on Rails: An introduction – Example app Start rails server to check if it works Tryit out! Go to http://localhost:3000/ Maciej Mensfeld

  26. Ruby on Rails: An introduction – Example app Yay! It works! Maciej Mensfeld

  27. Ruby on Rails: An introduction – Example app Creating Posts Tryit out! Maciej Mensfeld

  28. Ruby on Rails: An introduction – Example app Creating Posts Tryit out! Yeahitworks but… we cancreateemptyposts :( not good :( Maciej Mensfeld

  29. Ruby on Rails: An introduction – Example app Protect create/update/destroy Tryit out! Ourblogworks but anyonecanadd, edit and removeposts… shitty :/ Maciej Mensfeld

  30. Ruby: writing some cool stuff Live long and prosper! Presented by: Maciej Mensfeld maciej@mensfeld.pl dev.mensfeld.pl github.com/mensfeld Maciej Mensfeld

More Related