Ruby on Rails Overview

  • View
    576

  • Download
    4

Embed Size (px)

DESCRIPTION

This presentation stands for overview to describe Ruby on Rails.

Text of Ruby on Rails Overview

  • 1. Ruby on RailsOverviewKoki Shimizu(u2daijibrother@gmail.com)13418
  • 2. What is Rails?Rails is a web application developmentframework written in the Ruby.13418
  • 3. The Rails philosophy includesseveral guiding principlesDRY (Dont Repeat Yourself)CoC (Convention over Conguration)REST(REpresentational State Transfer)Rails13418
  • 4. DRYEvery piece of knowledge must have asingle, unambiguous, authoritativerepresentation within a system.13418
  • 5. DRY Documents and Code Code Comments State Class/Utlity13418
  • 6. CoCDesign paradigm to decrease thenumber of decisions that developersneed to make, gaining simplicity, but notnecessarily losing exibility.13418
  • 7. CoC Mapping File ( Class to DB Table ) Class Name/ Method Name Folder Structure/ Namespace Design Template Method/ Class Design13418
  • 8. RESTREST is an architectural style and thebest pattern for web application.RESTWEB13418
  • 9. RESTResource ResourceEach request includes all of theinformation.HTTPThe set of operations supportedby the web service using HTTPmethods as known well-dened-interface (e.g., GET, PUT, POST, orDELETE).Uniform InterfaceStatelessHTML,XML or JSON etcHTML,XML or JSON etcResponse is cacheable toimproving scalability andperformance.CacheableKEY GOALS of REST include:Scalability of component interactionsGenerality of interfacesIndependent deployment of componentsIntermediary components to reduce latency, enforce security and encapsulatelegacy systems13418
  • 10. MVCModel-View-Controller Isolation of business Logic from the user interface Ease of keeping code DRY Making it clear where different types of code belong foreasier maintenance13418
  • 11. MVCModel-View-Controller Isolation of business Logic from the user interface Ease of keeping code DRY Making it clear where different types of code belong foreasier maintenanceControllerView Model Storage13418
  • 12. MVCModel-View-Controller Isolation of business Logic from the user interface Ease of keeping code DRY Making it clear where different types of code belong foreasier maintenanceControllerView Model StorageRequest to controller from user interface13418
  • 13. MVCModel-View-Controller Isolation of business Logic from the user interface Ease of keeping code DRY Making it clear where different types of code belong foreasier maintenanceControllerView Model StorageRequest to controller from user interfaceController calls Model and gets results13418
  • 14. MVCModel-View-Controller Isolation of business Logic from the user interface Ease of keeping code DRY Making it clear where different types of code belong foreasier maintenanceControllerView Model StorageRequest to controller from user interfaceController calls Model and gets resultsController puts View the results13418
  • 15. MVCModel-View-Controller Isolation of business Logic from the user interface Ease of keeping code DRY Making it clear where different types of code belong foreasier maintenanceControllerView Model StorageRequest to controller from user interfaceController calls Model and gets resultsController puts View the resultsView is rendered user interface13418
  • 16. MVC on Rails13418
  • 17. MVC on RailsControllerView Model DB13418
  • 18. MVC on RailsControllerView Model DBRouter13418
  • 19. MVC on RailsControllerView Model DBRouterBrowser posts request to Router13418
  • 20. MVC on RailsControllerView Model DBRouter discovers controller to execute and Rails executes the controllerRouterBrowser posts request to Router13418
  • 21. MVC on RailsControllerView Model DBRouter discovers controller to execute and Rails executes the controllerController calls Model and gets resultsRouterBrowser posts request to Router13418
  • 22. MVC on RailsControllerView Model DBRouter discovers controller to execute and Rails executes the controllerController calls Model and gets resultsController puts View the resultsRouterBrowser posts request to Router13418
  • 23. MVC on RailsControllerView Model DBRouter discovers controller to execute and Rails executes the controllerController calls Model and gets resultsController puts View the resultsView is rendered user interfaceRouterBrowser posts request to Router13418
  • 24. Model13418
  • 25. VieweRubySassy-CSSJavaScript(CoffeeScript)AJAXJQuery13418
  • 26. ControllerRedirectSession Manager13418
  • 27. Development Flowon RailsControllerViewModelScaffoldMigrationOne Iteration13418