Ruby-on-Rails
  Home arrow Ruby-on-Rails arrow Page 4 - Ruby on Rails: Beginning Rails
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
RUBY-ON-RAILS

Ruby on Rails: Beginning Rails
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-04-28

    Table of Contents:
  • Ruby on Rails: Beginning Rails
  • Controlling the Situation
  • A View...To a Kill (Duhn Duhn Dun!!!)
  • What Everything is For

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Ruby on Rails: Beginning Rails - What Everything is For


    (Page 4 of 4 )

    Our Buddy the Controller

    Our buddy the controller, as stated previously, is the foreman of your web application. He handles the requests sent from the user's web browser, such as a URL. It also directs people from page to page in your website. And lastly, the controller calls upon actions, then takes the result of that action and hands it on to a particular view.

    The View...No, Not the Horrible Television Show

    A view's function is pretty simple: display the results from an action. Keep in mind that there can be a plethora of views in a website, each triggered by a certain action. A good example of this is if you display a page asking a user for data through one action, then when the user enters that data, another action is called displaying a different view.

    Do Your Thing, On the Runway

    To handle the processing of data in your application, you need what is called a Model. Aside from looking really hot and being really dumb, models interact with actions and handle the data tasks for them.

    Examples would be mathematical equations, checking to see whether a certain piece of data is in a database, copying information from one database to other databases, etc. The action gives data to the model, and the model returns some result to the action.

    And there you have it folks...an explanation of what is known as the Model-View-Controller architecture.

    Conclusion

    We've covered a lot of ground in this tutorial. You learned how to build your first web app with Rails and how to set up your basic skeletal framework. Granted it was a cheesy static web page that was our result (whatchoo talk bout Willis?!?). But never fear. In our next exciting episode we will begin to work with more dynamic pages. You'll learn to do math, respond to user input and lots more. So be sure to come back often.

    Till then...


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Thanks for stopping by to read my article. In this issue we discuss the beginnings...
     

    RUBY-ON-RAILS ARTICLES

    - Iterating and Incrementing Strings in Ruby
    - Comparing and Manipulating Strings in Ruby
    - Strings in Ruby
    - Ruby On Rails: Making Your First Dynamic Site
    - Ruby on Rails: Beginning Rails
    - Ruby: Modules, Mixins, Fixins, and Rails
    - Controlling Information Access with the Rail...
    - URLs, Filters and the Rails Action Controller
    - Flash and the Rails Action Controller
    - Rails Action Controller
    - Dropping and Sorting with AJAX and script.ac...
    - Drag and Drop with script.aculo.us and Rails
    - Introducing script.aculo.us
    - Ruby Classes and Objects
    - Ruby Loops







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT