Saturday, June 6, 2009

WORKSHOP 8 (GAURAV PATEL)

1. List what you consider to be the three strengths of Ruby on Rails workshop series
ANS:
In my opinion the three strengths of Ruby on Rails workshop series are:a. Easy to learn new programming language.b. Learn the new kind of framework on software developmentc. Hands on Ruby on Rails and to enhance your technical skills.

2. List what you consider to be the three weaknesses of Ruby on Rails workshop series:
ANS:
In my opinion three weakness of Ruby on Rails are:a. 1st step to take so that start the workshops was difficult.b. Problems while configuring on Vista Homec. Online support and servicesd. Less support provided for initial installation

3. List what aspects of Ruby on Rails workshop series that you found to be most difficult.
ANS:
a. Initially it is difficult to understand the MVC architecture in ROR, for example, what is the relationship between model, views and controllers in ROR?b. Need to study how to create the table attributes by using db schema.
c. Connection with MySql.

4. List what improvements could be made to the Ruby on Rails workshop series:
ANS:
a. Verify the provides study link and source code whether is workable before enounces.
b. Teach the student how to do the transaction as well, because transaction is the core of e-business.
c. Use IDE for Ruby on Rails project development.
d. Break into teams earlier and follow down Development or Management streams depending on what the student preference. This may also help in developing collaboration between team members.
e. Subject should provide more example workshops and information links about how does the Ruby and Rails works with MySQL.

5. Reflect on your experiences with the other Web framework used in this subject: Was it effective? How can it be improved? Should other Web frameworks be used as well or instead of Ruby on Rails?
ANS:
According to me using java servlet, mysql and apache to do the booking system, it is not effective if comparing with Ruby on Rails, because java code is more complex than Ruby on Rails. I suggest using Netbean IDE for Ruby on Rails project development, because it can help to verify the code syntex that avoid syntax error. I think other web frameworks such VB.NET that should be better than Ruby on Rails.

6. Did the Developer’s or IT managers Team that you joined after workshop 4 have a preference towards using other tools to facilitate collaboration? Comment on the differences between these use of the sub-forum or Interact wiki tools from your experiences in this subject.
ANS:
In this case we are 8 persons in the our group and to communicate with each we preferred Google group and we like it to work for our communication we had enjoyed working together and helping each other by Google group facility as a communication. Its also generate mail to the group members email so we found it very easy to use and we were getting speedy response from the group member. If some one post any message on the group then it posts that message to every one who has joined that group so it is very good to send message to every one.
7. Further comments to add?
ANS:
For most of the students Ruby on Rails is the very new concept so they don’t have mush knowledge while they joined the subject so this subject should provide more and more information source including every basic information about that platform so student can learnt it easily. This subject has 8 workshops that’s good idea to learn any new platform. This subject is forcing more on Exercises; rather then putting more exercises they should put more workshops so student can learn more. Exercises are also good for the subject but because of lack of time they should cut exercises and put some more workshops.

Thursday, June 4, 2009

Tuesday, June 2, 2009

WORKSHOP 8 (Cristian Escobar)

Finally the last workshop is presented where we are asked to answer a group of questions as an evaluation report. This evaluation is made with the aim to improve the subject workshops, which by the feedback provided of the current students will strength the weaknesses and improve the strengths.

Evaluation and Report

1. List what you consider to be the three strengths of Ruby on Rails workshop series
· It’s well organized, step by step from beginning to the end.
· Promotes team work
· Provide different visions/roles (developer/IT Infr. Manager)

2. List what you consider to be the three weaknesses of Ruby on Rails workshop series:
· Diverging from the core of the subject
· Too spread topics, becomes less assimilation of material.
· Too basic ruby applications

3. List what aspects of Ruby on Rails workshop series that you found to be most difficult.
· New language, framework, interface, etc. to learn in a short period
· Huge workload for assignments
· Working on teams from the beginning then change and reorganize new teams.

4. List what improvements could be made to the Ruby on Rails workshop series:
· Link them with the core of the subject
· I think it is not good idea work in such big groups (teams)
· Workshops released with more anticipation.


Free response and reflective questions:

5. Reflect on your experiences with the other Web framework used in this subject: Was it effective? How can it be improved? Should other Web frameworks be used as well or instead of Ruby on Rails?
I had no experience using other Web framework. Ruby on Rails it is my first experience, so I cannot compare the use of it more than believe what I have read and study about Ruby on Rails capabilities.

6. Did the Developer’s or IT managers Team that you joined after workshop 4 have a preference towards using other tools to facilitate collaboration? Comment on the differences between these use of the sub-forum or Interact wiki tools from your experiences in this subject.
We really used Google group, and it works pretty good. Easy to communicate and normally prompt response by the rest of the students. It is an effective way to communicate, post with dates and time, so no excuse for the lazy ones (especially when working in groups). However I didn’t heard any comment to use any other application for communication and share the subject’s information.

7. Further comments to add?
Workshops are a fairy good idea to introduce practical and new topics. The methodology was good and clear. However I think there were too much importance to the workshops and lack of importance to the core of the subject we suppose to have. I think a better balance it will be better, resolving exercises as well like the first assignment but with less workload.

WORKSHOP 7 (BLUE TEAM)

As a continuation of the workshop 6 we were asked to add some ideas of policy planning and documentation about production site deployment and maintenance solutions.

Again, this workshop is presented as a blue team report (please follow link)

WORKSHOP 6 (BLUE TEAM)

For this workshop we had been ask to further search and answer the question: “Are we certain that Ruby on Rails is the right platform for Web development?”. A report created by the blue team should answer this question focused on the framework alternatives, mainly on the issues of scalability, flexibility. In addition a plan for capacity planning, performance testing, site maintenance and future development of the OTBS is presented.

The report was created and posted in the following the link:
http://itc594.googlegroups.com/web/BLUE_TEAM_WORKSHOP6.doc?gda=hILiy0kAAAAG0c-TWgDZ_1IVyawxAjfR2of3unBgsbsLJBC4PfSo1RQit5gZkpIhkD_Liao84qrtA-1oZDyui-um49UeGq-hhAioEG5q2hncZWbpWmJ7IQ&gsc=l4WxUQsAAACQc51nttr7qXfEnpH4J3KE

WORKSHOP 5 - PART C (BLUE TEAM)

Part C: Online Taxi Business Process Modelling Apart from the business basics of offering a clean car, safe driving, being on time, consider the business processes involved and construct a Simple Online Taxi business process model.

1. Before the ride


2. During the ride


3. End of the ride


WORKSHOP 5 - PART B (BLUE TEAM)


Part B: The enhanced customer experience through Web 2.0 technology
1. Use a table to describe how the customer experience is improved by

a. Horizontal scalability (eg ordering a taxi by mobile phone call or SMS, mobile Internet, desktop or laptop computer)
b. Service oriented features (eg SMS updates using location data, knowing the driver’s name before the ride and being greeted by your name etc)
c. Other customer services enabled by Web 2.0 (eg reputation system)




WORKSHOP 5 - PART A (BLUE TEAM)

Let put us in a situation where the client suggested to extend the user experience to include mobile devices and GPS systems for our OTBS. As an IT Inf. Managers we have to determine resources needed to extent this application. The presented workshop will lead us on the path to handle this new request to enable developers to do their job according requirements.


Part A: Survey of mobile device capability and Web 2.0 tools



1. Find out and recommend what type of mobile devices are suitable for:

a) Just the SMS message service;

Short Message Service, better known as SMS is a service which is available in todays most digital mobile phones. SMS permits sending short messages in text format between mobiles phones, some other handheld devices and also to land-lane phones.



Due SMS were originally developed as part of the GSM standard digital mobile phones, however, at this days is also available for a wide range of networks, including 3G networks.
Hence to provide a service using SMS based way of communication in both ways, almost any digital mobile is capable to do it.



b) The full user experience via SMS, GPS Taxi tracking and Google Maps

The new generation of mobile devices, specially 3G or newer generations had opened a new world of possibilities. The inclusion of GPS facilities together with the access to internet via 3G or GPRS made possible to have a full experience when services are implemented. For instance in our case, the Online Taxi Booking System, a full experience could be detecting the customer using the GPS incorporated in the mobile device, then locate the closes taxi using a GPS installed in every company’s cab, finally using SMS as the way of communication the customer can interact with the taxi service, further more this system can be optimized letting a computer do the answering to the solicitudes replying the availability and the estimated arrival time using Google maps, finally through a client confirmation, the instruction is send to the respective taxi driver.


2. Describe any new hardware, networking, software, systems, procedures and personnel that would be needed by the taxi company Website to support this stage 2 development.

The requirements of procurement needed for the taxi company website. As it was explained in last question part b, to have a full experience supporting this stage, it is necessary to have at least a minimum of :

- A server to support the whole information system
- An softwares- webpage- database available and configured to connect the different physical taxi stations using a distributed system, where is necessary to have the proper hardware to properly handled the application.

- The application itself, the interface with the user, in where he will do the requests either by internet phone or SMS.

- The human resources necessary to support the application maintain the system and any trouble that may occur.

However it is not easy to predict the required quantity of each item unless we can have a better description of the size of the real business.


Part A: Viewing the action

1. A Rails application framework named “animals” is created in the projects folder: C:\InstantRails\…\projects\>rails animals















2. We then start the ruby server for testing by access the application directory and execute the server starting command: ruby script/server















And access via Web browser at http://localhost:3000/

















3. Subsequently, a controller named “Mammal” is created to make the application do an action












4. Test the controller by browsing http:/localhost:3000/mammal and we receive no action resulted since there are no controller methods defined.

5. We create an action by editing and saving the mammal_controller.rb class in the directory projects\animals\app\controllers
class MammalController<>

6. Start the WEBrick server and browse at http://localhost:3000/mammals/breathe where we get a “missing template” message since it is missing a view for the breathe method.











7. Create and save a view named breathe.rhtml with particular content in \projects\animals\views\mammal. Then restart the WEBrick server and browse again at http://localhost:3000/mammals/breathe










































Part B: The active view: passing data from an action too a view

1. Create a new application called “scenery” in the same projects directory to demonstrate the use of an active view.









2. Create a controller called Demo in scenery\app\controllers








3. Add an action to demo_controller.rb as the method called rubycobe

4. Add a view template - scenery\app\views\demo\rubycode.rhtml
We will edit this view in later steps but you may like to add your own test HTML code to the view at this stage.











5. Save and restart the Web server and navigate to http://localhost:3000/scenery/rubycode














6. Use the Time.now example to pass data from an action to a view

7. Modify and save the rubycode action with a value for the time instance variable in the DemoController class in app\controllers\demo_controller.rb








8. Then modify and save the corresponding view template in \app\views\demo\rubycode.rhtml by adding a call by reference to the action’s instance variable















9. Restart the Web server and navigate the browser to http://localhost:3000/demo/rubycode














Part C: Screen layouts and forms processing with text fields, check boxes, radio buttons and multiple list controls


1. Create a new application called “cabs” in the same projects directory to demonstrate the use of an active view.













2. Create a controller called Vehicle in cabs\app\controllers





3. Add an action to vehicle_controller.rb as the method called cabtype






4. Add a view template – cabs\app\views\vehicle\cabtype.rhtml with some HTML code to the view








5. Save the view and restart the Web server and navigate to http://localhost:3000/cabs/cabtype











6. Create a file in the public directory – \cabs\public called input.html with



















7. Edit the vehicle_controller.rb here is a start. The data in each form element in the Rails application can be accessed via its name and a hash called params
8. Edit the view template cabtype.rhtml
9. Start the Web server and go to the opening page of this application at http://localhost:3000/input.html.


















Monday, June 1, 2009

INTRODUCTION II (Asignment 2)

As a continuation of our work through the subject, a new series of workshops had been developed. After the first four workshops we had created an Online Taxi Booking System (OTBS) using Ruby on Rails as a framework to develop the application utilizing MVC architecture. This second series of workshops (5 to 8) will conduces us to further work and improvement of the OTBS application. However as part of the task our group must be divided either a Developer or an IT Infrastructure Manager. As well as the entire course, hence, we will have approximately half of the students as a Developer and half as a Manager, forming Red and Blue teams respectively.
As we advance in our work, we will be posting workshops solutions according to the chosen role. The main goal is not only solve the workshop, it is also the capability to work as a team and be able to share and support the different perspectives that a developer and an IT Infrastructure Manager have.
The specific roles given to each role are the following, where my friend Chul will be developer and, Gaurav and I will assume an IT Infrastructure Managers' role.

For Developers Thread: (Red Team)
· To create a Rails application framework with the WEBbrick or Mongrel Web server and:
o Generate a controller and an action by adding a method(s) to a controller.
o Create a view template for each action and to link to action from views
o Use rails to build applications with document request, screen layouts and forms processing
· To share your findings with others

For IT Infrastructure Managers: (Blue Team)
· To examine and analyse what the developers are doing in their thread
· To investigate ideas for enhancing customer experience though use Web 2.0 and mobile devices technologies
· To determining what IT infrastructure such as hardware, networking, software, systems, procedures and personnel would be needed to support Developers if they were asked to provide mobile device interfaces to the OTBS in a stage 2 projectTo develop and share a simple business process model for an improved taxi customer experience through use of technology.

Friday, April 10, 2009

PODCAST

In the podcast I have posted video file which gives blog viewers quick information about our blog. By clicking on the video’s play button you can hear quick information about blog.

Tuesday, April 7, 2009

TUTORIAL 1

On this class tutorial we are doing a simple application containing a couple of web pages.
- Create the application named “MyApp” → rails MyApp
- Go into the application folder → ruby script/generate controller say
- Go to the Say folder (rails_apps/MyApp/app/view/say) and create two files using a text sheet and name them as “hello.html.erb” and “goodbye.html.erb”.
- Write into the files as follow using hello. For the goodbye file just replace “hello” by “goodbye”:


- This commands creates a hello/goodbye sentences, next line it would show the date and time, follow by a link to the goodbye/hello page.
- Next step is to define the variables used into the controller: Go to(rails_apps/MyApp/app/controller) and open with the “word pad” the file “say_controller”. And modify to make it like follows:

class SayController <>
def hello
@time = Time.now
end

def goodbye
@time = Time.now
end
end

- Now is ready to run it → ruby script/server (to start the server)
- Open a web browser and type → http://localhost:3000/say/hello



- Click on the link “Goodbye”


That’s it, your first ruby page application.

WORKSHOP 4

1. Spend some time moving your way through the 46 Ruby coding examples in the Ruby Tutorial with Code from http://www.fincher.org/tips/Languages/Ruby/

Done


2. What are the syntax differences in the way that Ruby and Javascript use the if statement?

Using if statement, javascript has the ability to make distinctions between different possibilities. For example, you might have a script that checks if Boolean value is true or false, if variable contains number or string value, if an object is empty or populated, or even check type and version of the visitors browser (“JavaScript If statement” n.d.).
An if statement in Ruby is pretty similar to “if” statements in other languages. If you lay out your if statements on multiple lines, you can leave off the then keyword. However, if you lay your code out more tightly, the then keyword is necessary to separate the Boolean expression. May have zero or more elsif clauses and an optional else clause.
3.While Ruby and Python are quite similar, can you find some similarities between Ruby and Javascript?
JavaScript has many of the same language features Ruby has, includingextension by mixin, duck typing, a YAML equivalent (JSON), arbitrary classand object extension (i.e. adding methods/properties to classes or specificobjects at any time), simple arrays and hashes, etc.
It also hasfirst-class functions, which are equivalent (though not identical) toblock (FAQ and JavaScript vs. Ruby, n.d.)


Reference
ASP Net Center, Retrieved March 31,2009, from ://www.aspnetcenter.com/cliktoprogram/javascript/ifstatement.asp
FAQ and JavaScript vs. Ruby (was Re: rubynuby - client side Ruby?), Retrieved March 30, 2009, from http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.ruby/2006-02/msg02949.html
Programming Ruby The Pragmatic Programmer’s Guide, Retrieved March 31,2009, from http://www.rubycentral.com/pickaxe/tut_expressions.html

WORKSHOP 3

Question1. Set up the MySQL tools on your computer as described in section 6 above.
ANS
When I have installed RUBY on rails on my laptop I have set up MySQl along with Ruby and Rails installation which shows on our blog under the name Installation of Ruby on Rails part.

Question2. Rails will setup a new application directory for each of your Web application projects. Get Instant Rails (Windows) or Locomotive (MacOS) running on your machine. Both packages install Ruby, Rails, a Web server or one called ‘Mongrel’ or another small Ruby Web server called ‘WEBrick’, and MySQL “inside a bubble” as I call it so that others parts of your system are not modified (Similarly ZOPE does with installing its own Web server and Python versions).

ANS:
This task also has been done on this blog and it is also under the same Installation of Ruby on Rails part on our blog.

Question3. Once Rails is running you at http://localhost:3000, you need to configure database access. Connection to the database is specified in the config/database.yml file.

ANS:
Actually when we create any model in Ruby on Rails it is possible to access a file named database.yml under folder named config, and that screen shot is given below and we can configure the database access by using that file.



Question4. Generate the Passenger model by creating the MySQL database and ‘passengers’ table from the information above.

ANS:

In this section we will create a table named passenger1 in which we will create some fields and it will work like a Taxi Booking Service centre in which customer can book the taxi service for their traveling. This table will have various different fields like Name, Destination Address, Origin Address, Time, Date and the like. We will have a better look on the screen shots which I have taken during the creation of this table by using Ruby over Rails with the description, so that everything should get clear that how it works and how it represents the final page regarding the taxi booking information. Screen shots related to the creation of this table is given below.







Above screen shot shows I have used Rails command to create taxi application and process of this system.

In the above screen you can see I have used three commands first needs to be created a scaffold in which I created model named passenger1having different attributes like name, contact no, destination – origin address etc. after that to check models I used by command named rake db: migrate to check whether my application is talking to database or not and then after that I run the server using command named ruby script/server to run my applications.




The above screenshot shows that the model is running properly and we are on the right track for the taxi booking system


In the above screen shot shows tat the filling of different attributes by the operator in order to book the taxi for my self.

The above given screen shot displays the successful creation of fields entered by me related to customer’s journey as an example.


The above screen shot shows the successful creation of taxi booking model named passenger2 and is ready to enter the details of other passenger.

Question5. Further work on understanding MySQL under Rails by David Mertz:a. See “Fast-track your Web apps with Ruby on Rails” at http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/
ANS:
As asked in the above question I followed the given link in the question. I have found some very useful information for the ruby on rails along with the really good information of description of role of model, view and controller on it. This link also gives quick and good understanding of coding in the environment of ruby on rails. It is very helpful to understanding the exercises and workshops. This link is very useful to understand the ruby and rails for the new learns with ruby and rails.

b. The “Rolling with Ruby on Rails” series and “Cookbook recipes by Curt Hibbs and others beginning at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
ANS:
The link by Curt Hibbs is very useful to understand the topic on the Ruby and Rails it shows that how to install ruby and rails from introduction t the installation of ruby on rails in our system along with the MySQL installation which help me a lot to making this assignment and learning ruby and rails quite good as a new learner.
















WORKSHOP 2


1. Setup a focus group to work on the Ruby on Rails workshop via interact tools as a class.

To work on the workshops using Ruby on Rails we had setup a forum group where we can discuss end help each other. For this forum, a group was created in Google, tool known as GoogleGroups. The group’s name is “ITC594” where all students are expect to participate helping each other, please visit
http://groups.google.com.au/group/itc594?hl=en.

Screenshot of the course’s Google Group.


2. What is meant by “convention over configuration” and how does it reduce coding?

Convention over Configuration (CoC) is considered for many experts the new and optimum way of developing web applications. And as mentioned in the previous workshop, there are a lot of things to consider developing web applications, and one of them is structuring things. It is well known that all these web applications have a lot in common, so many time is spend doing things over and over again.

Convention means that developing on Rails its only necessary to consider non-conventional features of the application due “it is built around a set of opinions about how to build web applications”. This leads to minimize the developers time reducing the configuration code and less repetition.


3. Further work on understanding MVC:
a. See the wiki at
http://wiki.rubyonrails.org/rails/pages/UnderstandingMVC
A message is displayed “This topic does not exist yet”.


b. Do the MVC tutorial at
http://wiki.squeak.org/squeak/1767

This is a good tutorial to understand from the origins of the MVC.
The Model View Controller was developed by Trygve Reenskaug in 1979, and important to mention that this was before the concept of design pattern. It is considered one of the most successful and earliest design approaches. The author emphasises that MVC was the pattern behind Smalltalk-80, which interface with overlapping windows was latter used by Macintosh and Windows.

The model have been so successful that is still used for developing new frameworks interfaces, for instance Java Swing and Ruby on Rails.

4. Got a spare hour or so? I recomended the UC Berkeley RD lab’s Ruby on Rails Short course at
http://youtube.com/watch?v=LADHwoN2LMM

This is a great video, worth so see it. Even if is quite long it will help you to understand Ruby on Rails pretty much from the beginning.

There are a lot of content and I will not going specifically through of them, because you have to see it.

The video starts with a simple and clear introduction about Webs applications, RPC protocol = HTTP, and how it works in a short “one slide resume”. He talks first about frameworks and its common structures, to start speaking about Ruby on Rails. After the general idea he gives some easy examples (“hello world”). Then he shows how Ruby on Rails works with an MVC approach and explains it well. Then with this content, he speaks about SQL and the design of tables using the mentioned approach with some examples (you can see similar examples executed later on this workshop or in the next one). Finally he closes the video emphasising Rail’s “convention over configuration” which we already explained in previous questions.

So if you have not much idea about Ruby on Rails, this video is an excellent way to start understanding Ruby and its environment.


5. Read the Flash article using ActionScript by Colin Moock tittled “The Model-View_Controler Design Pattern” at http://www.adobe.com/devnet/flash/articles/mv_controller.html

Once again the article’s main topic is MVC. Is a pretty good one do, and its going a bit deeper defining MVC. It explains the beginnings of MVC paradigm as in the question 3 article.


It well defines the three classes: Model, View, Control, as defined in workshop one. However, even we already read about same topic is always good have different approach and different examples to reach a better understanding.

Challenge problems - Workshop 2
In this part of the second workshop we will be using some Ruby on Rails applications to work in our project called “Online Taxi Booking System”. Where we will be using database design techniques and the MVC design approach.
The database has two tables: passenger_origin and passenger_destination, where into each of them, some fields have been created and defined to describe the table, like name, addresses, contact numbers, etc.
There are several steps we have to follow, and to make it clearer some screenshots will be pasted for easy understanding.

· The first step is to create the application, just typing >Rails (and the name of the application) in our case “taxi”, as shown in the following screen shot:
· Then we create the taxi sqlite3 database and migrate it, to check if the application is talking to the database.

· After that we need to create the scaffold for both passenger_origin and passenger_destination with all the data to describe our tables. Using the command to generate scaffold as shown in the screenshot:



· Finally, to create the table in the database we need to apply the migration file as follows:


· Now run the server and open your browser on http://localhost:3000/passenger_origins

You should see something like this:




· If you click on the link for a new passenger the following page shoul show up:



· Important to validate the data, this is for example, defining a value as a number or non blank space, so if in that field is required to entry a value, and is not entry, an error message should display:


· Once the information is entry properly and create this page is to be seen:



· Finally back to the main page to see the register created.







For the passenger destination the same steps are to be used.


So the application is done and working properly, and the best, it does not take much time, right?
So important to practice some new application or practice modifying the databases or any other function. The important think is understand the logic behind and learn to read the files that rails create. There are plenty of useful tutorials to go further for use Rails.

References:
Building web applications (n.d). Ruby Lessons podcasts. Retrieved March 20, 2009, from http://www.buildingwebapps.com/podcasts

Wikipedia. The free Encyclopaedia. Retrieved March 28, 2009 from http://en.wikipedia.org/





























WORKSHOP 1

LEARN RUBY AND RUBY ON RAILS

The first thing to do is understand the tool we are going to be using. Ruby on Rails is considered today as the hottest technology in web application development. A really good way to introduce you to this technology is visiting the web page: http://www.buildingwebapps.com/podcasts, in this page you will find a series of Audio Lessons and Screencasts that clearly explain what it is “Ruby” and “Rails” technologies. You also can subscribe yourself by writing your name and e- mail to receive periodically the podcasts that will introduce you to Ruby. (See picture bellow)

Screenshot: Subscribing for Ruby audio lessons



INSTALL RUBY AND RUBY ON RAILS

After an understanding what is Ruby and what it is for, the second step is installing Ruby and Rails in your computer as I’ll show you:

1. Get into the web page
http://rubyonrails.org/download and click on Windows Installer (if you are a Windows user) as shown in the figure. Then download and install the latest version clicking on the executable application.


2. Run the setup and follow Instructions until installation is finished as shown in pictures.




3. Once Ruby is Installed, download and Install RubyGems which install Rails and its dependencies through the command line. You can also find the latest version from http://rubyonrails.org/download.

4. Finally run “RubyGems Package Manager” from your program list and type in the command line “gem install rails” to install rails. (See screenshot bellow).



And that’s it, you Ruby on Rails is installed and ready to go.Any inquiry or problem installing the application just let us know and we’ll try to help you out.

INSTALLING INSTANT RAILS (For Windows)
For Windows users, you can also install directly "InstantRails". This package contains Ruby and Rails, so I personally recommend to install InstantRails rather than everything separately.Just follow this link, get the latest version, and better download it first to your computer.http://rubyforge.org/frs/?group_id=307


You can unzip the file direct on the previously created ruby folder on "C:".
Unzipping and installation it's going to take a while. The process took me about 10 minutes and 15 to my friend's, I thought the computer got stock but it's just matter of time, so, be patient.


To run InstantRails, go to the folder where you extract the files and find the executable file (an icon with a big "I"). Then you should see this screen.



INSTALLING LOCOMOTIVE (For OS X users)

How to install ruby on Mac OS X Leopard?

In Leopard and Leopard Server, Ruby and Rails are pre-installed along with a bounty of other useful RubyGems. This means we can hit the ground running when it comes to developing a Rails application and keep up the pace when deploying new releases of our application to Leopard Server.

Out of the box, you get Ruby version 1.8.6 and Rails version 1.2.6, the latest stable releases at the time Leopard shipped.
TRY SOME RUBY
Use mac terminal to try first simple ruby program " hello world"
find and open terminal, and try:
~ zc$ irb***
>> print "hello world\n"
Hello world
=>nil
use Math lab.

UPDATE NEWEST RUBY ON MAC X

Ruby in mac is buildin, however how can we get newest one?Just by using some simple command (you need connect to internet)in Terminal window:

sudo gem update --system
sudo gem install rails
sudo gem update rake
sudo gem update sqlite3-ruby
Now you can get newest ruby version!, and same time please install xcode or textmate.
Textmate is not free so, if pople don't like pay money and even take care about copyright please use Xcode 100% free download from apple web.
Install if as install normal software.


Challenge Problems - Workshop 1


1. Make a list of all programming languages and Web development tools used by you in prior experiences. Describe what you know about Web application frameworks

There are several programming languages at these days I started many years ago using PASCAL, later I learned C++ and Visual Basic, each time the languages are getting simpler and with more applications, but normally following the same programming logic “object-oriented”. Particularly the last one allows me to easily create XML files using some applications, where this information was shared on the net using Web Services. Furthermore Ruby is also an object-oriented programming language but relatively newer, Ruby is has been getting even more popular due to “Ruby on Rails” or just Rails which is a web application framework that using a fast methodology has reduce considerably the time developers spend developing websites or Web applications.


2. Ruby is “an interpreted scripting language” for quick and easy object-oriented programming”. Find out about the Ruby language and discover what this means.

Ruby was designed by Yukishiro Matsumoto on 1990, it is considered as “the hottest technology for web applications” (Slater, M.). Inspired on Pearl and Python, Ruby is defined as an object-oriented language, because like any other object-oriented language an object encapsulate some data and the actions to be taken on these data, then your program is build based on this “capsules”. Ruby it is also an interpreted scripting language due is interpreted dynamically when the program is been executed, hence, not compilation required.


3. What is Rails and how does it work with Ruby?

As it was mentioned on question 1, Rails is a web application framework based on Ruby programming language. Slater (n.d.) well explained in the first podcast of Ruby on Rails saying that “an application framework such as Rails provides a structure for your code and includes a variety of powerful code modules that make many programming tasks simpler”. To organize application programming, Rails uses the MVC architecture just like many web framework, but providing metaprograming methods to build databases applications, Rails can automatically construct models and views for a simple website utilizing common tools included in the Rails framework.


4. What is meant by “convention over configuration” in regards to the use of Rails in Web application development?

So far so good, Ruby on Rails is been showing to be an excellent new way to develop web applications. However the best of Rails that I personally reckon, is that emphasise Convention over Configuration (CoC). There are a lot of things to consider developing web applications and, and one of them is structuring things. It is well known that all these web applications have a lot in common, so, many time is spend doing things over and over again.

Convention means that developing on Rails its only necessary to consider non-conventional features of the application due “it is built around a set of opinions about how to build web applications”. This leads to minimize the developers time reducing the configuration code and less repetition.


5. When did Model-View-Controller begin and where is it used?

An MVC begins when a web framework is used. In our case, for instance MVC is started when we use Ruby on Rails to develop and organize web application programming.

MVC uses its architectural pattern Model-Controller-View. Where “the Model represents the information of the application; the View corresponds to elements of the user interface such as text, checkbox items, and so forth; and the Controller manages the communication of data and the business rules used to manipulate the data to and from the model” Wikipedia (n.d)


6. Describe the steps involved with the MVC design Approach.

The way that MVC works is pretty simple. Basically there are an interface where the user is able to interact with (write a query or press a mouse button) → the controller gets the action from the user → the model controller sends to the model the event occurred on the interface → View uses the model and create an new corresponding user interface →Finally everything backs to status quo waiting for the next interaction to resume with the cycle.

The following diagram shows the relationship between Model, View and Controller. Where solid lines means direct associations, while dashed lines shows indirect associations

References:

Building web applications (n.d). Ruby Lessons podcasts. Retrieved March 20, 2009, from http://www.buildingwebapps.com/podcasts

Wikipedia. The free Encyclopaedia. Retrieved March 28, 2009 from http://en.wikipedia.org/