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
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment