Saturday, October 25, 2008

Online Taxi Booking System - Design Report

Problem Domain

* Define the problem

Capture a booking for a taxi via the company web site and validate it's a valid booking, send a confirmation to the user regarding the booking ideally via SMS if mobile number is provided requesting user to reply to confirm the validity of the booking. Where no mobile number is provided human interaction will be required to follow up with the user as the final confirmation step. At the same time the steps required to make an online booking should not be complicated but simple and easy for anyone to use.

* Business needs of,

The organisation - Provide efficient service to customers, reduce data entry labour required in capturing bookings into the system and processing them. Introduce new automated services which will not increase overheads for the organisation but add value to the customers such as enquiry facilities, printing receipts, obtaining an quote for a booking.

End-user(s) - Ease of use with minimal data entry, steps required to making and confirming a booking, variety of services offered such as indicative price for the trip, any additional surcharges that may be applicable, payment methods available, reminder service of the taxi arrival time.

* Scope to designing a solution

The prototype developed will concentrate on a home page, making a booking, mandatory field validation, view available fleet functionality and a contact us form for the public accessible web site.

The admin interface of the web site which will perform adding new fleet information, confirming new bookings and viewing the newly recieved bookings, cancellations, replying to enquiries is not implemented on this assignment.

* Design methodology

MVC - Due to the distributed nature of web applications use of model-view-controller design pattern is desirable. This will allow for easier system development and maintenance, isolating business logic, presentation functionality and also will allow specialised skills to be utilised in developing these aspects.
There are models for each of the entities of the system, bookings, taxis & contact us enquiries. They perform the mapping of data with the objects and database. The enforcing of business logic validation. A controller is set up for each function booking, taxi and contact us which performs the functions of adding a new booking, updating or showing a list of available bookings.

Agile methods - Design and development through iterative approaches, involvement of user throughout the development process. Due to the nature of the rails framework each requirement will be modeled and discussed with the user before progressing to the next function.

Business Systems Design Issues

* Ruby on Rails as the development framework

It's quick, suited for web sites with dynamic content generated from databases. However since it's a new technology available support may be limited and experienced technical staff may be limited. Another aspect is the level of recent release of RoR and the availability of supporting gems which would help efficient development of the project and help implement important functionality such as secure user authentication, sms facilities etc.

A very good user authentication ruby gem which is known as restful authentication is unavailable in rails 2.0. This ruby gem would have helped in implementing the admin web interface of the taxi booking system.

Server Design Issues

* Server systems

Mongrel - web server provided with rubyonrails, suited for development environment.
SQLite 3 - will be used as the development database.

apache - web server would be used as the production web server for this application.
mySQL - will be used as the production database.

* Database design

A relational database design will be suited for this application.
The implemented model uses a bookings table, taxis table & a comments table.
As part of the admin functionality once a booking has been confirmed it will be required to update the bookings table with the new status.

Project Management Techniques

* Time, cost, quality and risk management

Development time is significantly shortened due to the nature of rails framework and it's supporting gems. Cost is lower due to utilising open source components in this project. Integrated testing functionality of the framework, adhering to standards established from the open source communities would definitely help increase quality of this project. However rails being relatively new technology availability experienced people, availability of compatible supporting ruby gems, other software modules & the nature of new rails releases pose a significant risk.

Pilot Study - Implemented Project

Home page




Booking page




View taxis page





Contact us page


Friday, September 12, 2008

Ruby on rails - Project progress

Online Taxi Booking System

Environment
  • System - Dell Inspiron I1720, Intel Core 2 duo 2.00 GHz, 2GB RAM
  • Windows - Vista Home Premium

Software for this project
  • Ruby on rails - Instant Rails 2.0
  • Database - SQLite 3
  • Editor - Textpad

Progress

1 - Start Instant rails application, just run the executable.
Image of instantrails.exe


2) From the rails application window, open a rails console window



3) Run the rails command to create a new application. Created a new application called taxibooking.
  • rails taxibooking



4) Windows representation of the directory structure created



5) Start the application using the default instant rails web server, Mongrel to see
things are working up to this point



6) Type taxibooking application web address,
  • http://localhost:3000/


6.1) The server can be stopped at this stage or once more work as been completed
it can be restarted.


7) Navigate to DB folder within the application, define the database name parameters
for SQLite3, this is only required if you want to change the default name provided by
SQLite3.



8) Run the ruby generate migration command to generate the database migration.
This will create a ruby file in directory migrate.
  • ruby script/generate migration AddPassengersTable



9) Edit the migration file and define the passengers table structure.
(I have defined the table structure as per workshop 3 for ITC382 subject)



10) Run command to generate the table
  • rake db:migrate


10.1) Enter data to the table via SQLite3,



11) Run command to generate controller
  • ruby script/generate controller Passengers



12) Create an index.html file to be displayed when the passengers action is requested




13) Started Mongrel server again. If the server was not stopped earlier, stop and start is required at this point.


14) Type taxibooking application web address
  • http://localhost:3000/passengers


Success! list of bookings in the database is shown

Friday, September 5, 2008

Reference List

Monson-Haefel, Richard, 2006, Ruby on Rails on Oracle: A Simple Tutorial,
Viewed September 5, 2008,
http://www.oracle.com/technology/pub/articles/haefel-oracle-ruby.html


Tate, A. Hibbs, C. 2006, Ruby on Rails hands on: What's so hot about Rails?,
Computerworld,
Ruby on Rails: Up and Running,
Viewed September 5, 2008,
www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9002857

www.rubyonrails.org

www.activepython.com

Saturday, August 23, 2008

Exercise 2

Started working with exercise 2 and there is an error relating to the encoding.





Could not figure out how to correct this.






Swithced backto PythonWin, tried the commands in the interactive mode, found out the (") was not entered correctly.



Corrected errors and ran the script file, below out put produced.


XML Workshop 1

Created the required xml file and python script.

Executing the script produces the below out put.




Setting up Python for Windows


Previously I had done python coding and executing scripts on a Unix environment for the CSU assignments. Therefore I wanted to use and familiarize my self with an IDE for Windows.

Had a bit of trouble finding out from where an IDE could be downloaded. Found someone else had asked the same question in a web forum post, and the answer pointed to http://www.activestate.com/main

From there onwards download and install was a breeze.

PythonWin in action above . . .

Sunday, August 17, 2008

AJAX - Asynchronous Javascript and XML

The goal of AJAX technology is to speed Web applications that have frequent user interactions. AJAX uses Javascript as the primary programming language and XML. The other technologies used are DOM and CSS.

A typical session of Web use starts when the user request for a page, either by typing the URL or clicking a link to the page shown on the web browser. The web browser then has to wait until the page is provided from the server to display it to the user. If the user makes a change to the document there may not be a need to re display the entire document.

Model-View-Controller - MVC

Model-View-Controller(MVC) architecture was developed by Trygve Reekskaug in 1978-1979 while he was a visiting scientist atXeroxPARC.

The original intent of MVC was to model graphical user interfaces, whichwere then being developed for Samlltalk.

The MVC architecture seperates applications into three parts,

  • The model - data and the enforced constraints on the data.
  • View - the part of an application that prepares and presents results to the user.
  • Controller - controlls the application and performs computations.

Rails

Rails is a development framework for Web-based applications, including those that access databases. Due to the intimate connection with Ruby, it is often called Ruby on Rails or RoR.
http://www.rubyonrails.org/

Rails was developed by David Heinemeier Hansson in early 2000 and was released in 2004.

A significant and characterizing part of Rails is its approach to connectiong object-oriented software with a relational database.

What are thumbs up and downs for ROR

Strengths
  • Convention over configuration
  • Active record
  • Metaprogramming
  • Scaffolding
  • Built in testing
Limitations
  • As pointed out by (Tate and Hibbs, 2006) Rails has poor support for object-relational mapping (ORM) for legacy schemas compared to Java's approach.
  • Assuming a single, non-compund primary key for the database and not supporting compund primary keys for the database is anotherlimitation highlighted by Monson-Haefel(2006).

Monday, August 4, 2008

Reflection

Finding information on web
Most tutorails available on web are dealing with earlier versions of rubyonrails, instant rails.
Finding correct information is quite time consuming.

Scaffolding in rails
InstantRails 2.0 does not provide scaffolding option and this limits the effectiveness in a educational or training environment. However due to limitations with scaffolding in production environments has been a major reason for this.

Making progress
There are number of different varieties of software tools available, and versions of them available. This makes things difficult to achieve if you don't have the correct combination. I started following a tutorial that was showing how to use MySQL that comes with the instant rails. However it was displaying an error sometimes and I found SQLite3 much easier.

XML workshop 4

1. The screen out put from running the as_you_SAX_parser.py
prints the whole XML file contents.



The screen out put from running the XML_pullDOM_parser.py
prints the fisrt line element of the defined act element
and scene element numbers in the program



6. There are about 30 public available packages and modules
and overall 200 individual modules in the pyXML package as mentioned
in http://pyxml.sourceforge.net/topics/howto/node10.html.

Styled using XSL



Answers to exercises

Exercise

Ruby

Ruby was designed in Japan by Yukishiro Matsumoto and was released in 1996. The primary purpose for designing Ruby for him was to replace the limitaions he found in Pearl and Python for his purposes. http://www.ruby-lang.org/en/

Learning Ruby is made easier by its implementation method, pure interpretation.
Ruby is an interpreted scripting language for quick and easy object-oriented programming.
Meaning and benefits of the above are,
  • ability to make operating system calls directly
  • variable declarations are unnceccessary
  • variables are not typed
  • everything is an object

Quick growth of Ruby has been due to the use of Rails, the web application framework that is both written in Ruby and uses Ruby.

SQL server

This is SQL server notes section

Subject - ITC382

E-commerce web development

Profile

Currently working in the IT software development industry for an Automotive wholesale company.