Publishing Dynamic Information

95
Reference: 1.0, Issued (2 nd September 2004) Publishing Dynamic Information A study of methods and three examples The purpose of this project is to investigate technology that can publish, specifically, dynamic information, using a common interface such as a Web Browser. An important factor in doing this project is to help the Author’s Cost Centre, the Data and IP Integration and Test Centre which is part of BT Exact. Graham Butcher

description

Its performance lte

Transcript of Publishing Dynamic Information

Publishing Dynamic Information

Publishing Dynamic InformationGraham Butcher

Reference: 1.0, Issued (2nd September 2004)

Publishing Dynamic Information

A study of methods and three examples

The purpose of this project is to investigate technology that can publish, specifically, dynamic information, using a common interface such as a Web Browser. An important factor in doing this project is to help the Authors Cost Centre, the Data and IP Integration and Test Centre which is part of BT Exact.

Graham Butcher

Contents1Chapter 1 : Introduction and Objectives

11.1 Project and Work Objectives

11.2 Document structure

21.3 Readership

21.4 Technical Assumptions

21.5 Stakeholders of the report, Motivation for writing and Business Case

4Chapter 2 : Overview of available technologies and assessment of their suitability

42.1 Introduction

42.2 Web Server Side Coding Methods

42.2.1 CGI Type Solutions

62.2.2 Solutions using Apache, PHP and MySQL

82.2.3 Simple Microsoft/ASP type solutions using IIS, PWS, MS Access

112.3 Total Development Environment Methods

112.3.1 Cold Fusion Server and Development Environment

182.3.2 Advanced MS solutions using Visual Studio.NET

222.3.3 Third Party, Software Development Tools

242.4 Enterprise Wide Systems

252.5 Other topics relevant to producing Database driven Web Pages

252.5.1 Client versus Server side scripting and programs

252.5.2 Use of ODBC for connecting to databases

262.5.3 Whats Oracles contributions to the discussion?

262.5.4 Security

262.6 A comparison of different solutions

29Chapter 3: An overview of the three working examples produced during the project

293.1 Inventory and Calibration System Concert

313.2 Enhanced Lab Equipment, Asset Register UKIP

333.3 Enhanced Document Management System XGH1

36Chapter 4: Details of the first example, Concert Test Equipment & Calibration Details solution

364.1 Requirements

364.2 Background.

374.3 Problem analysis

414.4 Functional analysis of web-access to DBs

414.5 Practical advice

414.6 Heuristics

414.7 High level development

414.8 Scalability

414.9 Ease of maintenance

414.10 Technologies v non-functional requirements

414.11 Design and Development of Solution

43Chapter 5: Details of second example, the UKIP Asset Register

435.1 Requirements

435.2 Background.

435.3 Problem analysis

475.4 Functional analysis of web-access to DBs

475.5 Practical advice

475.6 Heuristics

475.7 High level development

475.8 Scalability

475.9 Ease of maintenance

475.10 Design and Development of Solution

50Chapter 6: Details of third example, Centres Documentation Management System

506.1 Requirements

506.2 Background

506.3 Problem analysis

536.4 Design and Development of Solution

55Chapter 7: Evaluation of Solutions

557.1 Evaluation of solution 1

557.2 Evaluation of solution 2

567.3 Evaluation of solution 3

58Chapter 8: Recommendations

588.1 General Recommendations

588.2 Recommendations from Solution 1

588.3 Recommendations from Solution 2

598.4 Recommendations from Solution 3

61Chapter 9: Conclusions

619.1 Conclusions from Solution 1

619.2 Conclusions from Solution 2

619.3 Conclusions from Solution 3

619.4 Overall Conclusions

619.4.1 Use of Total Development Environments

629.4.2 Reliability and Robustness of Solutions Produced

629.4.3 Use of Skills Developed during the Project for the benefit of the Test Centre

63Chapter 10: Acknowledgements

63Chapter 11: References

64Chapter 12: Appendix A Source Code for all Solutions

64Chapter 13: Appendix B Glossary

Chapter 14: 66Appendix C CodeCharge Product Feature Details

66Application Builder

66Integrated Development Environment (IDE)

66Form and Component Builders

67Visual Query Builder

68Security Management/Role-based Access Control

68Support for Multiple Programming Languages

68Extensibility

68Multiple Database Connections

68Microsoft FrontPage Integration

69Integration with Other Products

69Extensive Database Support

70Application Templates (Solutions)

70Custom Code and Actions

71Code Generation Engine

72Sample Databases

72Chapter 15: Appendix D ColdFusion Features

Figures5Figure 1 - Example of an Application that uses CGI and Perl, Autosave Router Configurations

6Figure 2 - An example of WODA

8Figure 3 - Web interface for MySQL management and administration

9Figure 4 - An example of ASP 3.0

11Figure 5 - MacroMedia's own description of ColdFusion plus the Price

14Figure 6 - An Example of CFML

16Figure 7 - CFML page

16Figure 8 - CFML with error

18Figure 9 - Microsoft's pricing for Visual Studio.Net

20Figure 10 - Web Matrix, design window

20Figure 11 - SQL Server control panel

22Figure 12 - Details of CodeCharge Studio's pricing structure

23Figure 13 - CodeCharge Studio IDE

27Figure 14 - PHP - ASP.Net comparison table from ref [5]

28Figure 15 - Author's comparison table

30Figure 17 - View of Assets Table

30Figure 18 - Login, obtain password page

31Figure 19 - Simple search page of UKIP Inventory

32Figure 20 - Power search of UKIP Inventory

33Figure 21 - Documentation System, database chooser

34Figure 22 - Documentation System, search for "Peakflow dos"

34Figure 23 - Show versions of "Peakflow DOS upgrade ..."

35Figure 24 - Requested document retrieved to users web browser

37Figure 25 - Starting point, existing NVT database - MS access

37Figure 26 - Existing database, view of Assets

39Figure 27 - Flowchart showing choices made for first solution

40Figure 28 Features provided with Easily.co.uk Web hosting

44Figure 29 Original user interface to UKIP Inventory database

44Figure 30 - Analysis of tables and relationships in UKIP Inventory database

46Figure 31 - Flowchart showing decisions made for solution 2

51Figure 32 - Analysis of FileStore "back end" database

52Figure 33 - Flowchart to show decisions made for solution 3

53Figure 34 - CodeCharge Query Builder, covering 3 tables

Copyright

British Telecommunications plc, 2004. All rights reserved.

BT maintains that all reasonable care and skill has been used in the compilation of this publication. However, BT shall not be under any liability for loss or damage (including consequential loss) whatsoever or howsoever arising as a result of the use of this publication by the reader, his servants, agents or any third party.

All third-party trademarks are hereby acknowledged.

Document history

RevisionAuthorDateNotes

0.AGraham Butcher21st October 2003First Draft after presentation

0.BGraham Butcher31st May 2004Second Draft

0.CGraham Butcher22nd August 2004Third Draft

1.0Graham Butcher2nd September 2004Issued version

Distribution

Distribution will be controlled by:

Graham ButcherOrion 3rd Floor, Adastral Park, Ipswich IP5 3 [email protected]

tel: +44(0) 1473 649059Abstract

The skills required to be able to publish dynamic information on the Internet or an Intranet are as important today (2004) as using a word processor or business software was in the late 1980s. Those individuals and organisations that had (and have) these skills command a distinct advantage over their competitors in the business world.

The purpose of this project is to investigate technology that can publish, this kind of information, using a common interface such as a Web Browser. The main objective of the project however, is to provide tools and skills that can benefit the Authors work area - the Data and IP Integration and Test Centre which is part of BT Exact at Adastral Park.Within the Test Centre there are many teams doing a variety of activities these include providing the test environment, testing itself, managing resources and dealing and communicating with end customers. Normally information relating to Inventories, Booking Systems, Configurations, Documentation, Ownership and other related topics is held in databases. If this information were permanently and instantly available, everyone would benefit.The aim of this project is therefore to look at different methods of implementing the display of non static information held in databases by using dynamic web pages. Three examples were produced for the project, adding value to the Authors workplace.

DeclarationThis dissertation is a result of my independent investigation. The portions of the report that are indebted to other sources have been referenced in the normal way.This dissertation has not been accepted in substance for any degree and is not concurrently submitted in candidature for any degree.Signed:

Date:

________________________________

__________________________

Chapter 1 : Introduction and ObjectivesThis section covers such things as separating the project objectives from normal work objectives, the document structure, the readership the document is aimed at and the type of people who would benefit from reading the report the stakeholders.

1.1 Project and Work ObjectivesProject Objectives

There are three main project objectives. The first is to find ways of publishing information within the Authors work areas. This information will be specifically dynamic information. Publishing can be defined in this case as making information available to a chosen audience through a common means - without specialised software or dedicated programs. If specialised software or programs were to be used, they might need specialised installation and upgrading. In practice what is meant by a common means is a Web Browser. By dynamic information, the meaning for the purpose of this project is information held in databases that is updated by a means separate from its publication and presentation.

In practice, this could mean, for example, displaying and searching a live inventory database (to a chosen audience) where updating that database would be kept separate from its display. The viewers would always see the latest information whereas the updaters of the information would not have to think about the presentation of the information ie they would not have to update the web page or web site.The second objective is to step back from the Authors environment and look into all methods available - at the time of writing. Also investigated are reasons why one method is preferred over another, depending on the situation.The final objective is to produce some working examples which can be used in the Authors work area hopefully to the benefit of all.Work Objectives

During the period when the project was being researched the Author had several roles. These ranged from Managing Test Labs and Reference Models, to Testing International SDH Bandwidth and, finally, Co-ordinating Test Teams in the UKIP area. One common denominator to all these roles however, was a need to convey information. The tools that were expected to be used were such things as email, Word documents, databases and spreadsheets.

Another common requirement in all three situations - was keeping equipment inventories. A common situation that arose was for people to wish to know the whereabouts of test equipment so items could be borrowed when not in use or booked for future testing.To summarise, the Authors work objectives were: Manage Test Labs bookings, configurations, inventories, safety etc.

Carry out Global Testing of High Bandwidth SDH, super-highways as well doing the testing, keep track of test equipment and the calibration of instruments.

Co-ordinate infrastructure for Test Teams in the UKIP test area improve documentation and flow of information across the area. 1.2 Document structureThis introduction includes the Project Objectives separated from normal Work objectives, Readership Aims, Technical Assumptions, who the Stakeholders of the Report are and the Motivation for writing the report. Section 2 steps back from the Project and looks at categories of solutions making suggestions about choices of technologies such as languages, platforms, web servers and Development Environments. Section 3 is an overview of the three working examples produced. Sections 4, 5 and 6 document in more detail, the production, problem solving and decisions made to produce each of these solutions. Sections 7, 8 and 9 cover the Evaluations, Recommendations and Conclusions of the three respective solutions. The final Chapters, sections 11-15 cover such things as References, Source Code, Glossary of Terms used and Product Features of CodeCharge Studio and ColdFusion MX.1.3 ReadershipIn the early part of the project the readership was aimed at other Lab Managers who frequently needed to display information about such things as lab test equipment and bookings. Later on as the scope of the project broadened it became apparent that there were many other uses of the skills and techniques investigated that could benefit a wider audience. The readership of this report is therefore aimed at:

Lab Managers wishing to make information available to colleagues and customers. Managers or Project Leaders wishing to commission bespoke publicising/publishing Systems. Database specialists and developers who seek to explore new presentational methods. Web site managers who wish to enhance their web pages with more information ie database based and searchable. Anyone wishing to publicise dynamic information on an intranet or the internet. Anyone wishing to Manage information Minimising holding, Maximising Access.1.4 Technical Assumptions

A high level of technical knowledge is not assumed for use of this document. A basic knowledge of the following will be required:

An elementary knowledge of HTML, tags and mark-up languages in general. A basic knowledge of the components that make up Databases tables, queries, records, views, links etc

Some knowledge of programming ie the difference between a compiled language and an interpreted one.

Some knowledge of Operating Systems such as Microsoft Windows, Solaris and Linux

1.5 Stakeholders of the report, Motivation for writing and Business CaseStakeholders

The main stakeholders of this report are:

1. Work colleagues wishing to publish (dynamic information) within their work environment.

2. People looking for an overview of techniques.

Time is money and both could be saved if information was made, more readily available.MotivationThe motivation for this research came from the period when the Authors main job was managing Test Laboratories. There seemed to be a common need amongst Lab Managers to have a System that would not only cover bookings, inventories, loans, configurations and the like but also make the information available to users and managers alike.There were also issues about different versions of the same document floating around in emails. Sometimes people got left out of the loop and hence had wrong versions.

During this time various Systems were tried but were not highly successful because the information they provided was too difficult to access. The Systems were not aimed at the larger audiences. Another observation made was that when specialists were brought in they only provided one type of solution ie there was little choice available.

The Author visualised having the skills within his work area where people could quickly build intuitive, flexible, open Systems that would allow the free flow of information. Business caseThe business case is fairly simple. If suitable Systems were produced there would savings in the following areas:1. Email storage only one copy, the latest version, would be published with emails just carrying the links to the location of the information.2. Time to find documents. Searching is more efficient with dedicated search tools and less time is wasted looking for information.

3. Version control a definitive version of a piece of information or document would be available.Chapter 2 : Overview of available technologies and assessment of their suitability

2.1 Introduction

This section attempts to stand back from the project and tasks in hand and tries to give an overview of the techniques, methods and products that can help produce database driven web pages and sites.In the Authors view, there are roughly 3 categories of solutions:

Simple Web Server side coding methods. These involve writing and running programs on a web server that, when called, go off and perform tasks like connecting to databases, querying them and outputting the results in HTML to the users browser. In the old days this was done by CGI scripts but nowadays dedicated scripting languages such as PHP, ASP and CFML are frequently used. A knowledge of one of the PHP, ASP or CFML languages is required for this type of solution or some knowledge of how CGI works. Total Development Environment methods. Three such Systems are looked at:

a) The Microsoft contribution - Visual Studio.Net

b) The Macromedia (DreamWeaver) environment version - Cold Fusion. c) An independent company solution like the CodeCharge Studio product from YesSoftware. This third example, unlike the first two, is technology independent, producing solutions to most platforms using code and databases of the users choice. The product generates the code.These types of solutions tend to be for more time-complex situations and, in the case of the first two examples, more proprietary. The third example is slightly different in that it is not tied to a platform. In all three, there are varying degrees of extra cost involved. The three examples given are by no means the only ones available but probably reflect a reasonable cross section of the market. Enterprise Wide Systems. These are not covered in this discussion as they are usually multi-million pound corporate wide solutions. They are ordered at board level and make use of technologies such as Java, XML and heavyweight distributed databases. They could involve a 3 level model including an intermediate application server with corporate strategy implemented. These solutions are considered beyond the scope of this report. Since starting this project BT has adopted several such Systems the Niku Enterprise System and the LiveLink document management System.There are of course grey areas and overlaps between these artificial segregations of categories. First we will look at simple Server Side Scripting Solutions.

2.2 Web Server Side Coding Methods2.2.1 CGI Type Solutions

In the early days before dedicated web scripting languages such as ASP and PHP were developed programmers and developers had to produce their own code, native to the operating System hosting the web service. They used existing languages supported on the web server. These specialised pieces of code were usually placed in a directory called the CGI bin the Common Gateway Interface, binaries folder or directory. Although any language, compiled or interpreted is acceptable, the common choices were:

I. Report writing language of PERL.II. A scripting language such as csh C shell scripting language

III. A compiled language such as C or C++ The only requirements for this method are:

The program must work on the web server.

It must be capable of accessing the data or database, hosted locally or remotely It must also be capable of outputting the results of the queries or searches in HTML so that the user can view them in his/her browser.This method is still used for complex or specialised solutions. Sometimes, historically the bulk of the coding has already been written from a previous proprietary solution and can be re-used for a more open and efficient web based solution.

An example of CGI and Perl, used in the Authors work area is the Autosave tool that captures and displays various configuration information from equipment such as Cisco Routers.

Figure 1 - Example of an Application that uses CGI and Perl, Autosave Router ConfigurationsA second example of using CGI and Perl to produce Database Web Pages

One of the first examples of a complete Web based database System is WODA (Web Oriented Database), which is claimed by the Designer, Prof Ziga Turk, to have originated around 1995. The System is completely written in Perl. Turk also comments if in 1994 concepts like active server pages and database Systems built right into the HTTPD servers were available, as easily as today, the evolution of WODA would perhaps be different ref [6]. Turk claims that WODA is still used internally by NASA, Siemens and Amazon.com.

Figure 2 - An example of WODA

An example of a Dynamic Database Web site produced exclusively using WODASummary (of CGI method)A couple of disadvantages of using CGI programs are:

a)all the commands used to contact and connect to databases must be known and included in the CGI code. With the dedicated languages such as PHP and ASP, the details are built into the languages and less knowledge is required. b)if five different people submit queries via CGI, five copies of the program have to run to fulfil the requests. This can make a popular web site slow down significantly.

An advantage of using CGI is that existing non Web based solutions can be ported to the Web using the original code with minimal alterations required. This would only be a short term solution however, that doesnt take advantage of latest developments in the Web, Database arena.

2.2.2 Solutions using Apache, PHP and MySQLThis type of solution appeals to people on a tight budget or people familiar with the UNIX/Solaris/Linux platforms. All three components Apache, PHP and MySQL - that make up the solution are effectively free.

Apache is a freely available complete Web Server that is usually deployed on a UNIX Operating System such as Solaris or Linux. Apache accounts for approximately 65% of the worlds Web Servers [ref1]. As well as supplying complete Web Hosting Services, additional free components called modules can be added. These modules supply the following services [ref1]: CGI script handling

Site activity logging Dynamic HTML

Proxy services

Direct Access to Perl

User authentication

Image maps

Encryption and security

User and activity tracking

Java servlets

Commercially produced modules or components can also be added.

Apache originally came from the NCSA (National Centre for Super computing Applications) organisation. Its name came from the fact that, because the earlier versions had so many software patches, the product subsequently became known as Apache. Apache is available free of charge at www.apache.org or ftp.apache.org PHP (Hypertext pre-processor) is a freely available scripting language specially designed for web applications and database access. It is available at www.php.net. The advantages of PHP are: Its fast. Because it is embedded in HTML code, the response time is short

Its inexpensive free in fact

Its easy to use similar constructs as other popular languages such as C and C shell

Runs on many platforms Linux/UNIX, Windows and Mac OS

Technical support is widely available through discussion groups

Its secure the user does not see the PHP code

Its designed to support databases most supported Its customisable the open source licence allows programmers to modify PHP for their own specific needs or environments if necessary.PHP works by embedding scripting code in normal HTML using extensions to the HTML tag method. A piece of PHP code will start with the tag. As a result all HTML statements are sent to the browser as is but PHP statements are pre-processed and outputted in HTML before sending to the browser. Eg

Will be processed to

Hello Worldwhich is HTML Hello World is displayed in the users browser.The consequence of this is that the end user never sees the PHP code - making it transparent and secure.

MySQL is a freely available full RDBMS (Relational Database Management System) similar to Oracle. It is available at www.mysql.com. MySQL is developed, marketed, and supported by a Swedish company MySQL AB. There are two types of licence:I. Open Source Software available via the GNU General Public Licence (GPL). Anyone who meets the GNU requirements can use the product for free, even if they are making money from it. The disadvantage is that developments have to be made public.II. Commercial Licence MySQL is available at a modest price for developers who want to produce and sell new products that use MySQL rather than release them under GPL.

MySQL comes with a complete Web based Management and Administration System.

Figure 3 - Web interface for MySQL management and administrationPutting the three products Apache, PHP and MySQL - together makes an attractive, open, low budget solution for implementing web based database Systems.2.2.3 Simple Microsoft/ASP type solutions using IIS, PWS, MS Access or SQL ServerThe reason why this section is called Simple Microsoft solution is to distinguish it from solutions provided in section 2.2.2 where a more advanced MS solution is described. The solutions that are described in this section use a proprietary Microsoft language called ASP Active Server Pages. This language is very similar to PHP, described in 2.2.2, in that it was designed specifically for web applications and connecting to databases. It would probably not be an exaggeration to say that ASP, sometimes known as ASP 3.0, is the most common language used to produce web pages with dynamic contents.ASP will run automatically on all Microsoft based web servers - IIS and PWS but will not work on Apache or other web servers. This is because there is no MS install program available. ASP is built into MS web servers. To get round this problem however, a third party company called Chilisoft produced an open version of ASP, called Chilisoft ASP. This product is fully compatible with non-Microsoft platforms and servers.Chilisoft ASP used to be freely available at www.chilisoft.com When that URL is now accessed though, you are re-directed to Sun Java System, Active Server Pages 4.0 so it looks as though Sun have bought out the company and distributes it as part of its web server products. Chilisoft ASP is basically an open version of Microsofts language designed to run on all platforms. Chilisoft ASP is particularly useful for porting legacy Systems from a MS/ASP environment into an open one.Microsofts main Web Server product is called IIS Internet Information Service. The product comes free with various versions of Windows usually known as professional eg Windows XP, Professional. With Windows 98 and 2000 there is a free optional installable product called PWS Personal Web Server. This is a light weight Web Server, useful for testing out ASP code and Web pages on your PC.Microsofts two database offerings are Access and SQL Server. The former is more aimed at the single user customer with the latter aimed at the multi-user heavy weight end of the market. Many web based database solutions however, run quite happily using Access as their database.A simple example of ASP (written in VB script Visual Basic Script) code would be:

Hello and Welcome!

NB This is actually a mixture of HTML and ASP. The ASP code, embedded in the HTML and highlighted starts with . In this way it works like PHP and is not visible to the end user. The result of calling this short bit of code would be to display the words Hello and Welcome! in 7 different font sizes.

Figure 4 - An example of ASP 3.0By using, for example, IIS, ASP and Access, a quick and simple web based database System can be built. A knowledge of the ASP language will however be required. Alternatively, if additional tools are used like Microsofts Front Page their web page and site generator - then wizards and short cuts can also be used for simple solutions without any knowledge of ASP.

Also, a dedicated code generation tool such as CodeCharge Studio (see section 2.3.3) can be used which removes the need to learn any languages.2.3 Total Development Environment MethodsThe second category of solutions is Total Development Environments category. A sample of three is given here Cold Fusion, Visual Studio.Net and CodeCharge Studio.2.3.1 Cold Fusion Server and Development EnvironmentThe first example in this category is ColdFusion. It is generally considered that Dreamweaver is the best Web Page Development Tool. The manufacturers, Macromedia, also have a strong hold on Web graphics with their Flash and Fireworks products. Their Integrated Development Environment (IDE) includes a product called ColdFusion that integrates database and data sources into Web pages. It is possible to download the complete ColdFusion package for a months free trial. When the trial expires it is possible to keep the development environment for use with a single IP address. This allows developers to effectively continue to develop pages on their own computer and deploy them on other existing, licenced ColdFusion servers.

The price of the development and server software is listed below - $1299 for the Standard Edition (correct in July 2004). This is considered a little too expensive for the Project. It is also felt that ColdFusions influence is now slightly on the wane see ref [2] ColdFusion had become less popular. Its embedded tag has also been embraced in different formats by other Web technologiesThe following discussion obtained from ref [3], www.macromedia.com explains how ColdFusion works and how you develop database driven dynamic web pages using the Macromedia ColdFusion environment.

Figure 5 - MacroMedia's own description of ColdFusion plus the PriceWhat is ColdFusion MX?

ColdFusion MX is a powerful web application server that lets you create robust sites and applications without a long learning curve. ColdFusion MX does not require coding in traditional programming languages (for example, C/C++, Java, XML), although it supports these traditional programming languages.

ColdFusion MX consists of the following core components:

ColdFusion server

ColdFusion Markup Language (CFML)

ColdFusion Administrator

The ColdFusion application server

The ColdFusion application server is itself a web application that typically resides on the same computer as your web server software ie it can co-exist with IIS and Apache. It is the program that parses (reads and interprets) and processes supplied instructions. These instructions are passed to ColdFusion through ColdFusion pages, which use a CFM or CFC file extension. A ColdFusion page looks like an HTML page but contains special tags that instruct the ColdFusion server to perform specific operations. In this way CFML is similar to PHP and ASP 3.0.How ColdFusion processes pages

The ColdFusion server looks at the content of the page and searches for the following ColdFusion instructions:

Tags that begin with cf.

Variables and functions that are always surrounded by hash signs (#).

If the ColdFusion server finds any HTML or plain text in the page, the ColdFusion server returns it to the web server untouched.

The ColdFusion server processes all the ColdFusion instructions found, and returns any remaining results to the web server. The web server then sends the entire output to the browser.The ColdFusion Markup Language

ColdFusion Markup Language (CFML) is a tag-based language similar to HTML that uses special tags and functions. With CFML you can enhance your standard HTML files with database commands, conditional operators, and high-level formatting functions, and rapidly produce easy-to-maintain web applications.

CFML looks similar to HTML: it includes start and end tags, and each tag is enclosed in angle brackets. All ending tags are preceded with a forward slash (/) and all tag names are preceded with cf; for example:

Building applications with CFML

You build ColdFusion applications as a series of pages that use CFML. Developers can extend this language by creating their own custom tags or user-defined functions (UDF), or by integrating COM, C++, and Java components (such as JSP tag libraries).

Interacting with data sources

ColdFusion applications can interact with any database that supports a JDBC technology-based driver. A JDBC technology-based driver uses an Application Programming Language (API) to execute SQL statements to databases on most platforms. However, ColdFusion is not limited to JDBC data sources. You can also interact with existing Open Database connectivity (ODBC) data sources by using ODBC Socket, a driver that interacts with an existing ODBC driver. Development tools

While you can code your ColdFusion application with NotePad or any HTML editor, Macromedia recommends that you build your applications using Macromedia Dreamweaver MX. Dreamweaver MX offers features and wizards that enhance ColdFusion development.The ColdFusion MX Administrator

You use the ColdFusion MX Administrator to configure and maintain the ColdFusion Application Server the Web Server. It is a web-based application that you can access using any web browser, from any computer with an Internet connection.

You can manage the following configuration options with the ColdFusion MX Administrator:

ColdFusion data sources

Debugging output

Server settings

Application security

Creating a ColdFusion page

Creating a ColdFusion page involves using tags and functions. The best way to understand this process is to create a ColdFusion page.

In the following procedure, you will create a simple ColdFusion page by using HTML tags, one ColdFusion tag, and two ColdFusion functions. The following table briefly explains the ColdFusion tags and functions:ElementDescription.

Now() A function supported in CFML that you can use to retrieve information from your System.

You will use the Now ( ) function in the following procedure to return the current date that is retrieved from your System.

DateFormat()A function that instructs ColdFusion to format the date returned by the Now() function.

cfoutputA ColdFusion tag that you use to return dynamic data (data retrieved from a database) to a web page.

You will use the cfoutput tag in the following procedure to display the current date retrieved from your System.

Note: ColdFusion tags and functions are considered primary elements of CFML.To create a ColdFusion page:

Open your editor and create a blank file. Enter the following code on the page:

A ColdFusion Page

Hello world, this is a ColdFusion page.


Today's date is #DateFormat(Now())#

The following figure shows the cfpage.cfm in the browser:

Figure 6 - An Example of CFMLUnderstanding CFML elements

CFML consists of two primary language elements: tags and functions. Tags let you perform operations such as accessing a database. Functions can return data and do other operations like retrieving the System date. Almost everything you want to accomplish with ColdFusion will involve using tags and functions.

You will use another important element known as a variable. Variables are an important part of most programming languages and are equally important with CFML. Variables let you store information in memory and enable you to pass data.

The following sections describe how to use these three elements.Tags

You can think of tags as commands that you use to instruct the ColdFusion server to perform operations. These operations might include selecting data from a database, reading a file that resides on the server, or showing the results of processing.

Tag syntax

ColdFusion tags are similar to HTML tags. ColdFusion tags are enclosed in angle brackets and often have a start and end tag. The start tag encloses the tag name in brackets, like this:

Most often the end tag encloses the tag name in brackets and includes a slash (/), like this:

The information processed by ColdFusion is placed between the start and end tag, like this:

info to be processed ...

ColdFusion tags, for the most part, share these common characteristics:

All start with cf.

A start and end tag.

Use of attributes (like html tags), and most attributes have values. Some ColdFusion tags, such as cfset, omit the closing tag. This type of tag uses one set of angle brackets and places all the required information between the left () angle brackets, like this:

Tag attributes

Tag attributes instruct the ColdFusion server about the details of an operation. For example, to update a database table, the server needs to know specifics about the database, such as the database name and the table name. The code required to write this type of statement might look like this:

where datasource and tablename are attributes of the cfupdate tag and "mydb" and "mytable" are attribute values.

Functions

Typically, a function acts on data. It can generate a value or a set of values, usually from some input. You can perform the following operations (actions) with functions:

Manipulate data and time values

Examine a value or variable

Display and format information

Manipulate string data

Retrieve System information and resources

Perform mathematical operations

Using functions on values

Usually, a function performs an operation on a value, and the value can include the value of a variable. For example: to format the value of a variable containing a value in dollars, the code to write this statement might look like this:

#DollarFormat(price)#

The DollarFormat function returns a value as a string and formats that value with two decimal places, thousand separator, and dollar sign. The hash signs (#) around the function instruct ColdFusion to evaluate the content between the hash signs and display the value.

Functions and parentheses

All functions have parentheses, regardless of whether the function acts on data. Consider the following function:

#Now()#

If you put anything inside the parentheses of the Now() function, an error would occur. The Now() function returns an unformatted date and time. However, you can format the results of this function with other functions, such as the DateFormat() or TimeFormat() functions.

Nesting functions

Functions can generate data as well as act on data. Consider the following example:

#DateFormat(Now(), "mm/dd/yyyy")#

In this example, the Now() function generates the date, and then the DateFormat function formats the date.

Functions and hash signs

You use hash signs (#) with functions to display the results of a function on the page. Hash signs tell the ColdFusion server to evaluate the content between the hash signs and display the value, for example:

Hello world,

Today's date is #DateFormat(Now(), "mm/dd/yyyy")#

The following figure shows the output of this example:

Figure 7 - CFML pageIf you did not include the hash signs around the DateFormat(Now(),"mm/dd/yyyy") function, ColdFusion would not evaluate the function and the previous example would display your source code, as follows:

Figure 8 - CFML with errorVariables

Variables let you store data in memory on the server - they always have a name and a value. You can assign a value to a variable, or you can instruct ColdFusion to assign variable values based on data that it retrieves from a data source, such as a database table. Summary

ColdFusion was probably the first robust integrated development environment introducing features such as server side scripting with CFML (ColdFusion Markup Language) using embedded declarative tags. It is now losing popularity a little to cheaper more versatile solutions. CFML requires a ColdFusion Web Server to host the site, applications and CFML web pages. Yue and Ding ref [2] writing from Design and Evolution of an Undergraduate Course on Web Application say The initial inclusion of ColdFusion in 1998 and its exclusion in 2000 may serve of an example ColdFusion would suit the developer that works exclusively with Macromedia tools and has a ColdFusion Web Server to publish on.2.3.2 Advanced MS solutions using Visual Studio.NETThe second example of Total Development Environment category of solutions is Visual Studio.Net.Visual Studio.Net is Microsofts current development environment for Web, Windows and Mobile applications. It costs $1079. Figure 9 - Microsoft's pricing for Visual Studio.Net

The Integrated development environment contains the following elements: A common IDE for the supported languages:

Visual Basic.Net

Visual C#

Visual FoxPro

Visual C++.Net

Easy ASP.Net programming ie WYSIWYG (what you see is what you get) and Code Aware EditorsThe .Net initiative started to take off around the middle of 2000. It came about because of the increasingly important role of the Internet, more collaboration between developers and the gradual shift from desktop computing to distributed computing.Its method of communicating between applications, environments and platforms is XML (eXstensible Mark-up Language).

As people have some knowledge of the older MS languages of Visual Basic and Visual C++ this discussion will just focus on the new elements of the package ASP.Net and C# languages.ASP.Net is Microsofts next version of (ASP) Active Server Pages the earlier version, ASP 3.0 is mentioned in section 2.2.3 of this report. The main difference between ASP 3.0 and ASP.Net is that the latter is object oriented and compiled. It can be produced within Visual Studio.Net IDE using any of the languages mentioned earlier. The advantages of ASP.Net over ASP 3.0 are: Unlike ASP 3.0, ASP.Net is compiled therefore applications will run faster. Just In Time (JIT) binding is possible.

ASP.Net provides DataGrid and DataList controls tailored for efficient database access.

State management is handled better. ASP.Net offers three types of states for Web applications: application, session and user. Improved caching. A complete caching API is implemented. One of the benefits is improved performance when interacting with databases through better caching.

Better updating. With 3.0 its necessary to shutdown the Web server to update the ASP with ASP.Net its not.

Multiple audience targeting. The same page can deliver text only for a mobile phones or rich-dynamic content for IE 6.0. This is a built-in function that detects the browser being used.

Object oriented. Better re-use of code is achieved.

Upgrading from ASP 3.0 to ASP.Net is achieved in one of two ways:

1. Rewrite the code in ASP.Net

2. Change the file extension from .asp to .net Visual C# is Microsofts latest language that combines the strengths of C++ with its low level controls with the simplicity and RAD features of Visual Basic. It also has the added benefit of being able to convert applications produced in C# into XML web services available to a range of platforms and other environments.

To encourage people to move to the .Net method of development, Microsoft are giving away, free, certain elements of Visual Studio. One of these is a product called Web Matrix, an editor for producing and compiling ASP.Net pages. It is a visual editor with elements such as DataGrid and DataList drag and droppable onto Web pages. Also provided free is a run time version of their Database System, SQL Server. More information is available at their ASP.Net community site www.asp.net ref [7].

Figure 10 - Web Matrix, design window

Figure 11 - SQL Server control panel

SummaryUsing .Net technology is an investment for the future as the older Microsoft ASP 3.0 is likely to be phased out and unsupported some time in the future. The visual Studio.Net environment also has the advantage that it can develop for the Web, for Windows and for Mobile devices such as PDAs. This means that applications written for one platform can be ported across relatively easily to another. The prohibitive cost of the product Visual Studio.Net and lack of free trial period prevented an in-depth study in this project.2.3.3 Third Party, Software Development Tools (CodeCharge Studio from Yes software)

The third example in this Total Development Environment category is CodeCharge Studio.

Figure 12 - Details of CodeCharge Studio's pricing structure NB, The Personal Edition does not cover all languagesThis type of solution has created quite a buzz in the industry as companies like Yes Software are now challenging the big names Microsoft and Macromedia in the field of Rapid Application Development of dynamic database driven web pages.

At the start of the project this type of solution wasnt considered important but as the project progressed, this particular tool became more and more important. A simple internet search revealed CodeCharge Studio as being a method of developing code for database web applications. The full blown product is available, free of charge, for one month and consists of a 25 MB download. After 3 months of trials (on 3 separate computers) the Author was so impressed that the product was purchased at the full price of $180. Subsequently the price has risen to $499 see above.CodeCharges own sales information is quoted as saying CodeCharge Studio is a visual application builder and code generator that provides a feature-rich environment for rapid application development for the web. It is the most productive way available today to create powerful, scalable, and secure web applications quickly. Based on a sophisticated code generation engine, CodeCharge Studio opens up new possibilities for web developers by automating the creation of virtually all web application components and by generating robust, professional-level server code in any of the following programming languages: ASP.NET (C# and VB), ASP 3.0, PHP 4.0, Java Servlets 2.2, JSP 1.1, ColdFusion 4.01, and PERL 5.0 ref [4].How CodeCharge works

CodeCharge Studio is functionally and visually similar to other RAD tools, such as Microsoft Studio.Net and Macromedia ColdFusion with the ability to maximize developer productivity while keeping the cost of development to a minimum. While visual programming tools are traditionally used for developing desktop and client applications, CodeCharge Studio is ideal for developing sophisticated web applications.

Figure 13 - CodeCharge Studio IDE

Project development using CodeCharge

The following steps demonstrate how a basic application would be created using CodeCharge:

1. Start CodeCharge Studio.2. Create a new project.

3. Name the project and select Application Builder.

4. Specify project settings such as the programming language and path to the web server.

5. Specify the database connection type and establish a database connection.

6. Configure site authentication by specifying the database table and columns that contain user login and password information as well as security groups and roles.

7. Select the database tables based upon which the web application will be created.

8. Specify the type of web page to be created for each of the previously selected database tables. Specify if you want to create Search, Grid, and Record maintenance pages for each table.

9. Specify a theme to be applied to the site. The theme defines the basic layout and appearance of different elements within a page.

10. The Application Builder will automatically create a project with sets of pages that make up the web application. You can then publish the pages to the server and test them.

11. If you wish, you can make further modifications to the created application by using the integrated development environment (IDE).

CodeCharge Studio does not help you develop the underlying databases that drive the applications. It does however, let you connect to existing databases during development and to test your application with real database connections during testing.

CodeCharge Studio FeaturesThe following is a summary of the CodeCharge sales information available at www.codecharge.com ref [4]. The main features are: 1. Application Builder

2. Integrated Development Environment

3. Form and Component Builder

4. Visual Query Builder

5. Security Management/Role-based Access Control6. Support for multiple languages

7. Extensibility

8. Multiple Database Connections

9. Integration with other products

10. Extensive Database Support

11. Application Templates (Solutions for customisation)

12. Custom Code Actions

13. Code Generation Engine

The details of these features are included verbatim in Appendix C.Benefits of using CodeCharge Studio

The following benefits are obtained by using CodeCharge Studio:1. CodeCharge generates structured, object oriented code in the language of your choice.

2. As the code is well structured it is easily maintainable and can be extended manually if necessary. If this done within CodeCharges own editors the new code is not over-written during subsequent use of the automatic code generator.

3. The code produced separates the programming logic from the presentation layer ie the files .asp, .php, .jsp, etc files are separate from their corresponding HTML files. In large scale developments this allows separate teams to work on programming and visual design.

SummaryCodeCharge Studio offers an attractive and flexible way of rapidly producing Dynamic Database Web pages. It would be the solution that the Author would recommend that people, new to the arena, look at first.2.4 Enterprise Wide Systems

As stated earlier, this type of solution was considered beyond the scope of the project and is only included here for the sake of completion.2.5 Other topics relevant to producing Database driven Web Pages

This section includes additional pieces of information, critical to the understanding of web based database technologies.2.5.1 Client versus Server side scripting and programsUp until now all the programming languages and code have been designed to work on the Web Server side of the Client/Server model used for discussing web pages. One (or two) important languages that run instead in the clients browser are Java script (and the MS version JScript). These are important because they, for example, can verify data input to a form. This saves time as the browser doesnt need to access the server to do this. Basic checks for data integrity of things like telephone numbers and email addresses are easily achieved.

The only problem with this client side programming is that unlike HTML, there are few open, independent standards and different browsers behave in different ways to interpret the same code. A way to get round this is to make the scripting program first check the browser type and version before re-directing to the required code for that browser.Also worth mention are Java Applets and Java Servlets. These are programs, written in Java, a complex language based on C++, that run on the Client (PC, Mac or other) or the Server respectively. Obviously, if they run on the client PC (or other) they have the possibility of doing a lot of damage. This could be things like installing a Trojan, a Virus or merely carrying out the command format C:\ on a PC machine. This means that with normal browser settings the user is first asked if he wants to accept the downloaded program before it can run.2.5.2 Use of ODBC for connecting to databases

ODBC is the glue that allows different applications to access different databases from different manufacturers in a consistent way. It existed long before web based databases were thought of.

ODBC originated from Microsofts Windows Open Systems Architecture (WOSA), which provides a series of application program interfaces (APIs) to simplify and provide standards for various programming activities. The goal is to have all applications communicating through the same set of APIs. ODBC is just one piece of the WOSA picture. Other components include telephone services (TAPI), messaging services (MAPI), and open data services (ODS). Today it is generally treated as an open standard.Normally before accessing an ODBC database, you must install on your System the appropriate ODBC driver for that database (if its not installed already).A Data Source Name (DSN) is what ODBC uses to allow you to associate a database with a driver. You use the ODBC Administrator (in Control Panel on PCs) to configure and give the DSN a unique name and then associate it with both a database and a driver.

When you open a connection to ODBC, you specify what DSN you want to work with. ODBC takes care of all the little details involved in opening that database.

Before you can access ODBC databases, you must configure the ODBC data source names, the ODBC drivers, and the configuration values used in ODBC.INI. You also should understand the structure of an ODBC driver and the ODBC API as well as some ODBC-related terminology.

In order for any application to access data in a database, it must establish a connection to that database through its corresponding ODBC driver. To do this, the application must request a connection from the ODBC Driver Administrator, specifying the data source desired.

Although ODBC is the oldest method it is by no means the only way of connecting to databases. Other methods are JDBC, ADO (Active Data Objects) and Jet (MS Access database engine). A tool like CodeCharge Studio will allow you to choose the type and sort out the necessary code for connecting to databases automatically.2.5.3 Whats Oracles contributions to the discussion?

Oracle is the worlds largest database company. Along with Oracle v7 and possibly v8, there used to be a free Web Server and Wizards that allowed you to develop dynamic web pages. Although this appears to be supported with the latest version, Oracles support seems to be withdrawing and they generally seem to be recommending other proven methods such as PHP and ASP.Net. See Hull, ref [5].2.5.4 Security

Web and Database security are massive subjects in their own right. The discussion in this report is limited to a few mistakes that can be made when designing Database Web pages and sites:1. Access database (or other single file database) can be downloaded. This actually happened where a holiday company made available all their customers credit card and other details stored in a single access database. The hacker types something like:

http://www.holiday-company.com/customers.mdband the browser asks if the file should be opened or saved. Even if the hacker doesnt know the name of the database file, it can be found by a trial and error program. The way to protect against this is to obviously, locate all data files in an area that can be reached by the code but not browsers ie do not use the root directory for any data.2. Permissions on all files on the Web Server have to be correct. On some web sites, typing an incorrect URL gives you a listing of all files held their. There is then the opportunity to download files that were not meant to be downloaded. Sometimes database usernames and passwords have been known to be stored in text files accessed by the code.

3. All Web servers have a default file or default filenames that are activated even though not specified. The most common is index.html or index.htm. The developer needs to be aware of all the Web Server settings when designing the code to be used.

2.6 A comparison of different solutionsThis is one of the hardest sections to write as there are so many possible combinations of different products and technologies. When making choices the starting point is usually what is available to you at the start. This may be anything from a Web Server, knowledge of a certain language or use of a certain development tool. In the case of this project, the Author started with virtually nothing so using an external hosting company with many built in features appeared to be an attractive choice. More information is given in details, assessments and conclusions of the three solutions in this report particularly in figures 27, 31 and 33.The following table however, does try to compare two elements and focuses on comparing PHP with ASP.Net. It is from an article by Sean Hull, PHP and ASP.Net go head to head, Ref [5]

PHP 4 PHP 5 ASP.NET

Software price freefreefree

Platform pricefreefree$$

Speedstrongstrongweak

Efficiencystrongstrongweak

Securitystrong strong strong

Platform strongstrongweak (IIS only) win32

Source available yesyesno

Exceptionsnoyesyes

OOP weakstrong strong

Figure 14 - PHP - ASP.Net comparison table from ref [5]Hulls conclusion is that PHP 5 is best overall but with the caveat that its not so good at Object Orientation (as .Net).

The following is a summary of the Authors findings regarding some of the products and technologies discussed so far:PHP 4 PHP 5 ASP.NetASP 3.0CGIMySQLAccess/ SQL ServerApcheIISCFusn Web ServerCFMLCCharge Studio

Software price freefreefreefreefreefree$$free$$$$$$free$$

Platform pricefreefree$$$$freefree$$free$$$$$$$$$$$$

Speedstrongstrongweakstrongstrongstrongstrongstrongstrongstrongstrongstrong

Efficiencystrongstrongweakstrongstrongstrongstrongstrongstrongstrongstrongstrong

Securitystrong strong strongstrongstrongstrongstrongstrongstrongstrongstrongstrong

Platform strongstrongweak (IIS only) Weak (IIS only)strongstrongWeak (IIS only)strongweakstrongstrongWeak (PC only)

Source available yesyesnonoyesnonononononono

Exceptnsnoyesyesnopossiblenonononononono

OOP weakstrong strongweakpossibleweakstrongweakstrongstrongstrongstrong

Figure 15 - Author's comparison tableOf course some of these comments such as Apache Web Servers capability of supporting Object Orientation are a bit meaningless. Some dedicated CGI programmers would swear that you can make CGI do what you want!

Later in this report, there is a flow chart mapping a developers choices when choosing the elements to make up a working dynamic web database System. See figures 27, 31 and 33.Chapter 3 : An overview of the three working examples produced during the projectThe following is a short description of the three solutions produced during the project. Later in the report, more details are given. In chronological order they are:1. A complete Test Equipment Inventory and Calibration Record System (for Concert Global Networks).2. An enhanced Lab Equipment Asset Register (for XGH1, UKIP).3. An enhanced Document Management System (for XGH1, the Authors Cost Centre).3.1 Inventory and Calibration System ConcertIn this System, details of Concert Test Equipment, Network Trials and Calibration Information were stored in a manner available to all 3 Companies involved Concert and its parents BT and AT&T. The reason why the past tense is used here is that Concert is no longer.The technology used for this solution was:

A commercially hosted external web site

Apache, PHP and MySQL.

MS FrontPage for buttons and navigation pages

Access was controlled by session-based passwords and all usage of the System, logged in the database itself.The following screen shots are from the solution: Figure 16 - Page for selecting views of tables

Figure 17 - View of Assets Table

Figure 18 - Login, obtain password page

3.2 Enhanced Lab Equipment, Asset Register UKIPThis section gives an overview of the second working example, produced to add value to the Authors working area.An existing Database Inventory System was made available to all in the UKIP test teams by producing an open web based query tool. Previously this data was only available to two or three people updating the data. The data is searchable by two different methods simple or power.The technology used was:

IIS, ASP and MS Access

Code developed by CodeCharge IDEFigure 19 - Simple search page of UKIP InventoryFigure 20 - Power search of UKIP InventoryFigure 19 Display of single Asset showing all fields3.3 Enhanced Document Management System XGH1This section gives an overview of the third example produced to add value to the Authors work area.This solution provides a multi-database Document Retrieval System allowing search and retrieval of any registered document within the Data and IP Integration Centre directly into the users browser. The technology used was: IIS, ASP and MS Access

Multiple databases

CodeCharge development IDE IE5 browser as document viewer and editor Figure 21 - Documentation System, database chooser

Figure 22 - Documentation System, search for "Peakflow DOS"Figure 23 - Show versions of "Peakflow DOS upgrade ..."

Figure 24 - Requested document retrieved to users web browserChapter 4 : Details of the first example, Concert Test Equipment & Calibration Details solutionIn the following three sections each solution is dealt with in more detail. The first one is the Concert Test Equipment and Calibration Details solution. The Concert Company, however, did not last for more than a few years and as a result the solution produced in this area didnt get past the working prototype stage. The lessons learned were passed on to the second and third examples, discussed later.4.1 Requirements

The requirements for this example were as follows: The existing data, in the Access database, must be used. The System should be used through the Web using a Web browser. The data must be available to people from a variety of backgrounds and locations ie within the 3 companies involved Concert, BT and ATT&T. The offices covered 3 continents. Database creator (owner) and administrator don't manage this database as their primary job function. Therefore the creation and management of the database should not take much time. Database owner is not a programmer or a database specialist. It should be possible to define and manage the database without programming, as much as possible. There isnt a high demand for changing and updating the data. It is presently carried out by one person the Author.

Hopefully in the future, the System could be adopted by Concerts own Apache based web sites.

Home-workers should be able to use the System via a narrowband modem connection.End users might enjoy the following: The generated HTML or any other code (Java, JavaScript) should be portable and run on as many browsers as possible. Minimal requirement are second generation browsers with tables support. Data types common to the Web should be supported, such as text areas, radio buttons, URLs, email addresses... Speed and scalability. Users on the Web are expected to wait a second or two for a reply from a server. The System should respond within that time frame. Security. The System will not be used to handle financial transactions but may contain details of equipment and locations.4.2 Background. Concert was a joint venture company formed from its two parents BT and AT&T. It lasted for 3-4 years before it was divided up and given back to the original founding companies. One of the main businesses of Concert was to supply and manage Global Bandwidth. The Authors role in the company was to test, point to point superhighways carrying SDH and SONET traffic, sometimes supplied by outside companies such as Level 3, Quest or Global Crossing. To do this, test equipment had to be moved round the world and put in place at the two ends of the circuits. The tests of the circuits supplied by the third party companies were known as trials and had to be planned well in advance. The test equipment used had to calibrated regularly. 4.3 Problem analysis

The starting point of this solution was the existing NVT (Network Verification Testing) Concert Database:

Figure 25 - Starting point, existing NVT database - MS access

Figure 26 - existing database, view of AssetsThe main problems to be overcome in designing this information System were:1. A choice of technologies (language and interface or database connection) had to be chosen2. A suitable platform had to be found to host the service available to a wide audience3. The existing data had to be incorporated4. Some new skills had to learned to implement the solutionThe starting point for the solution was choosing the platform. It was decided that, instead of setting up a working platform incorporating the required 3 components web server, database and language a commercial hosting company would be used. After looking at several the best choice seemed to be:www.easily.co.ukTheir publicity stated the following inclusive features (see figure25) next page.The cost was 15 per year for the service with additional charges for uploads and downloads amounting to another 5.

The next stage was to decide on the database. As there was an existing Access database holding current data it was decided to go with Access and incorporate that into the solution. The final decision was to choose the language. Chilisoft ASP was chosen because it was already included in the hosting package and ASP appeared to integrate well with Access.This is where the first discovery was made. Access databases consist of a single *.mdb file. By placing this single file on a UNIX/Linux Apache server the database became unusable. This is because the Microsoft file structure is incompatible with UNIX file Systems apart from mere storage. At this point the solution had to be re-designed.

The solution, mark II, consisted of the same commercially hosted web server (Apache) with MySQL and PHP used instead of Access and ASP. The contents of the Access database had to be exported to text based CSV (comma separated variable) files one for each table. This was done via Microsoft Excel as an intermediate stage. These text based files were then used to load the data into the MySQL database, supplied by the hosting company.

Figure 27 - Flowchart showing choices made for first solution

Product Included

100 MB Diskspace

FTP

Php 4

MySQL

FrontPage 2000 Extensions

Sun Chilisoft ASP

Own CGI-bin

Mod Perl

Graphical Website Statistics

Quick Use Templates

Extra Diskspace Available

HTML, Graphics & Javascript

Flash

Dreamweaver 3 Compatible

HotMetal Pro Compatible

Helpdesk Support

Linux & Apache Based

Free Software Downloads

Free Links to Development Sites

"Pay As You Go" Data Transfer

Internet Connection via 100 MB line

No Hidden Extra Costs

Figure 28 Features provided with Easily.co.uk Web hosting

4.4 Functional analysis of web-access to DBs

By hosting the database on the same server as the web server, connections were simplified. Additionally the PHP language is designed to connect to databases so the commands to make the connections are simpler all source code used in the 3 solutions is available on request. The problem with using a remote and externally managed database during development is that the debug, edit, upload, re-test, cycle takes longer. 4.5 Practical advice

Having a dummy MySQL database available locally on a development PC would have been useful. This would have allowed full control of the database and would have made requests for the live System easier to formulate.When importing data into MySQL a command Line Interface is used. These commands are best stored as text script files. By doing this a record is kept, re-use is possible and typos are easily detected and corrected.

A knowledge of Oracle CLI (Command Line Interface) is useful as MySQL CLI is similar.4.6 Heuristics

When solving problems, just typing the question into a modern Internet Search Engine such as Google often brings up answers quicker than expected quite often quicker than delving through the relevant text books.4.7 High level development

The High Level Development consisted, in this case, of deciding to host the Service on the Internet rather than the three local Intranets (BT, AT&T and Concert). Although this does have security issues for a live System, it does simplify the problem of not having to request proxy servers and simultaneous access to three Intranets. These days it is not that uncommon to use the public Internet for commercially sensitive information, albeit with the use of encryption, tunnelling and other technologies. 4.8 Scalability

Scalability should not be a problem with this solution as disk space is expandable on request. PHP and MySQL are designed to take multiple requests. High request rates are handled a lot better on this platform than CGI for example.4.9 Ease of maintenance

With this solution the maintenance and administration of Apache, PHP and MySQL are handled externally. Although this appears to be a good thing, the downside is that there is obviously also a forfeiting of control. Internally the MySQL account still has to be managed so that data is meaningful. This can be time consuming.4.10 Technologies v non-functional requirements

This type of technical solution gives rather a bland type of presentation of the data. These days peoples expectations are of all the latest graphic displays and complex soft logic applied to search techniques such as Google. This solution does not meet these expectations.4.11 Design and Development of Solution

The strategy used to produce the solution was:1. Port the data from Access to MySQL

2. Re-use existing code modified from a variety of sources - for displaying the data.3. Produce Front-end, user friendly pages to display the PHP code written Microsoft Front Page was used.4. Protect the data with password protected pages

5. Look for ways of managing the database user management, disk space, table repairs etc

These stages were all completed before the Company (Concert) was disbanded and development stopped. A couple of extra stages would have produced a more complete solution:1. More complicated Views of the data could have been written taking into account the links in the original Tables.

2. An online update System could have been produced that used forms and matrices for updating the MySQL data. The method used in the prototype was to update the data by using the built-in MySQL Management facility.3. A more compact and cosmetically attractive way of displaying the data could be found. This was achieved in the second and third working examples.Chapter 5 : Details of second example, the UKIP Asset Register

This section documents in detail the second working example produced - the enhanced Database Inventory System as used by different groups making up the UKIP Test Labs. This existing database System holds details of serial number, owner status location, purchase request number etc of all UKIP Assets full list of fields supplied in figure 19.5.1 Requirements

The requirements for this example were as follows:

The existing data, in the Access database, must be used.

The new System should be used through the Web using a Web browser no specialised software required. The new System should be read only the database is administered by the infrastructure team The new System must not corrupt the data The new System must not force the infrastructure team to work in a different way.End users might enjoy the following: The generated HTML or any other code (ASP, Java, JavaScript) should be portable and run on as many browsers as possible. Minimal requirement are second generation browsers with tables support. The search syntax must be simple for novices but advanced users must be able to define complex search expressions. If the results are sortable by all columns, that would be an advantage Data types common to the Web should be supported, such as text areas, radio buttons, URLs, ordering by columns with a single click etc. Home-workers should be able to use the System via a narrowband modem connection. Currently the database size is 10MB and having to download it in its entirety is not good way to work. Database queries through a thin client web browser would be much more efficient. Speed and scalability. Users on the Web are expected to wait a second or two for a reply from a server. The System should respond within that time frame. Security. The System will not be used to handle financial transactions. It will hold information about equipment and locations and should be shown outside BT.5.2 Background. The UKIP Test area of the Authors Centre consists of several teams sharing a range of equipment used for simulating, testing and integrating new products and features. These will be used in different areas of the live BT IP Networks. The current Access database is held on a shared drive and is accessible by using the interface shown in figure 26 below.5.3 Problem analysisThe starting point for this solution was looking at the existing Access database. This database holds details of all Assets for the UKIP area of the Test Centre. At that point the database was only used by the infrastructure team. The interface to the database looked like:

Figure 29 Original user interface to UKIP Inventory databaseThis interface did not give away many clues about the internals of the database. The designer of the database was consulted to find out more details.The next task was to analyse in detail, the structure of the database by looking at the tables and their relations. MS Access itself provides a useful tool for doing this under Tools/relationships from the pull-down menus. The analysis showed:

Figure 30 - Analysis of tables and relationships in UKIP Inventory databaseThis analysis revealed there were 7 tables in total and surprisingly, that there were no links or relationships in place between the tables. All the Asset data was in one table. This made the design of the solution considerably easier as the task could be reduced to displaying one table the 1 Network Devices table.The main remaining problems to be overcome were:

1. A choice of technologies/languages and interfaces/connections had to be chosen2. A suitable platform had to be found to host the service available to all in UKIP area of the Test Centre.3. The existing data had to be incorporated.4. Very importantly the new System should not interfere with the mission critical, existing System managed by the Infrastructure Team. It should not even be seen to slow down or change the ways of working of the existing methods.

5. The new presentation of the data the web pages should be Read Only. New data should be added and modified using the existing Access interface which has full auditing built-in.6. Some new skills had to learned to implement the solutionAt this point in time the CodeCharge Studio Development Environment and automatic code generation System had been discovered and it was decided to put it to use using an IIS Webserver with ASP 3.0 to interface to the existing Access database.

Figure 31 - Flowchart showing decisions made for solution 2

5.4 Functional analysis of web-access to DBs

Another decision that was made was that a System that used the live (single) database file directly was too risky. A batch job was to be setup that would copy the live database file to the chosen web server 4 times a day. This enabled the database manager to effectively see no difference to the way he had worked previously but ensured that the web pages were never more than a couple of hours out of date.5.5 Practical advice

Diagram to show how choices are made are shown in figure 31 above.5.6 Heuristics

When dealing with a new tool such as CodeCharge Studio it is well worth investing some time in finding how to use it properly. Fortunately the product came with several tutorial examples that were studied to take full advantage of the products features. These tutorials are available free of charge from the web site www.codecharge.com ref [4].5.7 High level development

The high level development decisions made in this example were things such as: Realising the importance of the existing System and building round that System with a low risk enhancement.

Choosing the interface. In contrast to the original interface, see figure 29, the web based interface is extremely simple. For the simple search a single text box is used to search for any record containing any supplied string see figure 19. For example if just the letter e was entered the result would be a list of all records. If the word Peakflow is entered, 4 records are displayed all containing Peakflow in at least one field. The power search allows more specific information. In figure 20 all records that satisfy building=b48, room=9, owner=james, status=in use are displayed. Choosing a development environment and automatic code generation tool for the first time.5.8 ScalabilityWith a maximum of 40 or 50 people working in the UKIP area, the chances of numerous simultaneous queries occurring are low so using Access as a database should not be a problem. That the current size of the database file is 10 MB, having grown from 6 MB two years ago, means that there shouldnt be a problem with disk space on the server. The System implemented should therefore be adequate for hosting present and future needs.5.9 Ease of maintenance

All database management and data content is handled by the infrastructure team. The IIS Webserver is also managed by another team. The only check that has to be made is that the files are being copied across to the web server as expected. If this fails, the database web pages will still work but the data wont be completely up to date. To summarise, the designed System needs very little maintenance.5.10 Design and Development of Solution

The design and development of the solution followed the following stages:1. Decide on the 3 key elements database, platform and language. In this case the existing Access database was preserved, hosted on an IIS server with ASP 3.0 used as the scripting language. The reason for using ASP 3.0 was that the IIS web server was relatively old and there was a fear that ASP.Net might not be supported.

2. Next, the development environment was set up on a single PC. The PC was running XP Professional so had a built in IIS web server that had to be enabled. Windows XP does not enable IIS by default. CodeCharge Studio was installed as the development environment.

3. A copy of the live database was used in the development environment. Next the stages of Project Development described in 2.3.3, were applied and the Application was built. The first version used just a simple search. This effectively created an SQL select command of the form:Select {field1},{field2},{field3} FROM {Table name} WHERE {field1} LIKE '%{s_keyword}%' OR {field2} LIKE '%{s_keyword}%' OR {field3} LIKE '%{s_keyword}%' .The actual command was:SELECT [Asset reg no], Description, [Part No], itemname, [Serial No], Building, Room, Rack, Owner, Comments, Status

FROM [1 Network Devices]

WHERE Description LIKE '%{s_keyword}%'

OR itemname LIKE '%{s_keyword}%'

OR Building LIKE '%{s_keyword}%'

OR Room LIKE '%{s_keyword}%'

OR Rack LIKE '%{s_keyword}%'

OR Owner LIKE '%{s_keyword}%'

OR Status LIKE '%{s_keyword}%'

OR Comments LIKE '%{s_keyword}%'

OR [Asset reg no] LIKE '%{s_keyword}%'

OR [Serial No] LIKE '%{s_keyword}%'

OR [Part No] LIKE '%{s_keyword}%'

The application was then tested on a few key users and feedback obtained. This SQL command was generated automatically by CodeCharge Studio. In the early releases of the software however, the square brackets around field names like Serial No had to be added manually!4. A second type of search, the power search was then added using SQL of the form:

Select * FROM {Table name} WHERE {field1} LIKE '%{field1_entry_form}%' AND {field2} LIKE '%{field2_entry_form}%' AND {field3} LIKE '%{field3_entry_form}%' .The actual command was

SELECT *

FROM [1 Network Devices]

WHERE [Asset reg no] LIKE '%{s_Asset_reg_no}%'

AND Description LIKE '%{s_Description}%'

AND [Part No] LIKE '%{s_Part_No}%'

AND itemname LIKE '%{s_itemname}%'

AND [Serial No] LIKE '%{s_Serial_No}%'

AND Building LIKE '%{s_Building}%'

AND Room LIKE '%{s_Room}%'

AND Rack LIKE '%{s_Rack}%'

AND Owner LIKE '%{s_Owner}%'

AND Comments LIKE '%{s_Comments}%'

AND Status LIKE '%{s_Status}%'

This was also tested on a few key users before being released along with the links between the two pages holding the searches.5. The final stage was to make the URL to find the web pages more friendly. This was done by adding a DNS entry on the BT intranet so that URL used was:

http://xgh1.nat.bt.com/asset registerThe development time for this solution was significantly shorter than the time taken for the first, Concert example. The reasons are: More experience.

Better Methodology.

Use of Development and Automatic Code Generating Tools.Chapter 6 : Details of third example, Centres Documentation Management SystemThe third and final example was the enhancements made to the Centre Document Management System. The lessons learnt from first two example were applied and a working System was produced relatively quickly. The technology used for the second solution seemed to work well so was also adopted for the third. This means that the third has many similarities and only obvious differences are highlighted. To understand this section completely the reader should read the previous section details of second solution.6.1 Requirements

The requirements for this example were as follows:

The System should allow web based access to all the Centres registered documents. The System should remove the need for the existing dedicated software to view and download documents. The System should be read only, in that it should not be used for registering and storing documents

The System should work with specified browsers. As the browser has the dual purpose of locating the documents and also displaying them, the specified browser will be MS IE5 or later. This is because MS Office is used for most documentation within the Centre. If a different type of browser is used it will be able to locate documents but not display them unless they are TEXT, JPEG, HTML or other web supported formats. As some documents can have many Authors writing different versions there should be two types of searches available. One is a document oriented search and the second an Author oriented search.

Search results should be orderable by clicking on column headings.6.2 BackgroundXGH1, the Authors work Centre has had its own documentation System for a number of years. The System which is MS Access based was developed by Paul Wigens, a work colleague. There have been a number of releases of this dedicated software. The System is used for storing and retrieving documents and managing their change control. Within XGH1 there are a number of work areas, each has its own database of stored documents, the documents themselves being stored on various different file servers. Most people in XGH1 only have access to two or three areas, their own work area and the Centres common area. The common area holds general information like templates used by the Centre.This System is also seen as mission critical as, if for example, documents (or details about documents) were lost, it could have a catastrophic economic affect on the Centres finances. For this reason the Author again developed a safe System that would not risk the integrity of the existing data and files. Copies are made, 4 times daily, of all database files to the web server, with the live FileStore files left untouched. The new System is Read Only so does not risk any database corruption.6.3 Problem analysis

Again with this solution the deployment method had to be chosen. Because the second solution had worked so well with choices made it was decided to make the same choices for this one.The analysis of the database structure behind FileStore showed that the product consisted of two layers of databases. The first database held information about the areas of work covered and pointed to the other databases that actually held the information about the documents, Authors and locations where the documents were stored. The databases are known as front end and back end.An analysis of a single back_end database showed that there were 6 tables with the following relations.

Figure 32 - Analysis of FileStore "back end" database

The problem therefore resolved to producing two types of search on two different web pages the Document oriented search and the Author oriented search.

The next page documents, with the help of a flowchart, the platform choices made.

Figure 33 - Flowchart to show decisions made for solution 3

6.4 Design and Development of Solution1. Decide on the 3 key elements database, platform and language. In this case the existing Access database was preserved, hosted on an IIS server with ASP 3.0 used as the scripting language. The reason for using ASP 3.0 was that the IIS web server was a relatively old and there was a fear that ASP.Net might not be supported.

2. Next, the development environment was set up on a single PC. The PC was running XP Professional so had a built in IIS web server that had to be enabled. Windows XP does not enable IIS by default. CodeCharge Studio was already installed as the development environment.

3. A copy of the live database was used in the development environment. Next the stages of Project Development described in 2.3.3, were applied and the Application was built. In this case there was more of a challenge in building the query to cover three tables. The CodeCharge Query builder was used for the document search page:

Figure 34 - CodeCharge Query Builder, covering 3 tablesThe resulting SQL query was:SELECT TblDocuments.*, Type, TblDocTypes.DocCatID AS TblDocTypes_DocCatID, TblDocCat.DocCatID AS TblDocCat_DocCatID, DocCat, FileRef AS FileRef

FROM TblDocuments INNER JOIN (TblDocTypes LEFT JOIN TblDocCat ON

TblDocTypes.DocCatID = TblDocCat.DocCatID) ON

TblDocuments.DocTypeID = TblDocTypes.DocTypeID

WHERE Title LIKE '%{s_keyword}%'

OR FileRef LIKE '%{s_keyword}%'

OR Keywords LIKE '%{s_keyword}%'

OR Type LIKE '%{s_keyword}%'

OR DocCat LIKE '%{s_keyword}%'

This would have been extremely difficult to formulate manually.

4. Next a separate page was produced for making Author searches.5. Then the version page was created. All versions of a selected document were found and displayed.

6. The next challenge was to return the location of any stored file directly into the web browser. This stretched the capabilities of CodeCharge Studio but was eventually achieved. This means that when the user clicks on the selected document version, the document is retrieved directly into the browser. Luckily IE 5 supports most document types so there was no need to call up any other programs like Word, Excel or Notepad to display the requested document. The only Microsoft document that couldnt be displayed appears to be MS Project documents.7. The final page to be produced was one that displayed the contents of the front end database. This was used to allow users to pick the database (or work area) they wanted.

8. The last stage was to produce a friendly UR