Wednesday, March 31, 2010

Workshop 1: Setting up the model railway

Topic objectives

• 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

Tuesday, March 30, 2010

Exercise 4: Network and Web programming frameworks

1. Describe the important and distinguishing properties of Peer to Peer computing with the client/server architecture?

Peer to Peer (P2P) is any distributed network architecture composed of participants that make a portion of their resources directly available to other network participants without any central coordination servers. Peers are both suppliers and consumers of resources, in contrast to the tradition client-server model where only servers supply and clients consume. P2P networks are typically formed dynamically by ad-hoc additions of nodes. The removal of nodes has no significant impact on the network. The distributed architecture of an application in a P2P system provides enhanced scalability and service robustness.

The client-server model describes the relationship in which the server component provides a function or service to on or many clients, which initiate requests for such services. Functions such as email servers, file servers, database servers are built on the client-server model. For example a web browser is a client program running on a user’s computer that may access information stored on a web server on the Internet. The client-server model has become one of the central ideas of network computing. Many business applications being written today use the client-server model.

2. Frameworks for development. Compare and contrast any TWO of:
a) Java
b) .NET

Java and .NET are competing frameworks that has been developing for some years. Java is a programming language developed by SUN Microsystems and released in 1995. Java usually refers to the Java programming language which was designed for use with Java Platform. The Java Platform consists of several programsl, each of which provides a distinct portion of its overall capabilities. Java Compiler converts Java source code into Java bytecode (an intermediate language for the Java Virtual Machine). The Java Runtime Environment complementing the JVM with a Just-In-Time (JIT) compiler and converts intermediate bytecode into native machine code on the fly.

The success of Java and its write once, run anywhere concept has led to other similar efforts or competitor, notably Microsoft .NET platform, appearing since 2002. It incorporates many of the successful aspects of Java. .NET in its complete form is currently only fully available on Windows platforms, whereas Java is fully available on many platforms. .Net was built from the ground-up to support multiple programming languages, while Java platform was initially built to support only Java language. The .NET language still has many similarities to Sun’s JVM. Both are based on a virtual machine model that hides the details of the computer hardware on which their programs run. Both use their own bytecode which Microsoft calls that Common Intermediate Language (CIL)

.NET includes a Java-like language called Visual J# (formerly known as J++) that is not compatible with the Java specification, and the associated class library mostly dates to the old JDK 1.1 version of the language; for these reasons, it is more a transitional language to switch from Java to the Microsoft .NET platform, than a first class Microsoft .NET language. Visual J# has been discontinued with the release of Microsoft Visual Studio 2008.


Reference
Wikipedia (2010). Peer to Peer. Retrieved 1 Apr, 2010 from http://en.wikipedia.org/wiki/Peer_to_peer

Wikipedia (2010). Client-server. Retrieved 1 Apr, 2010 from http://en.wikipedia.org/wiki/Client_server

Wikipedia (2010). Java (software platform). Retrieved 1 Apr, 2010 from http://en.wikipedia.org/wiki/Java_(software_platform)

Wikipedia (2010). .NET Framework. Retrieved 1 Apr, 2010 from http://en.wikipedia.org/wiki/.NET_Framework

Sunday, March 28, 2010

Exercise 3: From DNS and DHCP to Clouds and Grids

1. Explain DNS and DHCP. How does DNS differ from DHCP configuration?

Domain Name System (DNS) is a hierarchical naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participants. It distributes the responsibility of assigning domain names and mapping those names to IP addresses by designating authoritative name servers for each domain.

While Dynamic Host Configuration Protocol (DHCP) is a computer networking protocol used by hosts to retrieve IP address assignments and other configuration information. The DHCP server receives the request and responds with configuration information from its configuration database.

2. Why is it important for your online business application to use a static IP address rather than have it dynamically assigned?

Online application requires to register domain names to map to specific IP address for users to easily access the website hosted on specific web server with static IP address. This is why it would be relatively inconvenient to have dynamic IP address which changes every time the web server connects to the ISP. Therefore web applications with specific domain name are usually using static IP address instead of dynamic IP address.

3. What role can the following play in business-to-business e-commerce?

a) Virtual Private Network (VPN) or Grid computing services
A virtual private network (VPN) is a computer network where the data travelling over the VPN is not generally visible to public, or is encapsulated from, the underlying network traffic. That means the sensitive data like the clearing files between the bank the clearing house is encrypted and transferred via the VPN so the content is secured.
While Grid computing is the combination of computer resources from multiple administrative domains for a common goal. One of the main strategies of Grid computing is to use middleware to divide and apportion pieces of program among several computers or aggregation of large-scale cluster computing based systems. This would be required if the system availability is vital to business and would cause financial lose if the system failed.

b) Next generation of wireless mesh networks
A wireless mesh network (WMN) is a communication network made up of radio nodes organized in a mesh topology. Wireless mesh networks consists of mesh clients, mesh routers and gateways. The mesh clients are often laptops, cell phones and other wireless devices. A WMN can be seen as a special type of wireless ad-hoc network which is highly mobile. Users could easily connect to the business network from any mobile devices at anywhere and anytime as long as the mobile network is covered.

c) Cloud or Social Cloud applications
Cloud computing is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand, like a public utility. While cloud application services deliver software as a service over the Internet, eliminating the need to install and run the application on the customer’s own computers and simplifying maintenance and support. These allow easy access from users no matter of client platforms which minimize any pre-requisite and compatibility problems.

4. “If clouding computing is the “black box”, then the grid computing is a component as the “white box”.

Explain what you interpret about that statement

Clouding computing is a server based application that could be run on any platform. Users just require to feed in the required data to the web application, just like if we are buying online tickets from cinema by entering the seat number, number of tickets and Visa card number then we got the ticket. We would not know the architecture and logic behind and so it is just like a “black box”.

Grid computing involves a large aggregation of servers forming a cluster to perform the same function. Such as a clustered file server, print server, application servers or web servers. It provides high availability and load-balancing for critical and busy applications to handle users’ request with high availability or better performance. The architecture is simple and clear as a “white box”.


Reference
Wikipedia (2010). Dynamic Host Configuration Protocol . Retrieved March 29, 2010 from http://en.wikipedia.org/wiki/Dhcp

Wikipedia (2010). Grid Computing . Retrieved March 29, 2010 from
http://en.wikipedia.org/wiki/Grid_computing

Wikipedia (2010). Wireless mesh network . Retrieved March 29, 2010 from
http://en.wikipedia.org/wiki/Wireless_mesh

Wikipedia (2010). Cloud computing . Retrieved March 29, 2010 from
http://en.wikipedia.org/wiki/Cloud_application#Application

Wednesday, March 24, 2010

Exercise 2: Find some common ground

Describe the steps involved with the Rapid Evolutionary Prototyping Approach as it applies to developing a Web application

How is it related to agile development?

Step-by-step for Rapid Evolutionary Prototyping Approach
1) Begin with a plan which includes an initial specification and a management strategy.
2) Identify the first increment to be prototyped, with the highest risk element of the system, which allows us to get the most initial leverage from the user’s interaction with the prototype.
3) Database creation in which database of simulated user data for the system to operate on.
4) Develop menus or interaction modes which allow the user to interact with the data.
5) Attach with initial functionality with the aid of a rapid prototyping tool set.
6) Iterative development cycle which involves user feedback and a repeat of steps (2) to (5).
7) The user ultimately accepts the prototype as adequate and the iteration ceases.
8) Using the prototype as a base, we derive a design for the finished system.
9) Implement the design, and then tune it to provide the required level of performance.
10) The system goes into its operation and maintenance phase.

Agile software development refers to a group of software development methodologies based on iterative development. It generally promotes a disciplined project management process that encourages frequent inspection and adaptation, a set of engineering best practices intended to allow for rapid delivery of high quality software and a business approach that aligns development with customer needs and company goals. Customer satisfaction is maintained by rapid, continuous delivery of useful software. Close, daily cooperation between business people and developers with regular adaptation to changing circumstances. Even late changes in requirements are welcomed. All these resembles the Rapid Evolutionary Prototyping Approach.


Reference
Wikipedia (2010). Agile software development. Retrieved March 28, 2010 from http://en.wikipedia.org/wiki/Agile_software_development

Greg, P. (1998). Evolutionary Rapid Prototyping. Retrieved March 28, 2010, from
http://phillips.rmc.ca/courses/493-1998/lectures/rapid-prototyping/rapid-prototyping.html

Sunday, March 21, 2010

Exercise 1: Analysis of the online communities paradigm

1. Visit http://yahoo.com/ and http://facebook.com/ as examples of online communities.

a. What is meant by an online community and how is it important for e-commerce?
An online community is a virtual community that exists online with members joining in all over the world. Members can share their thoughts and live experience by posting contents in words and photos. Joining groups and before fans of certain brands in order to receive the latest information and activities. This is why Facebook becomes another platform to promote a brand where promoters can post information to their group such as activity photos and new product information. The promotion effect is much more effective and long lasting than advertising on newspapers and TV which last only for days but now last for weeks without any cost imposed. Fan in the group would also discuss on certain product and activities which further enhance the promotion effect.
b. Is there a common thread and a local community sense in action?
We can see there is a common thread and local community sense in action on the Internet. Take Hong Kong as an example, in 2008, police has arrested people posting celebrity porn photos on the Internet. Recently, police has also accused a teenager posting on forum regarding the blow up of the residence of chief executive.


2. Visit the famous online store front at http://www.amazon.com/

a. Why has it been a successful site? How does the purchase of a book work?
Having visited Amazon, we have discovered that the success comes the simplicity of buying a book in Amazon and its huge collection of books. It develops a website which focuses on the value delivered to customers as it is user friendly. Orders can be processed online anytime and everywhere in the world. Amazon now even launches a new gadget called “Kindle” which is a electronic book reader. It further extends a platform for book selling in electronic format.
The database of the book stock in Amazon is huge and you can easily locate any books you want. The items you have previously searched would be recorded in the cookies in case you want to buy it next time. You may also put the items in the wish list or shopping cart even you are not a member of Amazon and only need to register your details until you decided to checkout your items.

b. Are there any secure transactions not involving money?
There is no secure transactions not involving money in the market. Secure transaction or more specifically Secure Electronic Transaction (SET) is a standard protocol for securing credit card transactions over insecure networks. It is intended to become the standard of payment method on the Internet between the merchants, the buyers and the credit-card companies.


3. What happens with new models emerging such as price comparison sites?

Price comparison sites are basically a one way data collection from merchants. These price comparison sites would not charge users using the site. New business models emerge as these sites brings traffic to merchants and would charge them for each time users click to the retailer web site via the link on the comparison site. In the UK, these services made between 120m pounds and 140m pounds in revenue in 2005 and is growing in an annual rate of 30% to 50%


References
Price Comparison Service. Retrieved Mar 18, 2010, from http://en.wikipedia.org/wiki/Price_comparison_service

Secure Electronic Transaction. Retrieved Mar 15, 2010, from http://en.wikipedia.org/wiki/Secure_Electronic_Transaction

Tuesday, March 16, 2010

ITC594 Topics

Topic 1: E-commerce, distributed applications and the Internet
Topic 2: Clients, servers and distributed paradigms
Topic 3: Database servers
Topic 4: Web application servers
Topic 5: XML - eXtensible Markup Language
Topic 6: Distributed objects - RMI and COBRA
Topic 7: Internet security
Topic 8: Concurrency and transactions
Topic 9: Designing distributed systems
Topic 10: Bots, agents, spiders and mobile computing
Topic 11: Case studies - Further case studies for investigation
Topic 12: System integration

Friday, March 12, 2010

Introduction to ITC594

Hi there, I am Gary, working as a system administrator in a global investment bank in Hong Kong. At the same time, I am studying ITC594 - E-Systems Infrastructure Developemnt. This is my last subject before graduation :D

This subject basically requires us to explore technologies that support e-systems infrastructure development and develop e-business applications for a SME. We would go through 12 topics with 16 exercises and 8 workshops.

The objective of this blog is to build up a e-Portfolio and record our learning journey by finding answers for the 16 exercises and to share our learning experience interactively with other students. The answers to the exercises and my workshop experiences would all be included here.