1. Setup a focus group (like a study group for peer learning) to work on the Ruby on Rails workshops via Interact tools as a class.
A focus group was set for to work on Ruby on Rails workshops at http://ltang18.blogspot.com
I also joined the focus group by Dennis at http://railsfocusgroup.blogspot.com/
2. What is meant by "convention over configuration" and how does it reduce coding?
3. Further work on understanding MVC:
a. See the wiki at http://wiki.rubyonrails.org/rails/pages/UnderstandingMVC
The content does not available!
b. Do the MVC tutorial at http://wiki.squeak.org/squeak/1767
The file MVCTutorial.zip is downloaded and studied.
Challenge Problems:
1. How is Rails structured to follow the MVC pattern?
Model (ActiveRecord ) :
The relationship between Object and Database is maintained by Model. It also handles validation, association and transactions. The tables in the database is binded with the ActiveRecord library inside the Model. It interfaces Ruby program code and table to manipulates database records.
View ( ActionView )
The format for data presentation which is controlled by the controller and usually integrated with AJAX technology.
When connection to Rail application, the embedded Ruby based system inside the ActionView library set templates for displaying data as a view.
Controller ( ActionController ):
Querying models and oranizing the data for different views are handled by controller.
The ActionController inside the controller breaks the data for ActiveRecord (the database interface) and ActionView (the presentation engine). (tutorialspoint.com)

to be continued.
Figure 1. Rails Framework (tutorialspoint.com)
In Rails, the folder structure seperate the model, controller and view as follows:
Figure 2. Rails folder structure to follow the MVC pattern
2. Apply the MVC design approach to our Project: Online Taxi Booking System.

Figure 3. Interface for managing rails applications
Online Taxi Booking System application skeleton is created by applying command:
rails OTBS
Figure 4. The folder structre after applying command in rails_apps folder.
Reference:
tutorialspoint.com (n.d.), Ruby on Rails Framework, Retrieved 12 April 2009 from http://www.tutorialspoint.com/cgi-bin/printversion.cgi?tutorial=ruby-on-rails&file=rails-framework.htm
tutorialspoint.com (n.d.), Ruby on Rails Framework, Retrieved 12 April 2009 from http://www.tutorialspoint.com/ruby-on-rails/rails-framework.htm
RailsGuiders (n.d.), Getting Started with Rails, Retrieved 12 April 2009 from http://guides.rubyonrails.org/getting_started.html
No comments:
Post a Comment