11 Apr 2009

To Do List....

To do:

1. Set up the MySQL tools on your computer as described in section-6 above.


Answer:



Diagram-43 - The MySQL tools are installed into my homePC.
The above diagram shows that the MySQL tools are installed and setup into my homePC.

2. Rails will setup a new application directory for each of your Web application projects. Get InstantRails (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).

Answer:

The following diagram-44 shows that I have created the other Rails Application, namely, taxisys in the Instant Rails 2.0 and have started the application with Mongrel.

Diagram-44 - New Application Taxisys in Instant Rails 2.0


3. 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

Answer:

I have configured database access. The database.yml file is shown below...
database.yml -->
development:
adapter: mysql

database: taxisys_development
username: root
password:
host: localhost

test:

adapter: mysql

database: taxisys_test
username: root
password:
host: localhost
production:
adapter: mysql

database: taxisys_production

username: root
password:
host: localhost

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

Answer:

The Passenger model & table are created. Please have the Diagram-45 to prove the successful implementation.

Diagram-45 - the related table and model are created

5. 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/ 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

Answer:

I have read the online tutorials on the given addresses already.


10 Apr 2009

To Do List....

To Do:

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/

Answer:

I have already studied the Ruby Tutorial from the mentioned URL.

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

Answer:

The if-elseif-else example of ruby is listed below...
temperature=30
if temperature <=15
puts "It is very cold"
elsif temperature>15 && temperature<=25
puts "it is warm"
else
put "it is hot"
end

The if-elseif-else example of Javascript is listed below...
var temperature=30;
if (temperature<=15)
{ document.write("It is very cold"); }
else if (temperature>15 && temperature<=25)
{ document.write("It is warm"); }
else
{ document.write("It is hot"); }

With the above 2 examples, the syntax difference between Ruby and Javascript is explained here...
  • In Ruby, we use "if condition". However, in Javascript, we use "if (condition)". The difference is the "( )"
  • The else-if statement in Ruby is performed by reserved words "elsif", but Javascript use "else if".
  • Similarly, "elsif condition" in ruby is different with "else if (condition)" in Javascript. The difference is the "( )"
  • Ruby needs "end" to complete the if-elsif-else logic, yet Javascript does not need "end" because Javascript executes statements as block "{ }"
  • In Javascript, if the condition is true, the statement(s) inside "{ }" will be executed. The logic flow is that Javascript first checks the if-clause to see whether the condition is true and then it checks the else-if-clause. If the if-clause and else-if-clause' conditions are false, then Javascript will run else' statement(s) inside "{ }". In Ruby, if-elseif-else logic flow is that Ruby first checks the if-clause to verify whether the condition is true. If true, Ruby executes the statement(s) after the if-clause. The execution stops until reaching the elsif or else clauses and jumps to "end" statement. If the first if-clause's condition is false, then Ruby jumps to execute elsif's statements until reaching else......
These are the syntax difference between Ruby and Javascript.

3. While Ruby and Python are quite similar, can you find some similarities between Ruby and Javascript?

Answer:

Both languages are highly dynamic, allowing you to change objects and methods at runtime. Both languages are very object-oriented with different approaches. Ruby and JavaScript are both dynamically typed and often employ what is known in the Ruby world as duck typing instead of checking for certain types. Variables in JavaScript, like Ruby, hold data. In the case of basic types, they hold the value of the type itself, but in the case of objects it holds a reference to the object itself. This is similar to Ruby’s notion of references and immediate values with the only difference that the latter group are not real objects in JavaScript. JavaScript, like Ruby, is heavily object-oriented, and objects are used everywhere. In JavaScript and Ruby, the only construct which provides scope is the function. In Ruby, classes are “open” and you can extend any class with new methods. This is also the case for JavaScript. (Darell, 2009)

Reference:
Font size
1. Darell Tore (2009). "JavaScript Eye For Ruby Guy". Sneaky Abstractions, Retrieved from URL - http://tore.darell.no/pages/javascript_eye_for_the_ruby_guy

Understanding Scaffold....

Answer:

What is scaffold?
Scaffold is a way to quickly put an Active Record class online by providing a series of standardized actions for (CRUD) Creating, Reading/showing, Updating, and Destroying objects of the class. It is useful for quick prototyping. These standardized actions come with both controller logic and default templates that through introspection already know which fields to display and which input types to use. (Shin, 2009)

Now, I will use scaffold to generate Passenger ActionView, ActionController and ActiveModel. The steps are list as follow...

1. run "rails taxisys" to create another project. The Diagram-43 shows the result as follow.

Diagram-43 - taxisys taxi system

2. After that, taxisys is started at tcp port 5000 and the related screen dump is shown in Diagram-44.

Diagram-44 - taxtsys starts at tcp port 5000 with Mongrel (Instant Rails 2.0)

3. In order to make use of scaffold in ROR, the command "ruby script/generate scaffold Passenger name:string job_id:string contact_number:string suburb_origin:string street:string street_number:string building:string suburb_destination:string passenger_number:string taxi_type:string date:string time_required:string" is run and the diagram-45 shows that the Passenger Active Record (Model - app/models/passenger.rb), Action Controller (Controller - app/controllers/passengers_controller.rb) and Action View (View - app/views/passengers/*.html.erb) are generated.

Diagram-45 - Scaffold

4. After scaffold generates the Model, View and Controller for us, we can focus on the taxisys\db\migrate\001_create_passengers.rb file. This file contains the definition of the Passengers Class and its attribute. This file is used to create passenger table in mysql. The Diagram-46 shows the contents of the MVC files and the 001_create_passengers.rb file.

Diagram-46 - The contents of the files that scaffold generates

5. Before creating the table in mysql, we need to configure the config/database.yml and create taxisys database in mysql. The Diagram-47 shows that the content of database.yml file after configuration. The listing below shows the content of the database.yml file.

The content of the database.yml:
development:
adapter: mysql

database: taxisys_development
username: root
password:
host: localhost
test:
adapter: mysql
database: taxisys_test
username: root
password:
host:
localhost
production:
adapter: mysql
database: taxisys_production
username: root
password:
host: localhost


Diagram-47 - the taxisys_test, taxisys_development and taxisys_production are created

6. run "set RAILS_ENV=development" command first and then run "rake db:migrate" command to create passengers table in taxisys_development database. The Diagram-48 shows the commands' screen dump. In the screen dump, passengers table is shown and create by "rake".

Diagram-48 - the rake command output

7. After All, scaffold is finished. We can open IE browser with url - http://localhost:5000/passengers to interact with the Action View. We can list the record in passengers table. We can update (edit) specific record of the table. We can drop the table. And also we can create a new record in the table. The Diagram-49 shows the Action View in IE browser.








Diagram-49 - Action View

It is the scaffold in ROR and it helps to build application very fast.

Reference:

1. Shin Sang (2009). "EMPOWER:YOU". Sun Tech Days 2008-2009, Retrieved from URL - http://www.suntechdays2008.com/down/1015/track1_java/T1S6_jrubyrails_sangshin.pdf


9 Apr 2009

Q2. Apply the MVC design approach to our Project: Online Taxi Booking System.

HINT: Begin with a single model, single view and single controller classes. This will give you a head start to the next workshop: Online Taxi Booking System: SQL and Database design

Answer:

Now, I will create a single model, view and controller classes in my home PC. The Diagram-36 shows the Taxi project starts after issuing "rails taxi" command.

Diagram-36 - Taxi project

The Taxi project is created. The I run "ruby script/server" to make the Taxi Project available on the web at tcp port 3000. The Diagram-37 shows the result of running "ruby script/server" command.


Diagram-37 - Taxi Project starts at tcp port 3000

Next, I run "ruby script/generate model Taxi" to generate Taxi Active Record. The Diagram-38 shows the result of running the ruby command. You can find that the taxi.rb file is created. The next Diagram-39 show Taxi class and the related attributes of Taxi class are defined in taxi.rb file.


Diagram-38 - taxi.rb is created (single model)


Diagram-39 - Taxi class is defined in taxi.rb file

In Taxi class, taxinum and taxidrv attributes are defined. They represents taxi number and taxi driver name respectively.

After the single Taxi model (active record) is created, I issue "ruby script/generate controller Taxi" command to create Taxi controller methods in taxi_controller.rb file. The Diagram-40 and Diagram-41 show the taxi_controller.rb is created and the controller methods in taxi_controller.rb file respectively.

Diagram-40 - taxi_controller.rb is created

Diagram-41 - The Taxi controller methods in taxi_controller.rb file

Finally, we can simply use text editor, namely, edit.exe in MS-DOS, to create a view file located in app\views\taxi subdirectory, for example, list method defined in active controller. The diagram-42 shows the view of list method and in fact the list method is displayed as list.rhtml or list.html.erb file (html with embedded Ruby code).

Diagram-42 - list.html.erb (View in MVC approach)

I have applied the MVC design approach to create a single view, controller and model successfully.

Q1. How is Rails structured to follow the MVC pattern?

Challenge Problems:
Q1. How is Rails structured to follow the MVC pattern?

Consider our project and examine the directories where Rails is located. If the data model is called Taxi (it is convention to name the model beginning with an upper case letter).
The Model is a Ruby class located in app/models/taxi.rb
The SQL table is taxis – the pluralisation of the model. In our project we have 2 tables as passenger_origin and passenger_destination, where the table row = an object instance and each of the columns = an object attribute.
The Controller methods live in app/controllers/taxi_controller.rb
Each controller can access templates to display the input screen and methods for action.
The Views are kept is app/views/taxi/*.rhtml, where each *.rhtml maps to a controller method.
In Rails, the view is rendered using RHTML or RXML. According to the wiki page at http://wiki.rubyonrails.org/rails/pages/UnderstandingViews, RHTML is HTML with embedded Ruby code and RXML is Ruby-generated XML code.

Answer:

1. After decompressing Instant Rails 2.0 in hard drive C:\, we can go to the command line and run "rails taxi". At that moment, the taxi project is built and the related directories are created under c:\InstantRails-2.0-win\rails_apps\taxi\. The Diagram-33 is shown below to describe the directories structure of the taxi project.

Diagram-33 - The directories structure of the taxi project

Actually, all projects are placed under c:\InstantRails-2.0-win\rails_apps\. In c:\InstantRails-2.0-win\rails_apps\taxi directory, there is app subdirectory containing controllers, models, views and helper sub-subdirectories. The directories exactly match the MVC pattern. The Controller sub-subdirectory has the files that define controllers method. The Models sub-subdirectory has the files that are the ruby classes. The Views sub-subdirectory has the rhtml files to match the controller methods and display to users.

2. Next, we changes directory to taxi and then we can run "ruby script/server" to start the taxi porject into web. The taxi system would be run at the tcp port 3000
by default. The default tcp port can be changed. Here I change it to 4000. The diagram-34 shows the taxi project start at 4000 port.


Diagram-34 - Taxi Project starts at tcp 4000 port

3. After that, we can create the database in mysql. In our taxi system, we can create 3 environments. They are developement, test and production. In mysql command prompt, run "create database taxi_development;", "create database taxi_test;" and "create database taxi_production;". We will use taxi_development database to develop our taxi project.

4. In order to make ruby applications successfully connect to mysql, we need to modify database.yml under
c:\InstantRails-2.0-win\rails_apps\taxi\config. The following is the content of database.yml...
development:
adapter: mysql

database: taxi_development

username: root

password:
host: localhost

test:
adapter: mysql
database: taxi_test
username: root

password:
host: localhost
production:
adapter: mysql
database: taxi_production

username: root
password:

host: localhost

5. Next, we can run "ruby script/generate model Taxi". This command generates the taxi ruby class. There is a taxi.rb file containing this class. This class is the Model of MVC approach and so-called ActiveRecord. The diagram-35 show the app/models directory contains taxi.rb.

Diagram-35 - app/models directory and taxi.rb file contains the taxi class

6. Besides, we can also run "ruby script/generate controller Taxi". This command generates controller methods. There is a taxi_controller.rb file containing the controller methods. The controller methods are also called ActiveController. The Diagram-36 shows the app/controllers directory and the taxi_controller.rb file.


Diagram-36 - the app/controllers directory and the taxi_controller.rb

7. Finally, we can create rhtml file in app/views directory.

Ruby on Rails follows MVC pattern.










8 Apr 2009

Focus Group

Dear All,

This is for WorkShop 2... In this focus group, I would like to share the installation of Instant Rails 2.0. It spends me 3-4 days to try, play and test. Now, it works.. The problem I have encountered is ...

1. rake db:migrate unable to generate database.
Solution:
It should be the mysql connectivity problem. I feel very painful to solve this problem. The problem is that after setting password for root account, rake then cannot create database through database.yml file. I have searched the web for 3 days for the solution. Someone says that using mysqld --skip-grant-tables starts the mysql deamon. However, this solution causes another issue which make grant sql not work. Finally, I try & try and find that the real solution is that
a. create another account with root privileges
b. use the other account in database.yml. Then, rake works.

2. When editing View, the start_form_tag does not exist anymore. Please use for the replacement.

I will put this information in my blog. Please feel free to discuss. Now, I am going in for ROR IDE.

Thanks,
Joseph

Q6. Describe the steps involved with the MVC design approach

Answer:

TutorialsPoint (2009)
describes that the Model View Controller principle divides the work of an application into three separate but closely cooperative subsystems.
Model (ActiveRecord ) :
Maintains the relationship between Object and Database and handles validation, association, transactions, and more. This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.
View ( ActionView ):
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology. This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.
Controller ( ActionController ):
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data (searching, sorting, massaging it) into a form that fits the needs of a given view. This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).

The Digram-30 shows the MVC framework as follow...

Diagram-30 - MVC framework downloaded from TutorialsPoint

The other diagram-31 shows the steps in involved with MVC design approach.


Diagram-31 - Step in MVC downloaded from http://www.javapassion.com/rubyonrails/rails_overview_1hour_techday.pdf and http://www.meshplex.org/wiki/Ruby/Ruby_on_Rails_programming_tutorials

The steps are listed below...
  1. A user interacts the ROR Web Pages, for example, submitting a set of form data.
  2. WebServer Dispatcher receives the incoming request (form data)
  3. The Active Controller (Controller) referring the xxx_controller.rb files communicates with Active Record and Active View. The Active Controller also organize the data at this stage
  4. Active Record (Model) sends data from or to the backend database and then commicates back to Active Controller
  5. Active View (View) show the presentation and communicates with Active Controller. Interface shows the related rhtml or rxml and interacts with the user

Diagram-32 - flow-chat showing the steps of MVC approach from CSU notes (Source: eNode Inc, 2002 - http://www.enode.com/x/markup/tutorial/mvc.html)


Reference:

1. TutorialsPoint (2009). "Ruby on Rails MVC Framework". Tutorials Point - A Self Learning Centre, Retrieved from URL - http://www.tutorialspoint.com/ruby-on-rails/rails-framework.htm


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

Answer:

Wikipedia (2009) states that
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.

There have been several derivatives of MVC; one of the most known (due to its use by Microsoft) is the Model View Presenter pattern which appeared in the early 1990s and was designed to be an evolution of MVC. However Model–View–Controller still remains very widely used.

In November 2002 the W3C voted to make MVC structures part of their XForms architecture for all future web applications. These specifications will now be integrated directly into the XHTML 2.0 specifications. There are now over 20 vendors that support XForms frameworks with MVC integrated into the application stack.

Reference:

1. Wikipedia (2009). "Model-view-controller". Wikipedia The Free Encyclopedia, Retrieved from URL - http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller




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

Answer:

Convention over configuration means an end to verbose XML configuration files--there aren't any in Rails! Instead of configuration files, a Rails application uses a few simple programming conventions that allow it to figure out everything through reflection and discovery. Your application code and your running database already contain everything that Rails needs to know! (Hibbs, 2005)

Convention over configuration: Most web development frameworks for .NET or Java force you to write pages of configuration code. If you follow suggested naming conventions, Rails doesn't need much configuration. (TutorialsPoint, 2009)

Reference:

1. Hibbs Curt (2005). "Rolling with Ruby on Rails". O'Reilly ONLamp.com, Retrieved Mar-28th-2009 from URL - http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
2. TutorialsPoint (2009). "Ruby on Rails Introduction". Tutorials Point - A Self Learning Centre, Retrieved from URL - http://www.tutorialspoint.com/ruby-on-rails/rails-introduction.htm



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

Answer:

What is Rails?
Rails in its simplest terms can be defined as the framework which provides a variety of programs which perform most of the application segment for us. This makes our task of programming much simpler and easier. Not only this, we can always have the flexibility of reusing this framework any number of times as we only need to install it once. Then we can implement it on any number of applications that we develop.
Since Rails is a framework, it also follows the same pattern as any other programming framework. These frameworks when implemented ease up the task of the programmer as it reduces a large amount of code writing. The programmer only needs to specify code which provides the instructions or the guidelines to the framework as to what has to be done. This means that if we are implementing any type of framework in our application we are saving a lot of coding time and also making our application more efficient by reusing the already installed framework.
This framework is also designed so that the entire application is segregated in three different layers, namely, Model, View & Controller (MVC). By implementing the MVC design at the time of developing our applications, we can have our application segemented into three logical sections. (Meshplex, 2009)

TutorialsPoint (2009) points out that Rails is
  1. An extremely productive web-application framework.
  2. Written in Ruby by David Heinemeier Hansson.
  3. We could develop a web application at least ten times faster with Rails than you could with a typical Java framework.
  4. An open source Ruby framework for developing database-backed web applications.
  5. Our code and database schema are the configuration!
  6. No compilation phase required.
How does it work with Ruby?
TutorialsPoint (2009) also points out that Rails is a Full Stack Framework which ...
  1. Includes everything needed to create a database-driven web application using the Model-View-Controller pattern.
  2. Being a full-stack framework means that all layers are built to work seamlessly together Less Code.
  3. Requires fewer total lines of code than other frameworks spend setting up their XML configuration files.
Hibbs (2005) states that Rails works with Ruby in the following way...
Many things that are very simple to do in Ruby are not even possible in most other languages. Rails takes full advantage of this. The rest of the answer is in two of Rail's guiding principles: less software and convention over configuration.

Thereby, it is concluded that Rails works with Ruby with MVC approach and with two base theories, namely, less software/code and convention over configuration.

Reference:

1. Meshplex (2009). "Ruby/Ruby on Rails programming tutorials". Meshplex The Tutorial Database, Retrieved from URL - http://www.meshplex.org/wiki/Ruby/Ruby_on_Rails_programming_tutorials
2. TutorialsPoint (2009). "Ruby on Rails Introduction". Tutorials Point - A Self Learning Centre, Retrieved from URL - http://www.tutorialspoint.com/ruby-on-rails/rails-introduction.htm
3. Hibbs Curt (2005). "Rolling with Ruby on Rails". O'Reilly ONLamp.com, Retrieved Mar-28th-2009 from URL - http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html






7 Apr 2009

Q2. Ruby is "an interpreted scripting language" for quick and easy object-oriented programming...

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

Answer:

Interpreted scripting language is a program whose instructions are actually a logically sequenced series of operating system commands, handled one at a time by a command interpreter . In turn, the command interpreter requests services from the operating system. The writer of the interpreted program need not be concerned by low-level storage management considerations. On the other hand, an interpreted program cannot be as efficient as a compiled program, which has been processed by a language compiler. A language compiler converts source statements into something close to the strings of 0's and 1's that a processor ultimately is given to work on. Because this work (0's & 1's conversion) is already done before a compiled program is run, the compiled program runs much more quickly. (Whatis.com, 2005)

Put simply, complied program like C/C++ is faster than interpreted program like Perl. However, the interpreted scripting language compensates for this drawback. For instance, the interpreted scripting language can run in multi-platforms as interpretation happens at runtime.

One of the interpreted scripting languages namely Ruby is rapidly gaining popularity in the US after a long period of incubation in its native Japan. Ruby is the language, in recent tradition of Perl, Python & Tcl. It allows for a rapid development cycle and the rapid prototyping of applications.
It is also a general purpose language. Its flexible syntax makes it easy to write a quick three-line script to do a one-time task. However, Ruby is also powerful to write large applications as well as C++ or Java.
Ruby is a radically object-oriented language. The OOP features of Ruby surpass those of Java and C++, approaching Smalltalk in flexibility. Primitive types in Ruby are true objects. Besides, Ruby allows singleton methods which is useful in GUI programming. Next, Ruby has open classes in the sense that one program can add to the existing classes at will, making new methods available even to previously-instantiated objects. Code itself can be objectified as a code block wrapped in an object. Finally, Many of the well-known OO design patterns have already been implemented as Ruby libraries.
Rub y us a Very High-Level Language. It has a rich set of built-in classes and methods allowing the manipulation of arrays, strings, hashes, files and other objects. (Fulton, 2002)

Hibbs (2005) also describes that Ruby is a pure object-oriented programming language with a super clean syntax that makes programming elegant and fun. Ruby successfully combines Smalltalk's conceptual elegance, Python's ease of use and learning, and Perl's pragmatism. Ruby originated in Japan in the early 1990s, and has started to become popular worldwide in the past few years as more English language books and documentation have become available.

I am a Beginner of Ruby. After using Ruby, it is very different with PHP. It can generate codes easily so that the web application can be built in a quick and easy way. This is my first sight for Ruby. After digging deeper, I find that it generate codes easily because it is OO reusability feature. Many classes and methods are ready to use after installation of Ruby. It is exactly the same as what Fulton states. Finally, as it is the interpreted programming language, it support multi-platforms.

Reference:

1. Whatis.com (2005). "What is interpreted?". WhatIs.com, Retrieved Mar-28th-2009 from URL - http://whatis.techtarget.com/definition/0,,sid9_gci212373,00.html
2. Fulton Hal (2002). "InformIT: What is Ruby? > What is Ruby?". informIT.com, Retrieved Mar-28th-2009 from URL - http://www.informit.com/articles/article.aspx?p=27359
3. Hibbs Curt (2005). "Rolling with Ruby on Rails". O'Reilly ONLamp.com, Retrieved Mar-28th-2009 from URL - http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html







Q1. Make a list of all programming languages and web development tools used by you in prior experiences...

Challenge Problems:

Q1. 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.

Answer:

From my experiences, I am familiar with the following programming languages...
  1. GW-Basic
  2. Pascal
  3. C/C++
  4. SQL
  5. Visual C
  6. Java
  7. PHP
  8. JSP
  9. Javascript
For Web Development Tools, I have learned...
  1. JavaBean
  2. NetBean
  3. Visual Studio
  4. JBuilder
  5. phpDesigner
  6. PDT php development tool
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 used in web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and often promote code resue. (Wikipedia, 2009)

In my opinion, I feel that Web Application Framework is the tool to help developers to generate frequently-used codes especially for database access in web development. After the codes are generated, the developers only need to modify the skeleton, for instance, in ROR environment, Model and Controller are generated to connect database and then the developers focus on how the related web pages are displayed or presented in View.

Reference:

1. Wikipedia (2009). "Web Application Framework". Wikipedia The Free Encyclopedia, Retrieved Mar-28th-2009 from URL - http://en.wikipedia.org/wiki/Web_application_framework