Thursday, April 1, 2010

Exercise 6: Web Form Design and Processing: A basis for e-commerce interaction

1. Design the form “Retrofit” the form data string below:

"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.


As has been the case for a number of exercises thus far, my limited programing background has meant questions such as this one have required quite a bit of research, for what is a very basic outcome. After reading Chapters 6 and 7 in the text (Ince, 2004) had some basic idea of web form design. I then did some research online how to create a html document and ended up eking one out simply using Microsoft Notepad. I did a search on the web for some existing html script that roughly matched what I was after and then basically modified this to "retrofit" the above data string. The resulting script may be viewed at the following link:


French Perfume HTML Script

When this is opened using a browser it looks like this. Not the most attractive website, but I like to think of it as functional.



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.


After searching some time to find a suitable script for this particular form I managed to find a script that validates the entries of the form and provides a pop-up reminder that certain fields must be completed before submitting the form. The script for this may be viewed at the following link:


JacaScript HTML Form Processing


In terms of the list involved in processing the code, this script is relatively basic. When the user clicks the "Submit" button the script kicks in and checks each field specified in the script for an entry and if it finds an empty field it displays the message "You are required to complete the following fields:" and then inserts the name of any field that is incomplete. If all specifed field are completed, the form is submitted.

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

This script can be relatively easily modified to process the form. The modified script, including the aforemention Java script is as follows:This script can be relatively easily modified to process the form. The modified script, including the aforemention Java script can be viewed at the floowing link:


HTML Script modfied to include Java


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


This has already been achieved through question 3 above. This Javascript feature checks the Name and Credit Card fields to make sure the user has completed them. If they haven't, a dialogue box is displayed, prompting the user to complete these fields. This can be seen in the below image:




Exercise 5: Database Case Study

Case A: Microsoft SQL server

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

This database case study presented the student with a number of options in terms of the database to examine as a case study. I have very limited exposure to databases and database servers, and the exposure I have had is extremely dated. As such, my knowledge of the more current databases and servers is limited. With this in mind, and noting that this blog is be drafted from the view of an IT Manager, rather than a developer, I thought I would go with Microsoft SQL Server Express (you think i would have learnt my lesson with Microsoft over the years with the issues with XP when it was released, and that debacle known as Vista which I think most of us would like to forget). My SQL experience, I ashamedly have to admit, is somewhat on par with Dilbert's manager in the below strip.



However, I did not let this lack of experience disuade me, and I navigated to the Microsoft Dreamspark website, so far so good. For those who might be interested a link to the website is included below.


To Microsoft's credit, the website looks user friendy and appears to offer a great array of Microsoft applications available to students to inform their studies. Included amongst these applications are Windows Server, SQL Server Express, SQL Server Developer and Visual Studio Ultimate among others. I chose to download SQL Server Express 2008 to my new netbook, as this is where I spend most of my time (usually on the road with work) working on my university assignments. The download of Microsoft SQL Server Express 2008 went relatively smoothly. This lured me into a false sense of security as I then went to install SQL Server Express, but to my surprise I received a message saying that I required Windows Installer 5 or greater on my PC in order to run SQL Server Express. On the face of it I thought this minor obstacle shouldn’t be too difficult to overcome as I'm not a complete computer numpty. Boy was I wrong!!!! Two hours later, and after pulling out of much hair I was still wrestling with my Netbook, trying to install Windows Installer 5 on my Netbook. I had downloaded it and attempted to install it, but the installer would get to a certain point, stall, and then just magically disappear without any explanation. I consulted the Microsoft knowledgebase, many forums and messed around with my Windows Update settings and script with no succes. Does anyone else find it ironic that I am having trouble installing that latest version of Windows Installer?

After many failed attempts, I bit the bullet and elected to install SQL Server Express on my old laptop. This also required a Windows Installer 5 update, but thankfully I was able to install it without incident on this particular PC. I then downloaded the SQL Server Express 2008 installer to my laptop and then commenced install. Two hours later, the install was complete, but with some errors. At this particular juncture, five hours had passed since I began this activity, and as yet, I had not even commence exploring the wonders that lie within SQL Server Express. Given that I was at the point of throwing my laptop out the nearest window and allowing gravity to assist in dissecting it into sub atomic particles, I decided it would be best if I retired for the evening, had a good nights sleep, and returned the following day to continue to wrestle with Bill Gates.


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

The following day, armed with a good nights sleep and a refilled glass of patience I return to my laptop. To begin with I watched a ten Minute "propaganda" style You Tube video which provides good basic overview of SQL Server 2008 and its capabilities.


Microsoft says that SQL Server Express is powerful and reliable with a rich set of features. Microsoft also says that it is the ideal platform for learning they say that it is ideal for building desktop applications and small server applications. With my limited experience, I am no position to question these claims, but after playing around with it for a couple of hours and taking a couple of introductory turorials it would seems to be that it is easy enough to learn and would be well suited for the development of small server applications. Having said this, it does appear to have a number of technical restrictions which make it undesirable for large-scale deployments including the fact that
it has a maximum database size of 4 GB per database and has a number of hardware limits including single physical CPU only utilisies1 GB of RAM regardless of the amount of RAM installed. However, beggars shouldn't be choosers as this software is free. Should would be developers require something more powerful, I would imagine that would spring the $100 odd dollars to by the developer versions of SQL Server.

These descriptions limitations should not dissuade anyone from using SQL Server Express 2008. From my brief exposure to it, it seems a full featured and robust SQL Server engine. I followed through a number of You Tube introductory lessons which stepped through querying of databases, creating tables and a number of other basic database functions.

From working through these introductory lessons and experimenting with SQL Server Express 2008 it would seem that the use of SQL Server is relatively easy to learn, however is not completely intuitive and requires some instruction. For someone like me, who has a limited background in SQL, this presented a steep learning curve initially, but after repeating a few functions they seems to become second nature relatively quickly. Given the fact that the install of the application was harder than it should have been, I probably did not examine the application with the rigour that I probably should have. However, I did toy with ity long enough to discover, despite my install probelms, that it is a well put together and developed application. For those used to the Microsoft style interfaces, the use of SQL Server Express 2008 presents and attracting option as your databse server of choice. All in all, it seems that SQL sever express 2008 would besuited as a lightweight application development platform. However, developers would need to seek a more powerful application for anything greater than lightweight application development due to the limitations dicussed previously.

Friday, March 5, 2010

Exercise 4: Network and Web programming frameworks

Exercise 4: Network and Web programming frameworks

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

As stated in Wikipedia (2010) Client/server computing or networking is a distributed application architecture that partitions tasks or work loads between the server and the clients. Often clients and servers operate over a computer network on separate hardware. A server machine is a high-performance host that is running one or more server programs which share its resources with clients. A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await (listen to) incoming requests.

Whatis.com (2010) describes a peer to peer network is any distributed network architecture composed of participants that make a portion of their resources, such as processing power, disk storage or network bandwidth, directly available to other network participants, without the need for central coordination instances (such as servers or stable hosts). Peers are both suppliers and consumers of resources, in contrast to the traditional clinet/server model discussed above where only servers supply, and clients consume.

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

a. Java

b. .NET

c. Ruby on Rails

d. Django

e. Google App engine

f. AJAX frameworks


I have not done a lot of programming, especially not recently so am not in a position to provide comment from personnel experience with any of the above web frameworks. Having read up a little on all of these frameworks I have decided to compare Java and Ruby on Rails, mainly because from what I have read, Java appears to be the old kid on the block having appeared on the scene over ten years ago, and Ruby on Rails the new kid. Having said this, both appear to be popular frameworks within the development world.


From my brief research it would appear that Java does require a more solid software engineering approach to do well whereas Ruby on Rails can be learnt relatively quickly and easily. However, Java appears to have greater underlying capabilities with its scalability being more solid, and security is tighter. The drawback is Java is a far more challenging environment to get started in, but ultimately it will result in a far more solid end product if you perservere. Ruby on Rails appears very easy to get into with a realtively short learning curve. There also appears to be plenty of tutorials and code libraries online that can assist would be newbie programmers (Flanagan, 2005).


Both the Java web development framework and the Ruby On Rails web framework have a number of things in common in that they both utilise object oriented language, they both use Model View Controller Architecture and both are easier to utilise and maintain than other frameworks with use different languages. But there are distinct differences between the two as well. Java has to be compiled into a binary executable before execution, where as Ruby is interpreted at the time of execution allowing for faster development and processing. Java is statically typed, whilst Ruby is dynamic. Java’s coding effort is much greater and more complex than that of Ruby on Rails. Ruby on Rails allows a much greater ability to produce rapid applications through the use of scaffolding (Holzner, 2006). The following video provides a mildly entertaining brief comparison between the two, highligting the simplicity of Ruby on Rails.


Ruby On Rails versus Java


In terms of which web framework is better, this appears to have generated much debate over the past couple of years. From what I can tell it all depends on your background and level of knowledge of programming, Many sell Ruby on Rails as being superior because of its simplicity and ease of use, however those with solid software engineering background may be able to produce a more solid and secure product using Java. However, for generation Y, who want things now, I would say Ruby on Rails is better suited. Also, from a management perspective, Ruby on Rails reduces the load on the System Developer, and presents a more effecient option than Java in terms of time taken to develop an application.