Wednesday, April 14, 2010

Exercise 8: XML introduction

XML was designed to transport and store data.
HTML was designed to display data.

What is XML?


•XML stands for EXtensible Markup Language

•XML is a markup language much like HTML

•XML was designed to carry data, not to display data

•XML tags are not predefined. You must define your own tags

•XML is designed to be self-descriptive

•XML is a W3C Recommendation


XML and HTML have many differences:
•XML was designed to transport and store data, with focus on what data is.

•HTML was designed to display data, with focus on how data looks.

HTML is about displaying information, while XML is about carrying information.

Exercise 7: Application server platforms in e-commerce

1. Why is the perception getting stronger that integration will become a critical factor in coming days?




2. What is the relationship of AJAX to JQuery (jquery.com) and the lightweight Web 2.0 javascript framework called MooTools (mootools.net) within the enterprise software architecture?



3. What are the similarities between the object-oriented development using model-view-controller (MVC) in Ruby on Rails 2.0 and Action Script 2.0 (Flash animations)?



4. What does it mean to develop RESTful practices into our web applications?



Reference:


Charles Sturt University ITC 594 E-system infrastructure development student study guide

Exercise 6: Web form design and processing: A basis for e commerce interaction

1. Design the form


'Retrofit' the form data string above:



name=Evan+Burke&card=Visa&number=8443261344895544&order=French+perfume



for buying some French perfume into the HTML form fields and submit button on the Web page form.

2. Write the script

Script archives exist for PERL, Python and JavaScript. Search the Web for a script that processes the HTML forms data. Read the code and list the steps involved in processing the form.

3. Can you modify the script to process the form?

4. Improve the user experience by add a Javascript feature.

CGI alternatives

JavaScript, PHP, Active Server Pages (ASP), Java Server Pages (JSP) and a variety of other proprietary sources such as Cold Fusion, all provide an alternative to CGI interactivity and security. [See Figure 2-4 on Web server-enabling technologies in Conallen, p. 23]



JavaScript has been popular for including event-driven, user interface features (display a pull-down menu) and interactive multimedia (display a message or image when a mouse arrow passes over a screen area), as well as to validate data and user types into a form.



MouseOver event sample:



Go Home



Many JavaScript samples are available from http://javascript.internet.com/

Take a video lesson under 10 minutes

There are lots of video lessons on learning to use Javascript.

Douglas Crockford is my favourite: See http://video.yahoo.com/watch/111593

Code generation: Constructing a program or script

Constructing a program can be done in various ways:

• Constructing a sequence of machine language instructions to simulate the parsed statements.

• An Interpreter can execute a source program in a one-step process, with no permanent copy of the program being produced or saved. The use of an interpreter is handy when testing a program under development, as found in the Python IDE.

• Programming languages such as Pascal and C use an option to compile the final program file as one that can 'stand and run alone' as an independent application. A compiler creates a version in the native machine language of the computer.

• The Java Virtual Machine arises from a process that combines the use of a Compiler and an Interpreter. The original Java source code is translated by a Java compiler into Java bytecodes, which are similar to the machine language form. The Java interpreter on ANY machine can read the bytecodes OR another compiler can translate the bytecode form into the machine language of the host machine. Such is the distinct advantage of Java as it is:

 architecturally neutral;

 portable to all systems.

Java virtual machine

The Java language is very secure and platform-independent when compared to alternative languages. Java's secret is the tightly integrated language model. The steps below show how the Java Virtual Machine implements a Java Program:



Coding – Human-readable Java code is produced by the programmer.

1. Building – A Java Development Tool builds the Java program into bytecode, which is saved as a '.class' file.

2. Loading – Via the web or command line, the class file is sent to the Java Virtual Machine (VM) with an attached digital signature. The Java VM is simply an interpreter.

3. Bytecode verification – The Java VM verifies the digital signature.

4. Isolation – When downloaded remotely, the Java VM isolates the Java program in a restricted part of memory. The Java program is not allowed to access local Hard drives and System resources.

5. Internal integrity – Verification checks are made to insure that the loaded Java program is well formed. Data types are verified along with other syntax structure.

6. Execution – Program execution begins.

Web application frameworks: From RSS and RDF to Ruby on Rails

Any development framework, from Java technologies (Java servets, JSP and JavaBeans) to Microsoft .NET and ZOPE, has provided a set of standard software components to reduce the amount of work to be done by the developer. Just as ASP.NET was one development framework for Web-based applications, others have emerged in the open source community to give us more choices – perhaps too much choice and too many to cover in his subject.



While Really Simple Syndication (RSS) introduced the notion of syndicated and subscription services to blogs, wikis and podcasts, other changes have emerged in the way we do business on the Web since 2005, though new rapid development tools.



The rise of Web 2.0 and 'Asynchronous JavaScript & XML' or AJAX has altered and extended development with an enhanced collaborative approach to building dynamic Web interfaces. Begin your understanding of Web 2.0 with Tim O'Reilly's article at http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html

What is AJAX? Visit http://developer.mozilla.org/en/docs/AJAX  as your starting point for this completely different way of developing Web applications. When I started developing Web pages in 1994 we never called it Web 1.0 so what has happened to transform the Web into its second generation? Maybe you can sense or predict the arrival of Web 3.0?



Many well known online communities are using AJAX and other new programming paradigms for the Web and has also influenced Microsoft's .NET framework. See http://www.asp.net/ajax/ Prior to AJAX, a typical Web interaction had the client browser send messages to the server via a link, a URL or submitted form data and then wait for a response from the server, which may take time for server processing and for the client browser to receive and render a result on the screen. In AJAX the communication with the server is asynchronous so the browser does not wait long for the server response as small parts are displayed, resulting overall in a faster interaction 'look and feel' between the browser and the server.



Rapid database application development using 'frameworks' like Ruby on Rails, AJAX on Rails, TurboGears or Google Gears present a new architecture as part of the Web 2.0 developments. Three cases to look at here are:



• TurboGears at http://turbogears.org/  Do you agree with its rapid development approach?

• GoogleGears at http://gears.google.com/  See how the notion of 'an offline database' works. Examine the tools and reflect on the new knowledge that may be required in using Google Gears.

• Ruby on Rails at http://www.rubyonrails.org/  You can even download a pre-packaged solution that includes everything in one bundle: Web server, database, Ruby on Rails for both Windows (Instant Rails) and for MacOS X (Locomotive). [If you have time to go further then also test AJAX on Rails].


Reference:


Charles Sturt University ITC 594 E-system infrastructure development student study guide

Exercise 5: Database case study

Do EITHER Case A or Case B as your database case study for this exercise.




On your own machine, setup and test either database system and report your findings.

Case A: Microsoft SQL server

The relational DBMS uses Structured Query Language (SQL) as a standard. Microsoft SQL Server 2008 has support for .NET Framework, so that stored procedures can used be in any of the .NET languages. Microsoft Dreamspark at dreamspark.com is an interesting site for the student/developer using Microsoft products.



1. Investigate the. SQL Server 2008 architecture available from the Dreamspark website.



2. Test out the SQL Server Express as a lightweight application development tool. SQL Server 2008 Express Edition and report your findings.

Case B: PHP and MySQL

Since over three million PHP/MySQL open-source relational model and web-based database systems are over the Internet, let us taker a closer look at this popular system - as we can learn how many of the other systems operate, in similar ways.



As a GUI admin tool the phpMyAdmin tool is still widely used to setup and maintain a MySQL database and is available from phpmyadmin.net The most frequently used operations include creating and editing tables, fields, relations, indexes, users, permissions and deletions, as well as executing any SQL statement. Other MySQL GUI tools are found for Windows, MacOS and Linux users at dev.mysql.com/downloads/gui-tools/5.0.html



PHP is at http://php.net/ . The PHP engine works well with the Apache Web server

- and a MySQL server is also needed. PHP files end in .php; this triggers the web server to pass the file to the PHP program for parsing and execution. The PHP code is placed within an XML (or HTML) compliant tag and a semi-colon is used to end PHP instructions.



Reference:


Charles Sturt University ITC 594 E-system infrastructure development student study guide

Exercise 4: Network and Web programming frameworks

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


2. Frameworks for development. Compare and contrast any TWO of:

a. Java

b. .NET

c. Ruby on Rails

d. Turbo Gears

e. Google Gears

f. AJAX frameworks



Reference:


Charles Sturt University ITC 594 E-system infrastructure development student study guide

Exercise 3: From DNS and DHCP to Clouds and Grids

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


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

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

a. Virtual Private Network (VPN) or Grid computing services

b. Next generation of wireless mesh networks

c. Cloud or Social Cloud applications.

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



Explain what you interpret about that statement.



Reference:


Charles Sturt University ITC 594 E-system infrastructure development student study guide

Exercise 2: Finding 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?

Components of the online store

IBM (http://www.ibm.com/ ) describes some key e-commerce Web page terms relating to online business development. While the list can be quite long, here are a few terms those IBM uses, which give you an indication of the components of online shopping as a common form of e-commerce:



order list – A list of products that the user has identified as being under consideration for purchase, common to shopping cart sites.



order list page – A page that contains the order list.



product list – A list of products in the e-catalogue. Typically, the product list contains each product's name, price, and a very brief description. It is linked to more detailed information and may also include a mechanism for adding items to the order list.



product category navigation page – A page that presents product offerings grouped by categories, such as brand or intended usage.



product description page – A page that describes a product in detail and allows the user to add the product to the order list.



store front – A point or entry to an online store. Sometimes this page is the same as the company home page (http://www.companyname.com/ ). Other times it is separate (perhaps http://www.companyname.com/shop ).

Where did you find the e-commerce model?

An organisation needs to have an e-commerce model in place as a blueprint for

the development of the whole e-systems infrastructure. The e-commerce model is an abstraction of the infrastructure to be developed and serves as a

communication mechanism for the e-business application project team. A well developed application model, using Model View Controller (MVC) and Unified Modelling Language (UML), supports traceability throughout its elements and artefacts.



Figure 1.1 shows how an e-commerce model relates to business application development and the increasing use of new web and multimedia technologies. Part of your job may be to make connections from the current e-business application (e.g. E-catalogue, Shopping Cart), the E-commerce model and the latest technologies to the E-systems Infrastructure plans.







Figure 1.1: E-systems infrastructure as an expression of an e-commerce model.



The Internet: Architecture, protocols, standards and services

The Internet is an information pipeline, which grew out of ARPANet - a USA Department of Defense experiment. It was originally used exclusively for non- commercial (primarily academic) purposes, but the rules against commercial exploitation of the network have relaxed considerably in past years.



The Internet is a global network of networks or internetwork, which connects millions of users by packet switching technology. Packets are a constant length bit string transmitted as individual entities. Each packet sent across the Internet must follow the format of the Internet Protocol (IP), in order to distinguish between others type of data packets. IP packets are also called IP datagrams. Dedicated routers interconnect the various computer networks.



The Internet Architecture Board (IAB) is responsible for setting standards

relating to the Internet. The Internet Society (ISOC) ratifies IAB standards, which is a large body that all users of the Internet have the option of joining. Most of

the work that is carried out prior to a new standard being approved is by working parties of the Internet Engineering Task Force (IETF). Although most new standards are proposed initially be the IETF, any organisation can propose that a new protocol or technology becomes an approved standard.



To establish a new standard, you first need to submit a document as an Internet Draft. After a period of consultation with the research community you will then submit a modified version of the proposal as a Request For Comment (RFC). The IAB's RFC editor will allocate an RFC number to the proposal and it will be made available through the main RFC archive (along with mirror sites around the world). Finally, after a further period of consultation, the IAB may recommend that the RFC be submitted to the ISOC as a proposed new standard.

W3C

Standards associated with the World Wide Web are dealt with by a separate body, the World Wide Web Consortium (W3C) at http://w3.org. W3C develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential as a forum for information, commerce, communication, and collective understanding. This body is a consortium of representatives of the main companies involved in Web development. It was created to provide a faster mechanism for new standards to be approved, as the delays involved in the ISOC process were leading to defacto standards emerging and being superseded long before they were approved by the ISOC.

HTTP and HTTPS

Tim Berners-Lee defined HTTP in 1992 as a connectionless, stateless protocol where a transaction consists of:



Connection

The establishment of a connection by the client to the server - when using TCP/IP port 80 is the well-known port, but other non-reserved ports may be specified in the URL;

Request

The sending, by the client, of a request message to the server;

Response

The sending, by the server, of a response to the client.

Close

The closing of the connection by either both party



This is what happens when you use a browser to view the page at csu.edu.au



For secure transactions with the Secure Sockets Layer (SSL), the HTTP protocol is enhanced by the use of encryption to provide a secure link. This new protocol with SSL was called HTTPS. SSL is often used to transfer credit card numbers and other sensitive information and can be configured to appear in the location box (e.g. in your CSU online Subject Outline). The browser also uses a closed lock icon to indicate a secure site. More about security later in Topic 7.



Let us start with the fundamental Internet protocol suite and work our way through to the security aspects. TCP/IP takes us on a trip back in time . . .

TCP/IP

Transmission Control Protocol/Internet Protocol was developed in the late

1960's. TCP/IP is the protocol that is used by the Internet and World Wide Web. The layers do not follow the OSI model because it preceded the OSI model by almost a decade. Most of the services that we normally associate with the Internet are delivered via TCP/IP. These services include file transfer via File Transfer Protocol (FTP), remote login via the Telnet protocol, electronic mail distribution via the Simple Mail Transfer Protocol (SMTP), and access to the Web pages via the Hypertext Transfer Protocol (HTTP).

FTP

FTP (for File Transfer Protocol), allows users to move data files from computer to computer. The vast quantity and range of resources available through FTP made

it one of the most popular features of the Internet. Much of what is available this way is software - including anti-virus utilities, printer typefaces, games, graphics and updates of commercial software. There are FTP archives of software for most computers. Books, journals, reports and other documents are available through FTP. You can find and acquire copies of the lecture notes, status reports, e.g. NASA missions, and numerous reports. A typical session involves commanding an FTP program to connect to a remote FTP host specified by its network address; moving around in the directories on the host; and requesting the system to get the desired files. Unregistered or anonymous users can use access via FTP where users identify themselves literally as anonymous.

Remote Login – Telnet

Remote login, also called Telnet, allows users to connect to other computers and the services they run. One of the original ideas behind the Internet was to allow researchers to use programs and resources mounted on computers at other facilities. The Internet features tens of thousands of computers accessible via remote login. This worked fine when networks gave limited access, but now using raw telnet exposes your username and password to an 'eavesdropper'. So now we need the added protection of SSH.

SSH – secure shell protocol

The need for better security than FTP or telnet for corporate network services, and the use of HTTP as an FTP alternative, has led to the use of more secure ways to remotely access a network.



One of these secure alternatives is secure shell – SSH. A freely available Telnet/SSH client can be used called PuTTY. Secure copy or PSCP is another free tool to replace an FTP client on the Win32 platform. Secure Shell is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another. It provides strong authentication and secure communications (encryption) over unsecured channels. It is intended as a replacement for telnet, rlogin, rsh, and rcp. For SSH2, there is a replacement for FTP: sftp.

Recognising the Web 2.0 and other changes since 2005

You should recognise the way in which an online distributed business application is used, as it may have various technologies gathered over time - component technologies of HTTP, HTML, CGI, XML, dynamic clients, or session management mechanisms that use cookies to index a dictionary for a shopping cart site may creep into the infrastructure without quality planning.



Recent developments with Web 2.0 tools since 2005 has spawned the growth of social networks through use of RSS and development frameworks like Ruby On Rails and the move towards the use of common business applications online by 37signals.com and google.com



That is why it is important to get the technical knowledge of competing frameworks that has been developing for some years through efforts by SUN Java Systems or Microsoft .NET, or application servers like ZOPE and other open source systems.



These application servers built upon the previous foundations laid by the earlier Web servers from Apache or Microsoft IIS, as well as scripting environments like Python, ASP.net VB script and PHP etc. An understanding of the role of XML as a core technology in developing an e- systems architecture is also useful.

Cloud and grid architecture

Cloud and grid computing offer a cost effective solution to providing business, education and other services, often called 'utility computing'. They offer a solution to the many problems dealing with how to provide services, data storage and computing power to the user without the cost of maintaining and upgrading in the organisation alone. Grid computing is a cluster of computers using a parallel processing architecture where the CPU resources are shared across the network acting as one large computer. Cloud computing is a set of dynamically scalable, virtual services over the Internet. All you need is an Internet connection! Like a black box, you need not have control the 'cloud' that provides services, such as Google Documents or the applications and services at 37signals.com



Coupled with developments in mobile devices and geo-location in high speed broadband networks and service-oriented computing, cloud and grid computing subsequently involves increased use of remote services shared by many users.



As an example, Google applications offer the common business application online approach through its Goggle Documents, Google Maps and Google Earth applications, offering APIs for others to include their services in their own Web sites or applications.



Hence a trend towards complex applications being processed in the cloud, will involve infrastructure changes to include grid computing as an extension to the use of clustered data farms with large processing power and enormous storage capacity. All this would be beyond the capability of many small to medium businesses.

Take a video lesson under 10 minutes

What is Cloud Computing? Search for your own video lesson or try this: http://www.youtube.com/watch?v=6PNuQHUiV3Q



Reference:
Charles Sturt University ITC 594 E-system infrastructure development student study guide

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?

b. Is there a common thread and a local community sense in action?

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?

b. Are there any secure transactions not involving money?

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

What is your perspective? Developer or IT manager?

You may be interested in building Web applications, or network design or IT management. This subject has you researching and working with using some technologies for designing, building or managing Web applications. Whichever role you are to play, the learning journey will build concepts and ideas as a either a developer or IT manager.



At the same time, you are asked to consider examining the big picture - how each application contributes to the large scale needs of an organisation – planning, policy, competitive edge, knowledge management and the need for secure electronic transactions. You may want to do some research into the Model-View-Controller design approach, the Object-oriented UML design work and project management or into the use of extreme programming (XP) methods. One useful approach is to use rapid evolutionary prototyping.

Rapid evolutionary prototyping approach

A case history

In 1996, I was consulted on building an inaugural e-commerce site and intranet for a national insurance broking business, with over ninety branch offices across the nation. A lot of new Web technologies have developed since that time. We used a professional graphics designer for all logos, buttons and image maps and used PERL and CGI for all server-side interactivity. This was the beginning of a developing e-systems infrastructure for the company.



For the work breakdown structure, I used the 'builder metaphor' for developing Web applications. This is similar to a project homebuilder sub-contracting work to others, e.g. carpenter, electrician, concreter, cabinetmaker, carpet layer and painter. This approach was easier for me to handle as project manager and easier for the business client to understand the apparent costs associated with the Web site development. It was used in tandem with a Rapid Evolutionary Prototyping Approach.



The Rapid Evolutionary approach is recommended for small projects as a fluid approach consisting of two main phases:



1. evolutionary application prototyping; and

2. implementation.

After capturing the business requirements and the system specifications, the object modelling focused on what the system should do, rather than the how to. One of the attractions of this approach is that users see a visible, tangible system as construction takes place. One of the pitfalls occurs if the system becomes unstable or hard to maintain, once it is moved to the production site. Make sure that you include proper project management and quality techniques in your e-business application development.



In the final project report I recommended that any maintenance or site makeover be done with an outsourcing company. The intranet was in constant use, with some 'fine tuning' until 2001. A new site was released in early 2002 but looks vastly different in 2010. The reason the first design lasted for five-six years was that the site did what was required and the business needs were slow to change – until a corporate re-structuring.


Reference:


Charles Sturt University ITC 594 E-system infrastructure development student study guide