Your SlideShare is downloading. ×
0
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Learning Rails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Learning Rails

1,261

Published on

Published in: Technology
3 Comments
8 Likes
Statistics
Notes
No Downloads
Views
Total Views
1,261
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
86
Comments
3
Likes
8
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. * * splash@dei.uc.pt 31  March  2011  
  • 2. Chapter 0
  • 3. def  what  is  rails?      A  web  framework  end
  • 4. Rails was created in 2003by David Heinemeier Hansson
  • 5. Who is already on Rails?
  • 6. Who is already on Rails?
  • 7. Who is already on Rails?
  • 8. Who is already on Rails?
  • 9. Let’s try it out!
  • 10. Let’s try it out!
  • 11. Let’s try it out!
  • 12. Chapter 1
  • 13. Basic concepts of Rails§  Support for§  Follows the pattern §  Follows the architectural pattern §  Supports
  • 14. Rails directory structure
  • 15. Rails directory structure
  • 16. Rails directory structure Application code, structured following the MVC design
  • 17. Rails directory structure Application configuration
  • 18. Rails directory structure
  • 19. Rails directory structure
  • 20. Rails directory structure
  • 21. Rails directory structure Files to manipulate the database
  • 22. Rails directory structure Documentation for the app
  • 23. Rails directory structure Static files accessible to the public
  • 24. Rails directory structure Application tests
  • 25. Rails directory structure Third-party Plugins
  • 26. Rails directory structure
  • 27. Bundler next step Use Bundler to include and install the gems needed
  • 28. Bundler
  • 29. Bundler
  • 30. Chapter 2
  • 31. Building a simple app Key id integer value string state string
  • 32. Building a simple app
  • 33. Building a simple app
  • 34. Building a simple app
  • 35. Building a simple app
  • 36. Building a simple app§  We now need to§  This with our new data model
  • 37. Building a simple app§  Let’s delete the default static page
  • 38. Building a simple app§  Run the server!
  • 39. Building a simple app§  Root page
  • 40. Building a simple app§  Index action
  • 41. Building a simple app§  New action
  • 42. Building a simple app§  Show action
  • 43. Building a simple app§  Edit action
  • 44. Building a simple app§  Destroy
  • 45. Building a simple app table from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  Correspondence between pages and URLs
  • 46. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails
  • 47. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails The browser issues a request for the URL
  • 48. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in RailsRails routesto the indexaction in the
  • 49. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails the !
  • 50. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails
  • 51. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails The index action asks the Key model to retrieve all keys ( )
  • 52. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails The Key model pulls all the keys from the database
  • 53. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails The Key model returns the list of keys to the controller
  • 54. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in RailsThe controller capturesthe keys in the @keysvariable, which is passedto the
  • 55. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in RailsThe controller capturesthe keys in the @usersvariable, which is passedto the
  • 56. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in RailsThe controller capturesthe keys in the @usersvariable, which is passedto the
  • 57. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails The view uses embedded Ruby to render the page as HTML
  • 58. Building a simple app diagram from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  MVC in Rails The controller passes the HTML back to the browser
  • 59. Building a simple app§  Where are defined the routes?
  • 60. Building a simple app§  Which are the default actions?
  • 61. Building a simple app table from “Ruby on Rails Tutorial: Learn Rails by Example” available at http://ruby.railstutorial.org/§  RESTful routes
  • 62. image downloaded from http://wallpaperof.net/retro/
  • 63. Chapter 4
  • 64. Simple validations
  • 65. Simple validations I shouldn’t be able to create a key without or
  • 66. Simple validations V alue should be unique
  • 67. Simple validations
  • 68. Simple validations
  • 69. Simple validations
  • 70. Simple validations
  • 71. Simple validations
  • 72. Simple validations
  • 73. Simple validations
  • 74. Form helpers & builders
  • 75. Form helpers & builders
  • 76. Form helpers & builders
  • 77. Form helpers & builders
  • 78. Form helpers & builders
  • 79. Form helpers & builders
  • 80. Form helpers & builders§  Let’s try a Form Builder DSL
  • 81. Form helpers & builders§  Let’s try a Form Builder DSL - Features
  • 82. Form helpers & builders§  Let’s try a Form Builder DSL - Features
  • 83. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 84. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 85. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 86. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 87. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 88. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 89. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 90. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 91. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 92. Form helpers & builders§  Let’s try a Form Builder DSL - Installation
  • 93. Form helpers & builders§  Let’s try it out!
  • 94. Form helpers & builders§  Let’s try it out!
  • 95. Form helpers & builders§  Let’s try it out!
  • 96. Alternate markup languages
  • 97. Alternate markup languages§  Why do views tend to become more and more complex?
  • 98. Alternate markup languages HTML
  • 99. Alternate markup languages
  • 100. Alternate markup languages
  • 101. Alternate markup languages
  • 102. Alternate markup languages
  • 103. Alternate markup languages
  • 104. Alternate markup languages
  • 105. Alternate markup languages
  • 106. Alternate markup languages
  • 107. Alternate markup languages
  • 108. Alternate markup languages
  • 109. Alternate markup languages
  • 110. Alternate markup languages
  • 111. Alternate markup languages
  • 112. Root path
  • 113. Root path
  • 114. Root path
  • 115. Root path
  • 116. Root path
  • 117. Root path
  • 118. Root path
  • 119. image downloaded from http://wallpaperof.net/retro/
  • 120. Chapter 5
  • 121. Adding tournaments
  • 122. Adding tournaments Tournament has many Key key_id integer name string start_date string end_date string
  • 123. Adding tournaments
  • 124. Adding tournaments
  • 125. Adding tournaments
  • 126. Adding tournaments
  • 127. Adding tournaments
  • 128. Adding tournaments
  • 129. Adding tournaments
  • 130. Adding tournaments
  • 131. Adding tournaments
  • 132. Adding tournaments
  • 133. Adding tournaments
  • 134. Adding tournaments
  • 135. Adding tournaments
  • 136. Adding tournaments
  • 137. Adding tournaments
  • 138. Adding tournaments
  • 139. Adding tournaments
  • 140. Adding value range to states
  • 141. Adding value range to states
  • 142. Adding value range to states
  • 143. Adding value range to states
  • 144. Adding value range to states
  • 145. Adding value range to states
  • 146. Adding value range to states
  • 147. Adding value range to states
  • 148. Adding value range to states
  • 149. Internationalization & localization image downloaded from http://wallpaperof.net/retro/
  • 150. Internationalization & localization
  • 151. Internationalization & localization
  • 152. Internationalization & localization
  • 153. Internationalization & localization
  • 154. Internationalization & localization
  • 155. Internationalization & localization
  • 156. Internationalization & localization
  • 157. Internationalization & localization
  • 158. Route translation
  • 159. Route translation
  • 160. Route translation
  • 161. Route translation
  • 162. Route translation
  • 163. Route translation
  • 164. Route translation
  • 165. Route translation
  • 166. Route translation
  • 167. Route translation
  • 168. Route translation
  • 169. Route translation
  • 170. Route translation
  • 171. Route translation
  • 172. Route translation
  • 173. Chapter 6
  • 174. Web-app-theme
  • 175. Web-app-theme
  • 176. Web-app-theme
  • 177. Web-app-theme
  • 178. Web-app-theme
  • 179. Web-app-theme
  • 180. Chapter 7
  • 181. Create a button on the keys’ indexpage to generate 100 random keys
  • 182. Create a button on the keys’ index page to generate 100 random keys hints
  • 183. Create a button on the keys’ indexpage to generate 100 random keys
  • 184. Create a button on the keys’ indexpage to generate 100 random keys
  • 185. Create a button on the keys’ indexpage to generate 100 random keys
  • 186. Create a button on the keys’ indexpage to generate 100 random keys
  • 187. The end
  • 188. The end
  • 189. Give back!
  • 190. Give back! open source projects, feedback, share your knowledge, your snippets & projects
  • 191. * * splash@dei.uc.pt 31  March  2011  

×