END of the RIDE
a. At the end of the ride there is no delay for making a payment so the taxi driver would help the customer get out of the car and would have their luggage ready waiting for them and say goodbye.
b. The business process concludes when the company uses the taxi vehicle’s GPS location data again to send a final friendly thank you, suggests feedback via SMS and offers a goodbye message.
Saturday, April 18, 2009
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (BLUE team) Part C Online Taxi Business Process 2.:
DURING the RIDE
a. When the taxi arrives, the driver greets the customer by name and helps them with their luggage and then opens the car door.
b. The taxi driver would initiate a conversation and continue with it if they are interested or show interest if they started talking first.
a. When the taxi arrives, the driver greets the customer by name and helps them with their luggage and then opens the car door.
b. The taxi driver would initiate a conversation and continue with it if they are interested or show interest if they started talking first.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (BLUE team) Part C Online Taxi Business Process 1.:
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 using any suitable drawing tool.
The following description is a helpful guide, but don’t be restricted from including your own ideas to extend or limit the business process model:
BEFORE the RIDE
a. The business process will begin with ordering the cab by telephone, SMS, or online and getting customer recognition if the customer has made a booking previously.
b. During registration, the company would collect data for good customer relations and the electronic payment method. All data collected has to also achieve a quick ordering process and be used ethically and securely.
c.SMS reminders, and updates via SMS, GPS and Google maps provide location-based information to re-assure that the taxi is on the way and on time for the booking.
The following description is a helpful guide, but don’t be restricted from including your own ideas to extend or limit the business process model:
BEFORE the RIDE
a. The business process will begin with ordering the cab by telephone, SMS, or online and getting customer recognition if the customer has made a booking previously.
b. During registration, the company would collect data for good customer relations and the electronic payment method. All data collected has to also achieve a quick ordering process and be used ethically and securely.
c.SMS reminders, and updates via SMS, GPS and Google maps provide location-based information to re-assure that the taxi is on the way and on time for the booking.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (BLUE team) Part B The enhanced customer experience 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)
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: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (BLUE team) Part A Survey of mobile device 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.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (BLUE team) Part A Survey of mobile device 1.:
Find out and recommend what type of mobile devices are suitable for:
a. Just the SMS message service;
b. The full user experience via SMS, GPS Taxi tracking and Google Maps
a. Just the SMS message service;
b. The full user experience via SMS, GPS Taxi tracking and Google Maps
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 11.:
Report your progress or findings in your Developers Blog.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 10.:
Submit the forms data. What do you find?
How it works
When you use the params method in Rails, it implements the details of the parameter hash to be changed without breaking existing code. For example, the params hash for radios1 will contain the value of the radio button and the data is extracted in the cabtype action. With the multiple list box example in Rails, using the select controls, the params hash of building1 is an associative array (dictionary) holding the users multiple selections and is not just a drop-down list.
Rails supports other HTML controls for forms processing via text fields, check boxes, radio buttons and list select controls etc. As an example start_form_tag abd stop_form_tag as well as methods for each item such as the create field method text_field_tag
How it works
When you use the params method in Rails, it implements the details of the parameter hash to be changed without breaking existing code. For example, the params hash for radios1 will contain the value of the radio button and the data is extracted in the cabtype action. With the multiple list box example in Rails, using the select controls, the params hash of building1 is an associative array (dictionary) holding the users multiple selections and is not just a drop-down list.
Rails supports other HTML controls for forms processing via text fields, check boxes, radio buttons and list select controls etc. As an example start_form_tag abd stop_form_tag as well as methods for each item such as the create field method text_field_tag
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 9.:
Start the Web server and go to the opening page of this application at http://localhost:3000/input.html
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 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
class VehicleController< ApplicationController
def cabtype
@data1 = params[:text1]
@data2 = params[:check1]
@data3 = params[:radios1]
@data4 = params[:building1]
end
end
class VehicleController< ApplicationController
def cabtype
@data1 = params[:text1]
@data2 = params[:check1]
@data3 = params[:radios1]
@data4 = params[:building1]
end
end
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 5.:
Save the view and restart the Web server and navigate to http://localhost:3000/cabs/cabtype
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 4.:
Add a view template - cabs\app\views\vehicle\cabtype.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.
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.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 3.:
Add an action to vehicle_controller.rb as the method called cabtype
class VehicleController< ApplicationController
def cabtype
end
end
class VehicleController< ApplicationController
def cabtype
end
end
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 2.:
Create a controller called Vehicle in cabs\app\controllers
cabs> ruby script/generate controller Vehicle
cabs> ruby script/generate controller Vehicle
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part C Screen layouts: passing data 1.:
Create a new application called cabs in the same projects directory to demonstrate the use of an active view.
> rails cabs
> cd cabs
> rails cabs
> cd cabs
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 9.:
Restart the Web server and navigate the browser to http://localhost:3000/demo/rubycode
Data has been passed from the action to the view as it is done with SQL requests. The instance variables of a Ruby class are available to view templates by referencing the action’s instance variables by name in the view .rhtml template.
Data has been passed from the action to the view as it is done with SQL requests. The instance variables of a Ruby class are available to view templates by referencing the action’s instance variables by name in the view .rhtml template.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 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:
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 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
class DemoController< ApplicationController
def rubycode
@time_now = Time.now
end
end
class DemoController< ApplicationController
def rubycode
@time_now = Time.now
end
end
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 6.:
Use the Time.now example to pass data from an action to a view.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 5.:
Save and restart the Web server and navigate to http://localhost:3000/scenery/rubycode
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 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.
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.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 3.:
Add an action to demo_controller.rb as the method called rubycobe
class DemoController< ApplicationController
def rubycode
end
end
class DemoController< ApplicationController
def rubycode
end
end
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 2.:
Create a controller called Demo in scenery\app\controllers
scenery> ruby script/generate controller Demo
scenery> ruby script/generate controller Demo
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part B The active view: passing data 1.:
Create a new application called scenery in the same projects directory to demonstrate the use of an active view.
> rails scenery
> cd scenery
> rails scenery
> cd scenery
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 8.:
Try Ruby code and HTML in the action view by using the <%....%> wrapper around the inserted Ruby code. Here are some snippets to try from workshop 4:

NOTE: in practise you normally perform calculations in the action (method) and pass the results to the view.

NOTE: in practise you normally perform calculations in the action (method) and pass the results to the view.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 7.:
Create and save a view in that directory by using a text editor to create a view called breathe.rhtml

Restart the WEBrick serve r and browse again at http://localhost:3000/mammals/breathe

Restart the WEBrick serve r and browse again at http://localhost:3000/mammals/breathe
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 6.:
Start the WEBrick server and browse at http://localhost:3000/mammals/breathe where you will get a “missing template” message since it is missing a view for the breathe method.
Rails is trying to connect the breathe method action of the mammal controller to a view, by using the action’s name – breathe. This view template is created as breathe.rhtml and stored in the \projects\animals\views\mammal directory.
Rails is trying to connect the breathe method action of the mammal controller to a view, by using the action’s name – breathe. This view template is created as breathe.rhtml and stored in the \projects\animals\views\mammal directory.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 5.:
Create an action by editing and saving the mammal_controller.rb class in projects\animals\app\controllers using your text editor to add the method below:
class MammalController< ApplicationController
def breathe
end
end
class MammalController< ApplicationController
def breathe
end
end
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 4.:
Test the controller by starting the WEBrick server and navaigatibng the browser to http://localhost:3000/mammal Note how the controller name is appended to the end of the URL and that no action resulted because there are no controller methods.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 3.:
Create the controller to make the application do an action. This is under the controller-action/model-view structure.
Stop the WEBrick server each time you edit Ruby classes and then re-start or refresh the views you are testing. Use the Ruby command below:
>ruby script/generate controller Mammal
The mammal_controller.rb contains just a bare class description:
class MammalController< ApplicationController
end
and the ApplicationController class inherits from ActionController::Base class in the ActionController module under Rails.
Stop the WEBrick server each time you edit Ruby classes and then re-start or refresh the views you are testing. Use the Ruby command below:
>ruby script/generate controller Mammal
The mammal_controller.rb contains just a bare class description:
class MammalController< ApplicationController
end
and the ApplicationController class inherits from ActionController::Base class in the ActionController module under Rails.
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 2.:
Running the application on localhost:3000 using the WeBrick ruby server (or Mongrel as alternative) and access via Web browser at http://localhost:3000/
Workshop 5: Admiring the secenery Forms, AJAX screen layout and and mobile interfraces: To Do (RED team) Part A Viewing the action 1.:
Create the Rails application framework in the projects folder: C:\InstantRails\...\projects\>rails animals
Tuesday, April 7, 2009
Subscribe to:
Comments (Atom)

