Learning Rails

194
31 March 2011 [email protected]

description

 

Transcript of Learning Rails

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. Lets try it out! 10. Lets try it out! 11. Lets try it out! 12. Chapter 1 13. Basic concepts of Rails Support for Follows thepattern Follows the architectural pattern Supports 14. Rails directory structure 15. Rails directory structure 16. Rails directory structureApplication code, structuredfollowing the MVC design 17. Rails directory structure Application configuration 18. Rails directory structure 19. Rails directory structure 20. Rails directory structure 21. Rails directory structureFiles to manipulate thedatabase 22. Rails directory structureDocumentationfor the app 23. Rails directory structureStatic filesaccessible tothe public 24. Rails directory structureApplication tests 25. Rails directory structure Third-party Plugins 26. Rails directory structure 27. Bundler next stepUse Bundler to include and install the gems needed 28. Bundler 29. Bundler 30. Chapter 2 31. Building a simple appKeyidintegervalue stringstate 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 Thiswith our new data model 37. Building a simple app Lets 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 RailsThe index action asksthe Key model to retrieveall 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 modelpulls all the keys from the database 53. Building a simple appdiagram from Ruby on Rails Tutorial: Learn Rails by Exampleavailable at http://ruby.railstutorial.org/ MVC in RailsThe Key model returns the listof 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 RailsThe view uses embedded Rubyto render the page as HTML 58. Building a simple appdiagram from Ruby on Rails Tutorial: Learn Rails by Exampleavailable at http://ruby.railstutorial.org/ MVC in Rails The controller passes theHTML back to the browser 59. Building a simple app Where are dened 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 shouldnt be able to create a key withoutor 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 Lets try a Form Builder DSL 81. Form helpers & builders Lets try a Form Builder DSL - Features 82. Form helpers & builders Lets try a Form Builder DSL - Features 83. Form helpers & builders Lets try a Form Builder DSL - Installation 84. Form helpers & builders Lets try a Form Builder DSL - Installation 85. Form helpers & builders Lets try a Form Builder DSL - Installation 86. Form helpers & builders Lets try a Form Builder DSL - Installation 87. Form helpers & builders Lets try a Form Builder DSL - Installation 88. Form helpers & builders Lets try a Form Builder DSL - Installation 89. Form helpers & builders Lets try a Form Builder DSL - Installation 90. Form helpers & builders Lets try a Form Builder DSL - Installation 91. Form helpers & builders Lets try a Form Builder DSL - Installation 92. Form helpers & builders Lets try a Form Builder DSL - Installation 93. Form helpers & builders Lets try it out! 94. Form helpers & builders Lets try it out! 95. Form helpers & builders Lets try it out! 96. Alternate markup languages 97. Alternate markup languages Why do views tend to become more andmore 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 tournamentsTournamenthas 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 & localizationimage 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 keyshints 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. * * [email protected] 31 March 2011