1. Conduct research on the Internet to find out what tools can be used to parse an XML document and ensure that the document is well formed and valid.
Parser is an essential tool for reading and modifying XML document. The term ‘parser’ is sometimes interchangeable with 'processor'. Any program that input an XML file and produces the output based on the XML files content is an XML processor. An XML browser is a kind of processor. A parser is software that performs the first step in the processing of an XML document. Parser is almost always used as part of an XML processor. The foundation task of a parser is checking the XML document for well-formed data, and make sure the documents content follows the rules of XML syntax. Most of the parsers can check the document for validity by checking against Document Type Definition (DTD) or Schema. The final task of the parser may perform to make the content of the document, both marks-up and data, available to the processing software. SAX (Simple API for XML) API or Document Object Model (DOM) API does this (Devshed, 2009).
The following are some popular parsers for validating XML documents to be well formed:
• Altova XMLspy (Altova, 2008);
• MSXML - Microsoft XML Core Services (Microsoft Corporation, 2008);
• Expat (Clark, 1999).
2. What are the benefits of adopting a schema standardized for a business sector?
The benefits of adopting schema standards for a business sector are summarized below (Sugamata, 2004):
• to facilitate sharing of information between business;
• to ensure interoperability between corporate systems;
• to improve efficiency in onsite production, core distribution and operation;
• to established a sophistically level of computerization in product traceability and recycle fields;
• to form a seamless information sharing platform.
3. SMIL is an application of XML. What is the purpose of this technology? Where does it apply?
SMIL is Synchronized Multimedia Integration Language and SMIL documents are XML 1.0 documents. Purposes of SMIL are to enable the integration sets of independent multimedia objects into a synchronized multimedia presentation. Functions of SMIL can be summarized as follows (Hoschka, 1998):
• to detail the temporal behaviour of the presentation;
• to detail the layout of presentation’s screen;
• to embed hyperlinks into various media objects.
Providing captions enables media that contains spoken or other audio information (on-or off-screen sound effects, or background music) important to understanding the media’s content to be accessible to anyone who has difficulty hearing, or is unable to hear, the media soundtrack. SMIL is an open standard created by the World Wide Web Consortium (W3C) - and therefore in theory media player or format-independent - for creating accessible media through combining caption and audio description files with media files and providing information on their synchronisation and display. General Principles
SMIL is based on Extensible Markup Language (XML). Version 1.0 has been around since 1998; the specification for version 2.0 was published at the beginning of 2005. A SMIL file is a simple text file, so like HTML; it can be created using a basic text editor. In practice, though, they are created more effectively and quickly using authoring software like MAGpie.
Wednesday, May 13, 2009
Exercise 10
1. Go to the website of IBM, Oracle, Microsoft and Sybase.
The followings are some application servers in competition with ZOPE:
• EAServer version 5.2 of SyBase;
• JBoss version 5.0.0 Beta released on 10 Feb 2008;
• IBM WebSphere Application Server V6.1 released on May 26, 2006;
• Microsoft Windows Server 2003 Service Pack 2 released on 3 December 2007.
The development cycle of Internet Software is much shorter than other business software. Those giant internet software companies like Google would conduct real time monitoring on user behaviour to see just which new features are used, and how they are used, thus becomes another required core competency. Some a web developer of online services reckons that they would put new features on their sites every day for users to try. If users like the new features, they would leave them. Otherwise, the new features would be removed. Similarly, Cal Henderson, the lead developer of Flickr remarked that they deploy new build up to half an hour (O’Relly, 2005). Regarding other business software, their development cycle is in years.
2. Why is the perception getting stronger that integration will become a critical factor in coming days? What is the role of AJAX within the enterprise software architecture?
The reasons that IBM website, and found that they do mention data management associated with e-commerce and they even publish a paper “Customer Care Solutions for the Communications Industry - Driving Business Value with Master Data Solutions”.
Regarding open source software, IBM foresees a great potential in their development. That is reason IBM joined EnterpriseDB’s C round of venture financing which in total raises US$10 million for the open source database vendor in March 2008 (Kerner, 2008).
The role of AJAX within the enterprise software architecture, organizations need a usable front-end, or interfaces, that allows business users to fully exploit the full benefits of a service-oriented framework. This is no small issue, as it is critical for users across the extended enterprise to be able to easily access and interact with the resources within a service-oriented architecture (SOA) in order to make a difference in how they work. For that, they need a user-interface that does what they need from a business standpoint, but is also flexible and cost effective from an IT standpoint.
In my opinion, AJAX rich application interfaces are clearly the best tool out there for putting together a front-end that lets companies really go to town with a service based approach to integrating online information.
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)?
The reason that for stronger perception that integration will be a critical factor in coming days are summarized below (Nah & LAU, 2001):
• the growing need to anticipate, response and react the growing demands of marketplace or perish;
• fiercely competition environment among companies globally;
• business success and survival are determined by effective business strategy centres on aggressive and effective use of information technology;
The role of ERP – Enterprise Resource Planning are to:
• automate and integrate business processes in an organization;
• share use of common data and methods across the entire organization;
• generate, update and access information in a real-time mode.
ActionScript 2.0 is an object-oriented is a formal and familiar approach to object-oriented programming (OOP) which including full support for classes, inheritance, interfaces and other common OOP concepts. OOP is an option approach to developing applications by using an additional set of language elements (DeHaan, 2005). But In Ruby everything is an object (Alameda, 2008).
The followings are some application servers in competition with ZOPE:
• EAServer version 5.2 of SyBase;
• JBoss version 5.0.0 Beta released on 10 Feb 2008;
• IBM WebSphere Application Server V6.1 released on May 26, 2006;
• Microsoft Windows Server 2003 Service Pack 2 released on 3 December 2007.
The development cycle of Internet Software is much shorter than other business software. Those giant internet software companies like Google would conduct real time monitoring on user behaviour to see just which new features are used, and how they are used, thus becomes another required core competency. Some a web developer of online services reckons that they would put new features on their sites every day for users to try. If users like the new features, they would leave them. Otherwise, the new features would be removed. Similarly, Cal Henderson, the lead developer of Flickr remarked that they deploy new build up to half an hour (O’Relly, 2005). Regarding other business software, their development cycle is in years.
2. Why is the perception getting stronger that integration will become a critical factor in coming days? What is the role of AJAX within the enterprise software architecture?
The reasons that IBM website, and found that they do mention data management associated with e-commerce and they even publish a paper “Customer Care Solutions for the Communications Industry - Driving Business Value with Master Data Solutions”.
Regarding open source software, IBM foresees a great potential in their development. That is reason IBM joined EnterpriseDB’s C round of venture financing which in total raises US$10 million for the open source database vendor in March 2008 (Kerner, 2008).
The role of AJAX within the enterprise software architecture, organizations need a usable front-end, or interfaces, that allows business users to fully exploit the full benefits of a service-oriented framework. This is no small issue, as it is critical for users across the extended enterprise to be able to easily access and interact with the resources within a service-oriented architecture (SOA) in order to make a difference in how they work. For that, they need a user-interface that does what they need from a business standpoint, but is also flexible and cost effective from an IT standpoint.
In my opinion, AJAX rich application interfaces are clearly the best tool out there for putting together a front-end that lets companies really go to town with a service based approach to integrating online information.
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)?
The reason that for stronger perception that integration will be a critical factor in coming days are summarized below (Nah & LAU, 2001):
• the growing need to anticipate, response and react the growing demands of marketplace or perish;
• fiercely competition environment among companies globally;
• business success and survival are determined by effective business strategy centres on aggressive and effective use of information technology;
The role of ERP – Enterprise Resource Planning are to:
• automate and integrate business processes in an organization;
• share use of common data and methods across the entire organization;
• generate, update and access information in a real-time mode.
ActionScript 2.0 is an object-oriented is a formal and familiar approach to object-oriented programming (OOP) which including full support for classes, inheritance, interfaces and other common OOP concepts. OOP is an option approach to developing applications by using an additional set of language elements (DeHaan, 2005). But In Ruby everything is an object (Alameda, 2008).
Exercise 09
1. Design the form
“Retrofix” the form data string would be as follows:
2. Write the script
The PERL script to process html form, and found a power point detailing the main steps in processing the form as follows (Heriot-Watt University, n.d.):
a. Store the form data as variable: $customer = param(”name”);
b. Print the html codes to response to the submitted data using the stored variable values: print “Dear Value Customers: ”.$customer.”
”;
c. Store the order data into database or text file for further processes using the submitted data: print OUT $customer . ” ordered a ” .$order. ” with “.$card. ” no. “.$number.”\n”;
3. Can you modify the script to process the form?
#!/usr/bin/perl
use CGI qw(:standard);
$customer = param(”name”);
$order=param(”order”);
$card=param(”card”);
$number=param(”number”);
print “Content-type: text/html\n\n”;
print “Dear Value Customers: ”.$customer.”
”;
print “Thankyou for ordering a ” .$order.” with us using your “.$card.” card.
”;
print “After payment confirmed, Your order would be delivered within 7 days.”;
open(OUT, “>>outfile.txt”);
print OUT $customer. ” ordered a ” .$order. ” with “.$card. ” no. “.$number.”\n”;
close(OUT);
The output of the Perl script “PlaceOrder.pl” would be as follows:
Content of the output file “outfile.txt” would be as follows:
Evan Burke ordered a French perfume with Visa no. 8433261344895544
“Retrofix” the form data string would be as follows:
2. Write the script
The PERL script to process html form, and found a power point detailing the main steps in processing the form as follows (Heriot-Watt University, n.d.):
a. Store the form data as variable: $customer = param(”name”);
b. Print the html codes to response to the submitted data using the stored variable values: print “Dear Value Customers: ”.$customer.”
”;
c. Store the order data into database or text file for further processes using the submitted data: print OUT $customer . ” ordered a ” .$order. ” with “.$card. ” no. “.$number.”\n”;
3. Can you modify the script to process the form?
#!/usr/bin/perl
use CGI qw(:standard);
$customer = param(”name”);
$order=param(”order”);
$card=param(”card”);
$number=param(”number”);
print “Content-type: text/html\n\n”;
print “Dear Value Customers: ”.$customer.”
”;
print “Thankyou for ordering a ” .$order.” with us using your “.$card.” card.
”;
print “After payment confirmed, Your order would be delivered within 7 days.”;
open(OUT, “>>outfile.txt”);
print OUT $customer. ” ordered a ” .$order. ” with “.$card. ” no. “.$number.”\n”;
close(OUT);
The output of the Perl script “PlaceOrder.pl” would be as follows:
Content of the output file “outfile.txt” would be as follows:
Evan Burke ordered a French perfume with Visa no. 8433261344895544
Exercise 08
1. Start with a simple table in the database:
mysql> SELECT * FROM employees;
A database named my database is created in my Apache Server for testing this Exercise and the corresponding table employees with the following structures are created.
The above is copied from the websites phpMyAdmin installed in my server for management of database.
2. Create a web page with the following PHP:
The program codes are modified to suit the version of PHP, MySQL and Apache Server installed in my desktop:
$host=”localhost”;
$user=”root”;
$password=”″;
$db=”mydatabase”;
$cxn = mysqli_connect($host,$user,$password,$db) or die (”Could not connect to Server”);
$sql=”SELECT * FROM employees”;
$result = mysqli_query($cxn,$sql)
or die(”Couldn’t execute select query.”);
$row = mysqli_fetch_assoc($result);
echo “First Name: “, $row["First"], “
”;
echo “Last Name: “, $row["Last"], “
”;
echo “Address: “, $row["Address"], “
”;
echo “Position: “, $row["Position"], “
”;
?>
3. This is how we can add a record and is part of a file to create called add_record.html:
The output form of the browser is as follows:
4. The corresponding PHP file is add_record.php used with the POST method:
The PHP file is to add new employee record, modified as follows:
$host=”localhost”;
$user=”root”;
$password=”″;
$db=”mydatabase”;
$cxn = mysqli_connect($host,$user,$password,$db) or die (”Could not connect to Server”);
$first=$_POST['first'];
$last=$_POST['lsat'];
$address=$_POST['address'];
$position=$_POST['position'];
$sql=”INSERT INTO employees (First, Last, Address, Position)
VALUES (’$first’,'$last’,'$address’,'$position’)”;
$result = mysqli_query($cxn,$sql)
or die(”Couldn’t execute select query.”);
if ($result == 1)
{ echo “Thank you! Your information has been entered.”;}
else {echo “Sorry, there’s a problem”;}
?>
The output of the PHP programme after successful adding employee’s record is as follows:
Thank you! Your information has been entered.
mysql_select_db(“mydatabase",$db);
$result = mysql_query("INERT INTO employees (first,last,address,position) VALUES ('$first','$last','$address','$position')");
if ($result == 1) { echo "Thank you! Your information has been entered.";
} else {
echo "Sorry, there's a problem";
}
?>
5. The last code example shows how to get multiple records:
The html file with the following codes is created for initiating actions to list all the employee’s records:
The form would be displayed as follows:
The corresponding PHP file “List_employee.php” with the following program codes is created:
$host=”localhost”;
$user=”root”;
$password=”″;
$db=”mydatabase”;
mysql> SELECT * FROM employees;
A database named my database is created in my Apache Server for testing this Exercise and the corresponding table employees with the following structures are created.
The above is copied from the websites phpMyAdmin installed in my server for management of database.
2. Create a web page with the following PHP:
The program codes are modified to suit the version of PHP, MySQL and Apache Server installed in my desktop:
$host=”localhost”;
$user=”root”;
$password=”″;
$db=”mydatabase”;
$cxn = mysqli_connect($host,$user,$password,$db) or die (”Could not connect to Server”);
$sql=”SELECT * FROM employees”;
$result = mysqli_query($cxn,$sql)
or die(”Couldn’t execute select query.”);
$row = mysqli_fetch_assoc($result);
echo “First Name: “, $row["First"], “
”;
echo “Last Name: “, $row["Last"], “
”;
echo “Address: “, $row["Address"], “
”;
echo “Position: “, $row["Position"], “
”;
?>
3. This is how we can add a record and is part of a file to create called add_record.html:
The output form of the browser is as follows:
4. The corresponding PHP file is add_record.php used with the POST method:
The PHP file is to add new employee record, modified as follows:
$host=”localhost”;
$user=”root”;
$password=”″;
$db=”mydatabase”;
$cxn = mysqli_connect($host,$user,$password,$db) or die (”Could not connect to Server”);
$first=$_POST['first'];
$last=$_POST['lsat'];
$address=$_POST['address'];
$position=$_POST['position'];
$sql=”INSERT INTO employees (First, Last, Address, Position)
VALUES (’$first’,'$last’,'$address’,'$position’)”;
$result = mysqli_query($cxn,$sql)
or die(”Couldn’t execute select query.”);
if ($result == 1)
{ echo “Thank you! Your information has been entered.”;}
else {echo “Sorry, there’s a problem”;}
?>
The output of the PHP programme after successful adding employee’s record is as follows:
Thank you! Your information has been entered.
mysql_select_db(“mydatabase",$db);
$result = mysql_query("INERT INTO employees (first,last,address,position) VALUES ('$first','$last','$address','$position')");
if ($result == 1) { echo "Thank you! Your information has been entered.";
} else {
echo "Sorry, there's a problem";
}
?>
5. The last code example shows how to get multiple records:
The html file with the following codes is created for initiating actions to list all the employee’s records:
The form would be displayed as follows:
The corresponding PHP file “List_employee.php” with the following program codes is created:
$host=”localhost”;
$user=”root”;
$password=”″;
$db=”mydatabase”;
Exercise 07
1. The HTML file named as “SUBMIT_FORM.HTML” with the following codes are created:
The output of the html form is as follows:
What’s your name? (Then press RETURN)
2. Then, the PHP file named as submit.php with the following codes are created:
echo "Hello, ", $myname;
?>
The output would be Hello, without printing “myname”.
Insert the line below in order to enable the printing of the submitted name:
$myname=$_GET["myname"];
With the modified submit.php, the output becomes Hello, Lawrence.
The output of the html form is as follows:
What’s your name? (Then press RETURN)
2. Then, the PHP file named as submit.php with the following codes are created:
echo "Hello, ", $myname;
?>
The output would be Hello, without printing “myname”.
Insert the line below in order to enable the printing of the submitted name:
$myname=$_GET["myname"];
With the modified submit.php, the output becomes Hello, Lawrence.
Exercise 06
1. In this exercise with can call up and examine some environment variables on the server.
I have done my exercise at local computer, installed with Apache Server version 2.0.63, MySQL version 5.0.51a and PHP version 5.2.5. I tried to examine the environment variable using the following codes as given in study guide:
The same code by replacing with $REMOTE_ADDR $SERVER_NAME, or $PHP_SELF
The output would be “You are connected from:” without the value of the environment variable of $REMOTE_ADDR. The reason might be due to the difference in OS platform or the version of PHP. I search the internet and able to find out the right programme codes for printing the environment variable as follows:
echo “
”;
?>
The result of the output is: You are connected from: 127.0.0.1.
Then I revise the codes as following:
echo “
”;
?>
The output is: “The Server Name is: localhost”
By examining the environment variable “PHP_SELF”, I then change the code as:
echo “
”;
?>
The output is: “The Name of PHP File is: /ITC594/ex6.php”
2. Create a web application called "hello_world.php" which contains in the body.
The program codes of Hello_World.php are as follows:
$myvar = “Hello World!”;
echo $myvar;
?>
View Hello_World.php using browser with a link:
http://localhost/ITC594/hello_world.php
The output is: Hello World!
I have done my exercise at local computer, installed with Apache Server version 2.0.63, MySQL version 5.0.51a and PHP version 5.2.5. I tried to examine the environment variable using the following codes as given in study guide:
The same code by replacing with $REMOTE_ADDR $SERVER_NAME, or $PHP_SELF
The output would be “You are connected from:” without the value of the environment variable of $REMOTE_ADDR. The reason might be due to the difference in OS platform or the version of PHP. I search the internet and able to find out the right programme codes for printing the environment variable as follows:
echo “
”;
?>
The result of the output is: You are connected from: 127.0.0.1.
Then I revise the codes as following:
echo “
”;
?>
The output is: “The Server Name is: localhost”
By examining the environment variable “PHP_SELF”, I then change the code as:
echo “
”;
?>
The output is: “The Name of PHP File is: /ITC594/ex6.php”
2. Create a web application called "hello_world.php" which contains in the body.
The program codes of Hello_World.php are as follows:
$myvar = “Hello World!”;
echo $myvar;
?>
View Hello_World.php using browser with a link:
http://localhost/ITC594/hello_world.php
The output is: Hello World!
Exercise 05
1. Investigate a simple chat client/server system. Look at some program code and describe how it works with multiple users.
To find a webpage detailing the creating a multithread client/server chat system using Java. Multiple users are handled in the following manner:
• A socket would be opened for each specified host and port connected to the server; an object ChatClient would be created for each host with their specified input and output socket stream;
• The server would keep a list of active connections in a static Vector and would synchronize the static Vector for new connections and closed connections;
• The server would monitor each ChatClient for any input socket stream. Once there are input socket stream, the server would read the stream and rebroadcast the string to output stream all the connected ChatClient.
2. Describe the important and distinguishing properties of Peer to Peer computing and the Grid. How is this peer to peer and the Grid architecture changing work flow and service-oriented applications?
Grid Computing is a parallel distributed system which facilitate the sharing, selecting, collaboration of resources distributed across different networks whereas Peer to Peer network consists of number of computers connected together to facilitate sharing of resources much data in form of files.
Main goal of Grid computing is to merge resources distributed over the connected networks to perform massive computation whereas Peer to Peer network is take advantage of the idle cycles and storage of distributed computers to enable mainly file sharing purposes (Ledlie, Shneidman, Seltzer & Huth, 2003; Cope, 2002).
With service orientated applications implemented in Grid or Peer to Peer networks, the work flow of service orientated application need to address the following requirements (Harold, N. D.):
• the mobility of objects, transaction, applications and data storage;
• to implement security measure for their components regardless of their physical location;
• to maintain referential integrity of all data regardless of their state and physical locations;
• to cope of active changes of their components at any time with the transaction integrity being maintained;
• to support multiple instance of the components;
• to facilitate real time view on details of the components at all time;
• to support failover and real time recovery of the components;
• to enable multi devices such as servers, PC and wireless appliances to access data, application logic and storage of complex transaction.
3. Frameworks for development. Compare and contrast any TWO of:
Compare Java and .Net (Wikipedia, 2008)
Item Java .Net
Market Presence Java is opening sourced and can be implemented in various operation systems and environment. Although Common Language Runtime of .Net is a cross-platform standards. The primary platform with .NET is still Windows. That is why Java’s popularity in open-sourced project is much higher than other languages.
Standardization To date, no part of Java has been standardized by Ecma, the ISO, and the ANSI. Part of the .NET executable environment (known as the Common Language Infrastructure, or CLI), and .NET executable format (known as Common Intermediate Language, or CIL) are standardized by international Standardization bodies such as Ecma, the ISO, the ANSI.
License Java’s class libraries are completely open-source except those licensed by SUN from 3rd parties. Only part of the .NET CLI executable environment and some of the corresponding class library have been standardized and can be freely implemented without a license. Other parts of the executable environment of .Net would still require license.
Community Sun’s accepts third-party contributions. Microsoft has developed C# and .NET without a formal community contribution system,
To find a webpage detailing the creating a multithread client/server chat system using Java. Multiple users are handled in the following manner:
• A socket would be opened for each specified host and port connected to the server; an object ChatClient would be created for each host with their specified input and output socket stream;
• The server would keep a list of active connections in a static Vector and would synchronize the static Vector for new connections and closed connections;
• The server would monitor each ChatClient for any input socket stream. Once there are input socket stream, the server would read the stream and rebroadcast the string to output stream all the connected ChatClient.
2. Describe the important and distinguishing properties of Peer to Peer computing and the Grid. How is this peer to peer and the Grid architecture changing work flow and service-oriented applications?
Grid Computing is a parallel distributed system which facilitate the sharing, selecting, collaboration of resources distributed across different networks whereas Peer to Peer network consists of number of computers connected together to facilitate sharing of resources much data in form of files.
Main goal of Grid computing is to merge resources distributed over the connected networks to perform massive computation whereas Peer to Peer network is take advantage of the idle cycles and storage of distributed computers to enable mainly file sharing purposes (Ledlie, Shneidman, Seltzer & Huth, 2003; Cope, 2002).
With service orientated applications implemented in Grid or Peer to Peer networks, the work flow of service orientated application need to address the following requirements (Harold, N. D.):
• the mobility of objects, transaction, applications and data storage;
• to implement security measure for their components regardless of their physical location;
• to maintain referential integrity of all data regardless of their state and physical locations;
• to cope of active changes of their components at any time with the transaction integrity being maintained;
• to support multiple instance of the components;
• to facilitate real time view on details of the components at all time;
• to support failover and real time recovery of the components;
• to enable multi devices such as servers, PC and wireless appliances to access data, application logic and storage of complex transaction.
3. Frameworks for development. Compare and contrast any TWO of:
Compare Java and .Net (Wikipedia, 2008)
Item Java .Net
Market Presence Java is opening sourced and can be implemented in various operation systems and environment. Although Common Language Runtime of .Net is a cross-platform standards. The primary platform with .NET is still Windows. That is why Java’s popularity in open-sourced project is much higher than other languages.
Standardization To date, no part of Java has been standardized by Ecma, the ISO, and the ANSI. Part of the .NET executable environment (known as the Common Language Infrastructure, or CLI), and .NET executable format (known as Common Intermediate Language, or CIL) are standardized by international Standardization bodies such as Ecma, the ISO, the ANSI.
License Java’s class libraries are completely open-source except those licensed by SUN from 3rd parties. Only part of the .NET CLI executable environment and some of the corresponding class library have been standardized and can be freely implemented without a license. Other parts of the executable environment of .Net would still require license.
Community Sun’s accepts third-party contributions. Microsoft has developed C# and .NET without a formal community contribution system,
Subscribe to:
Posts (Atom)