• Install Ruby on Rails on your computer (InstantRails or Locomotive);
• Learn about the Model View Controller (MVC) approach to Web application design;
• Revise database techniques with MySQL
• Learn how to use the Ruby on Rails development environment
• Set up a focus group (like a study group for peer learning) to work on the Ruby on Rails workshops via Interact tools
To do:
1. Download iTunes from http://www.apple.com/itunes/download/ and subscribe to the “Leraning Rails” Podcasts from http://www.buildingwebapps.com/podcasts
iTunes is already on my laptop. Having visited the “Leraning Rails” Podcasts from http://www.buildingwebapps.com/podcasts, it provides me with basic understandings on what is Ruby-on-Rails and why it is so popular and powerful tools to develop web sites for e-business. The best of all is I can listen to the tutorial and read the subject materials at the same time :D
2. Install Ruby on Rails on your computer by using the material and downloads from http://www.rubyonrails.org/
Ruby is download from http://www.rubyonrails.org/ and installed on my laptop.
3. Rather than get Ruby on Rails running manually, you use the pre-packaged solutions. These include everything in one bundle: Web server, database, Ruby, Rails, the works.
a. For OS X, there's Locomotive.
b. For Windows, there's Instant Rails.
Update the Ruby Gems using command "gem update --system" and install the Rails using the command "gem install rails --remote" and created a test application by issuing the command "rails Taxi"
Challenge Problems:
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 before we begin.
Frankly speaking, I am not studied to be a web programmer. However, I still come across several Web development tools and programming languages in my career.
Programming languages:
Basic
Pascal
C++
Visual Basic
JavaScript
HTML
ASP
Web development tools:
Macromedia Dreamweaver
Adobe Flash
Web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For examples, many frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse.
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 is known as an Object-Oriented language and everything in Ruby is some kind of object. An object is something that packages together simple or complex pieces of data along with any behaviors for working with that information. A number object holds numerical value data and includes behaviors such as addition, subtraction and equality testing.
Besides the built in Objects of Ruby, we can define our own objects that represent pretty much anything we can imagine. To do this, we create a Class. Classes are special objects that act as blueprints for Ruby to use when we request that it construct our objects in memory. Ruby classes are organized in something like family tree. We can define classes that inherit attributes or behavior from other classes. We enjoy its benefits without needing to know how it works by starting with a rich set of methods for finding and accessing information, which they inherit from an Active Record class. This is why “Ruby is an interpreted scripting language for quick and easy object-oriented programming”.
3. What is Rails and how does it work with Ruby?
Ruby is a general-purpose programming language that is not in any way specific to web applications. It can be used without Rails for standalone application programs, scripting server administration tasks, and even for web applications that do not use Rails.
Rail is a framework for building web application with Ruby, written in Ruby. An application framework which provides a structure for your code and includes a variety of powerful code modules that make many programming tasks simpler. Ruby is a set of tracks to make development of Ruby go faster.
4. What is meant by “convention over configuration” in regards to the use of Rails in Web application development?
Convention over configuration means a developer only needs to specify unconventional aspects of the application while vast amounts of configuration code are entirely eliminated. The time for making decision to structure things which is common across most web applications are saved because the built-in plumbing that makes a set of assumptions about how everything is named and organized.
5. When did Model-View-Controller begin and where is it used?
Model-View-Controller (MVC) was first described in 1979 by Trygve Reenskaug, then working on Smalltalk at Xerox PARC. The original implementation is described in depth in the influential paper “Applications Programming in Smalltalk-80: How to use Model-View-Controller”.
6. Describe the steps involved with the MVC design approach.
The MVC approach should start at the very beginning stage of the application development process. Otherwise, applications containing a mixture of data access code, business logic, and presentation code. Such applications are difficult to maintain because interdependencies between all of the components cause strong ripple effects whenever a change is made anywhere. High coupling makes classes difficult or impossible to reuse because they depend on so many other classes. Adding new data views often requires re-implementing or cutting and pasting business logic code, which then requires maintenance in multiple places. The MVC design pattern solves these problems by decoupling data access, business logic, data presentation and user interaction.
The MVC for Ruby-on-Rails includes tools such as scaffolding that can automatically construct some of the models and views needed for a basic website. The programmer may write a specification that describes how the application database may be used. The compiler uses this specification to generate code that the application can use to Create, Read, Update and Delete (CRUD) database entries.
For Java platform, the Model is a collection of Java classes that form a software application intended to store. The View is represented by a JavaServer Page, with data being transported to the page in the HttpServletRequest or HttpSession. While the Controller servlet communicates with the front end of the model and loads the HttpServletRequest or HttpSession with appropriate data before forwarding the HttpServletRequest and response to the JSP using a RequestDispatcher.
Reference
Wikipedia. (2010). Web application framework. Retrieved 30 Mar, 2010, from http://en.wikipedia.org/wiki/Web_application_framework
Learning Rails. (2010). Anatomy of a Web Application. Retrieved 30 Mar, 2010, from http://www.buildingwebapps.com/podcasts/79327-anatomy-of-a-web-application/24794-transcript
Learning Rails. (2010). Why You Should Learn Ruby on Rails. Retrieved 30 Mar, 2010, from http://www.buildingwebapps.com/podcasts/79326-why-you-should-learn-ruby-on/24794-transcript
Wikipedia. (2010). Ruby on Rails. Retrieved 30 Mar, 2010, from http://en.wikipedia.org/wiki/Ruby_on_Rails
Wikipedia. (2010). Scaffold (programming). Retrieved 30 Mar, 2010, from http://en.wikipedia.org/wiki/Scaffold_(programming)
Oracle Sun Developer Network. (2010). Design Patterns: Model-View_controller. Retrieved 31 Mar, 2010, from http://java.sun.com/blueprints/patterns/MVC.html
No comments:
Post a Comment