Elevator pitch 2

May 27, 2009

script:

First of all I would like to say thanks to this subject. This subject gives me chance to understand Web 2.0. Web 2.0 refers to second generation of web development and web design. There are plenty of new technologies and ideas involved, including RSS, Wikipeida, social-networking sites, youTube, blogs… all of them are emphasizing the application of technologies but not focus on the technology itself. The former Web 1.0 provided a platform for information sharing, while Web 2.0 gives us the ease of sharing and managing information.

With the help of frameworks web application developments are much faster than before. Framework is a re-usable design for a software system. A framework include support programs, code libraries, a scripting language, or other software to help develop and glue together the different components of a software project. Various parts of the framework may be exposed through an application programming interface. Rails is a framework for Ruby, .Net is a framework for C# or VB.Net, and Struts is a framework for Java web application. The use of framework streamline the application development, provide standard codes for system integration, provides a clear code structure and even enhance the security of the application. So why not framework?

Elevator pitch 1

May 27, 2009

I first touch computer language when I was in university. I use Java in most of my assignments. After graduate my job duty is email server administrator. Programming or software development is not necessary, but I still need to develop some tools on maintaining Lotus Domino using Java. In my mind software development still need a long time to develop thousands of functions to retrieve data from database and store data to database, at the same time take care of security issues. That’s why I felt shame that I understand what means by framework just until this course.

Ruby on rails is the first framework I ever use. While using Model-View-Controller design pattern, computer coding are separated into three parts to isolate three different purposes: data access, business logic, and data presentation. The code is much more easy for troubleshooting, and develop time are greatly shortened. The most powerful part of Ruby on rails is database Activerocord. The only thing we have to set is database connection. The remaining parts like database schema, data access, or table creation will be handled by ruby on rails. It will even automatically generate user interface on displaying the data. Developers can concentrate on the business logic, much development time are saved.

Though I’m still green to framework, I would really recommend to use framework in building E-Systems.

Workshop 8

May 25, 2009

I consider the 3 strengths to be:

1. All records in database can be called by code and return as object.
2. Scaffolding makes programming easy. It automatically generates the model, view and controller for object access.
3. Ruby is platform independent. It can be run on Windows, Linux and even Unix. The scalability makes application more portable.

I consider 3 weaknesses to be:
1. The Ruby language syntax is different from main stream languages like C#, VB and Java.
2. While comparing with C#, VB or Java the community for Ruby is small. Resource is much less.
3. Ruby on Rails is for Web application only. Thus this framework can not be applied on other application.

The most difficult aspects were:
1. After parsing the Ruby code the web page is not “what you see is what you get”. Unless you are very familiarize with Ruby you can hardly develop anything.
2. Because of point 1 it is hard to implement AJAX. I failed in doing this task.

Improvements I would make include:
Scaffolding is powerful, but in my case I was side-tracked by scaffolding. I have experience on web development with PHP, ASP, .NET and Java. I tried to complete the workshop by scaffolding as it generated all required items like database tables and MVC for me. I spent 2 days on modifying the code to satisfy the requirement but failed. The concept of RoR is different from my past experience, and the syntax is another style too. Finally I start from the very beginning, and follow the procedure of “RailSpace”, understand everything from the ground. Finally I finished those workshop. Though the improvement is not RoR itself; I learn a lesson that I should learn from the ground.

Workshop 7

May 24, 2009

To Do:

Developers conclude their work with the OTBS and look at the options for deployment of the site. Examine the various platforms/software tools used for deployment such as UNIX environment suggested in the Discussion Notes, Mongrel or Mongrel cluster, Nginx, Subversion or Capistrano (during development stage), JRuby in the Java environment.

Which way?

The choice is up to you as this workshop present just one option and you may like to use another, such as deploying the OTBS in a .NET or J2EE environment

Can you get the OTBS Running in production mode as a minimal production server?

Share your success by posting progress comments and links etc to the Developers sub-forum site that has been set up for the Red team.

——————————————————————————————————-

I would suggest running Mongrel with MySQL and use Linux as platform as production platform. Although Win32 version is available for Mongrel and MySQL, Linux gives a more stable platform than Win32 in long run in my experience. Moreover, its free open souce software. Mongrel is recommended as clustering solution is present. Upgrading to cluster is possible and easy. MySQL also offer free database with advanced feature like cluster and fail over.

The OTBS has been completed. Some screen capture to share:

01

1. This is the welcome page of the system.

01

2. User registrarion page.

01

3. User login page, with advanced login features as described by Hartl et al (2008).

01

4. After login user’s can place a new taxi booking, or review the past booking.

01

5. Some information is needed to place an order.

01

6. While Date and Time are mandatory fields.

01

7. User can check back their previous orders.

Workshop 6

May 24, 2009

To Do:

Developers may continue to build upon work with the OTBS using the topic reading to help with user registration and advanced login features from Hartl et al (2008).

  • generate a controller and an action by adding a method(s) to a controller;
  • create a view template for each action and to link to actions from views;
  • use AJAX to improve the user experience;

Share your success by posting progress comments and links etc to the Developers sub-forum site that has been set up for the Red team.

—————————————————————————————-

While following and modifying guidelines from Hartl et al (2008) a simple user model is created. Functions like registering, login and logout are readily for use. Those functions make use of model, view and controller. In the meantime ajax function has not been implemented.

Since the version used by Hartl et al is not different from mine (I’m using InstantRails 2.0), some modification to the guidelines is needed. Some example as below:

1. There’s no need to manually add created_at and updated_at to tables.

2. Scaffolding command is “ruby script/generate scaffold ……” instead of “ruby script/generate scaffold_resource …….”

Workshop 5

May 20, 2009

Part A: Viewing the action

1. Create the Rails application framework in the projects folder: C:\InstantRails\…\projects\>rails animals

I created a folder called “projects” under the folder “rails_apps”, and create the Rails application under this folder. However the application couldn’t be loaded. Spent some time on troubleshooting but still couldn’t find the cause. Finally gave up, and my Rails application is under the folder “rails_apps” instead.

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/

It shows the “Welcome aboard” page.

01

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.

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.

I got an “Unknown action” page.

02

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

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.

7. Create and save a view in that directory by using a text editor to create a view called breathe.rhtml

<html>

<head>

<title>Breathe Easy</title>

</head>

<body>Inhale and Exhale

</body>

</html>

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

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:

<br>

5 + 6 =<%= 5 + 6 %>

</br>

<br>

=<% 4.times do %>

Inhale Exhale <br>

<%end%>

<br>

Time is <%=Time.now %>

</br>

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

The link should be http://localhost:3000/mammal/breathe instead. The page just show the content defined in breathe.rhtml

03

Part B: The active view: passing data freom an action to a view

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

> rails scenery

> cd scenery

A Rails application is created.

04

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

scenery> ruby script/generate controller Demo

A new controller is created.

05

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

class DemoController< ApplicationController

def rubycode

end

end

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

The link should be http://localhost:3000/demo/rubycode instead. No content is shown because nothing was wrote into the view page.

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

class DemoController< ApplicationController

def rubycode

@time_now = Time.now

end

end

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:

<br>

The time is <%= @time.now %>

<br>

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

The variable in rubycode.rhtml should be @time_now instead. It should the current server time.

06

Data has been passed from the action to the view as it is done with SQL requests. The instance variables of a Ruby class care available to view templates by referencing the action’s instane variables by name in the view .rhtml template.

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.

> rails cabs

> cd cabs

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

cabs> ruby script/generate controller Vehicle

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

class VehicleController< ApplicationController

def cabtype

end

end

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.

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

<html>

<head>

<title>Forms processing</title>

</head>

<body>

<h1>Booking a Taxi</h1>

<form action =”vehicle” method = post>

Please enter your name.

<br>

<br>

<input type=”text” name =”text1”>

<br>

Would you like to book a taxi?

<input type=”checkbox” name =”check1”>Yes

<br>

<br>

Please select the type of taxi:

<input type=”radio” name =”radios1” value =”Sedan”>Sedan

<input type=”radio” name =”radios1” value =”Wagon”>Wagon

<input type=”radio” name =”radios1” value =”Disable”>Disable

<input type=”radio” name =”radios1” value =”Maxi”>Maxi

<br>

<br>

What type of building is at your address?

<br>

<select name=”building1[]” multiple size=”3”>

<option value=”Unit”>Unit

<option value=”House”>House

<option value=”Business”>Business

</select>

<br>

<br>

<input value=”submit”/>

</form>

</body>

</html>

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

8. Edit the view template cabtype.rhtml

<html>

<head>

<title>Reading the forms data</title>

</head>

<body>

<h1>Booking a Taxi</h1>

Please check the data that you selected below.

<br>

<br>

Your name is <%= @data1 %>

<br>

Your choice to book a tax was:

<br>

<%= if @data2 %> You chose YES.

<%= else %> You did NOT make a choice.

<%= end %>

<br>

Your preferred taxi is a <%= @data3 %>

<br>

The building at your address is a <%= @data4 %>

<br>

<br>

</body>

</html>

9. Start the Web server and go to the opening page of this application at http://localhost:3000/input.html

07

10. Submit the forms data. What do you find?

Syntax error. The if else end was incorrect. The correct one should be<% if @data2 %> instead of<%= if @data2 %>. The symbol “=” is asking ruby to print out the value of the variable, that’s why it should be present in if else end statement. After debug the data I input was displayed.

08

11. Report your progress or findings in your Developers Blog.

Exercise 26

May 19, 2009

What to do:
The final topic is for group reflective study using the wiki tool in CSU Interact and a way for you to add a final reflective comment on systems integration and make your closing remarks to your Developer’s blog.
1. Choose ONE of the four ways to manage and develop integrated systems as listed below;
2. Summarise your understanding and describe its relevance (250 words max) in either your study at university or in your work environment;
3. Edit TWO similar versions (include bibliography) of that summary to CSU Interact:
a. post version A as a wiki page contribution;
b. add version B as a final entry to close your developer’s blog.

————————————————————————————————–

I’m working in a governmental office as a system administrator. We have 7 teams in IT divisions with different perspectives. My team is responsible for part of internal applications, and my job duty is to manage email system and company portal.

System integration always brings us challenges. During the last 10 years our department developed different applications for different division. Those applications use their own databases, and the data was scattered to different system. Without careful design those system could not operate together as they’re talking different language. Thus an extra application is implemented in the middle to make two systems able to exchange data.

As most of the systems are aged, our department is reviewing the whole IT infrastructure. Ideally we would like to merge some databases as they are duplicated. Some need obsolete due to data overlapped. Some needs redeveloped as the database software has been de-supported. The revamp through federated databases should make the IT infrastructure more clear and efficient. The truth is, unfortunately, facing heavy resistant.

This is rather an organizational problem. Most of the divisional applications are owned by the division. They intend not to upgrade the system as they find the application still useful to them. Finally our technical advice became useless. Moreover IT department is too small that we’re not able to make decision. Thus although the revamp should benefit the organization, upper management did not agree on such changes.

Search the Web for a site that uses a cyber character or cyber agent to host a business site. (If you create a successful cyber agent, you may be able to get large companies to use it to sell their products online.)
1. Differentiate the various types of software agents.

Nwana (1996) defines there are 7 types of agents: Collaborative agents, Interface agents, Mobile agents, Information/Internet agents, Reactive agents, Hybrid agents, Smart Agents

2. Describe how techniques such as artificial intelligence and statistical techniques are used in software agents.

Artificial intelligence is used in software agents in predicting what a user want. AI is originally a database of questions and answers. AI will use statistical techniques to build up the database, make to questions and answers more accurate.

3. Identify various activities in e-commerce where software agents are currently in use.

4. Computing ethics and bot programming case study: rocky
a. Gerd from the lecturer to LC_MOO at http://ispg.csu.edu.au:7680 and logt an account username and passwoin to the Welcome Lobby.
b. Hold a 5-minute discussion with Rocky on a special topic. Commands: act rocky (start bot) hush rocky (stop bot)
c. Rocky is an ELIZA-like bot. Report your findings.

Here is the conversation between me and Rocky:Rocky says, “Gee thanks for waking me up! I must have dozed off..”
You say, “hi rocky”
Rocky says, “Hi, how are you?”
I don’t understand that.
You say, “I’m fine”
Rocky [to train5]: You are fine? How come?
You say, “Because it is sunny today, and I get happy”
Rocky [to train5]: it? how so?
You say, “Do yoy play computer games”
Rocky says, “oh yeah?”
You say, “Do you play computer games?”
Rocky says, “Gosh, I’m not sure I can answer that…”
You say, “What you can answer then?”
Rocky says, “Gosh, I’m not sure I can answer that…”
You say, “What is your education level?”
Rocky says, “my education level? Why do you wish to know?”
You say, “Because you are so stupid.”
Rocky [to train5]: Why do you think I am so stupid?
You say, “You are not answering my questions.”
Rocky [to train5]: Perhaps it is you who are not answering my questions!
You say, “O really? Which question I did not answer?”
Rocky says, “Do you come here often?”
You say, “not so frequent. Maybe twice a week”
Rocky says, “Tough question! Shall we use A search engine to find out?”
You say, “Yes please.”
Rocky [to train5]: You seem quite positive on the subject…
You say, “You seems not understanding my question.”
Rocky [to train5]: Please tell me more about your question…
You say, “No I’m not telling you.”
Rocky [to train5]: You are not telling you? How come?
You say, “The pattern matching algorithm seems need to be improve.”
Rocky says, “What are you like at programming in Python?”
You say, “No I never use Python. I use Java”
Rocky [to train5]: No? why not?
You say, “So why Python?”
Rocky says, “Hmm, not sure I know..”

In most of the time Rocky tries to answer my question by pattern matching. If the question is long or hard to understand Rocky will not directly answer the problem. Instead he will said something not relating to any question. The AI can only handle simple and straight forward questions.

Reference:

Nwana, H.S. (1996), Software Agents: An Overview, retrieve from http://agents.umbc.edu/introduction/ao, retrieved on 19 May 2009

Exercise 22

May 15, 2009

Differentiate between software systems such as Customer Relationship Management (CRM) software, Business-to-Business e-commerce programs and Supply-Chain Management (SCM) software.

They are different system used for different purposes. CRM software support processes a company uses to track and organize its contacts with its current and prospective customers. It provides interface to query, add, update and delete contact information to customers. It is offen used for marketing to target customers.

Supply chain management software (SCMS) is a business term which refers to a range of software tools or modules used in executing supply chain transactions, managing supplier relationships and controlling associated business processes.

Develop the class diagram for the following shopping cart specifications:
A shoppingCart object is associated with only one creditCard and customer and to items in itemToBuy object. Persistent customer information such as name, billing address, delivery address, e-mail address and credit rating is stored in the customer object. The credit card object is associated with a frequentShopper discount object, if the credit rating for the customer is good. The customer can make or cancel orders as well as add and delete items to the shopping cart product. The credit card object contains the secure method for checking that the charge is authentic.

8df34068eb779d6c76f5ff244778adf5

Follow

Get every new post delivered to your Inbox.