Web Application Servers: Everyone’s got one.
Looking back, 1998 has been the year of the web application server. Virtually every manufacturer of software development tools or enterprise application environments has brought out their own – or failing that, bought one! Microsoft’s Visual Studio toolset redefined NT as a web application platform, Oracle repositioned their CORBA-based web-server, Sun bought NetDynamics (and thanks to AOL, got access to Netscape’s Kiva tools), Inprise announced their Java application server, IBM bundled all their tools together and called them WebSphere, and Apple brought out the latest release of WebObjects.
When Apple bought NeXT, it did a lot more than bring Steve Jobs back into the fold and use OpenStep as the basis for MacOS X. The NeXT platform was the home of the World Wide Web, as it was on a NeXT workstation that Tim Berners-Lee wrote the first web server and browser.
The object-oriented basis of the OpenStep environment leant itself to much more than building servers and browsers, and it was here that one of the first web application servers took shape. WebObjects took the NeXT building block approach to heart and used it as the basis of a system to replace the slow CGI interfaces that were the heart of early web applications. It wasn’t long before WebObjects became a cross-platform environment, running Java applications as well as the original Objective C and WebScript on a range of UNIX systems and Windows NT.
Version 4.0 of WebObjects has just been released, adding a “Direct-to-the-Web” application builder tool and support for Macintosh G3 servers as well as UNIX and NT. A key new feature is the ability to multi-thread applications, so that long requests can display feedback whilst processing user data.
A web application developers toolkit
Apple provided a late beta of WebObjects 4.0 for NT, which was installed on a test NT server – one that’s had plenty of web application environments on its disk over the last year. Installing WebObjects on an NT system is a fairly slow process, as there are a lot of files to install and configure. Once installed you’ll find the three main components of the WebObjects development system: WebObjects Builder, Project Builder and the Enterprise Objects Modeller.
The WebObjects Builder is the heart of WebObjects application development. Using this you can layout your application pages, at the same time as managing database connections and any business logic you include in your applications. As well as an HTML editor, it is a fully featured Java editor with support for the WebScript language. Using the WebObjects Builder you can create the core components of an application, connecting internal functionality to an HTML user interface.
Web applications are often bigger than a single file or HTML page, and the Project Builder is used to manage the various pages and components that build an application. As well as an application editor, you can use the Project Builder to compile and debug the various sections of an application. For large team driven application developments, the Project Builder links to most common source code management systems.
The Enterprise Objects Modeller is part of the full Yellow Box cross platform development environment for OpenStep and MacOS X. Unlike traditional database access components, the EOM is designed to allow an object-oriented view of the contents of a database. Instead of providing a view of a static database structure, the EOM allows you to build database interface objects that include a full object model – which uses the database itself for persistency. The EOM also includes facilities for handling application partitioning, allowing development of three-tier client server applications.
You’ll also find the WebObjects installs a collection of tools for building OpenStep applications under NT – including a copy of the Bourne shell, a Java-based sketch tool and a text editor. You’ll find the Java class browser useful, especially if you want to use Java as the main development language for your WebObjects applications. Apple provide a wide range of Java classes as part of the Yellow Box, and these include the Enterprise object classes used by the EOM, as well as database interface elements and the WebObjects classes used to handle input to and from a browser.
Building a simple WebObjects application
WebObjects Developer takes a project-oriented approach to application development. Once you create a project, you can use the Project Builder to select the components you wish to edit. Each section of an application is an HTML page along with an associated Java server application.
Pages are created by dragging and dropping what appear to be HTML elements onto a page, giving you a WYSIWYG approach to application design. However, these aren’t the static HTML elements that are normally used, and you’ll find the raw source of your pages full of <WEBOBJECT> tags.
Once a page has been laid out, you can then start adding variables to your WebObjects elements. This process begins to generate Java code stubs, which can be used to add business logic to your application. You’ll find it difficult to build any applications without adding your own Java classes.
Like NetDynamics Application Server, WebObjects works with three different types of variable, each with a different range and scope:
A key feature of a WebObjects application is “repetition”. This allows a repeating function to be bound to a selection of HTML elements. Repetitions can be used to construct tables from database queries or from the results of calling a Java method.
Only connect: using databases with WebObjects
The OpenStep Yellow Box Enterprise Objects Framework gives WebObjects its database access database tools. This allows you to transfer data from databases into enterprise objects, which include associated methods along with their data. In general WebObjects enterprise objects map to database tables, with an instance equivalent to a single record in a table.
Whilst the Enterprise Object Modeller is WebObjects’ main database development tool, a wizard allows you to put together a basic database connection. You’ll find that WebObjects comes bundled with native connections for Oracle and Sybase databases, along with an ODBC interface for other data types. You can also use your own Java classes to link to CORBA systems and other external applications, as well as to legacy systems.
Using the data wizard, a basic object model for a database is created, based on the database schema. A series of questions allow you to allow for stored procedures, to assign primary keys and define the relationships in a database. You can also assign custom classes to database tables – though you’re usually better off using the internal generic record type initially. The wizard will also layout any data-aware pages your application will use, and generate the required Java code.
Once you’ve created a basic model you can refine it using the Enterprise Object Modeller. This allows you to change the attributes assigned to a class, so you can remove unwanted keys from an application. You can also use the EOM to add new relationships to a model, or to implement complex relationships that could not be determined by the wizard from the database schema. A diagram view makes this task a lot easier, allowing you to see relationships graphically, along with database entities.
You can use the EOM to create master-detail record collections, so that a master record can be used to fetch details that are displayed in a separate part of a WebObjects application. This is used to collect groups of information together, so that, for example, a supplier ID is displayed by a WebObjects application along with any associated orders – even though they are in different tables. By holding this information in data objects, the complexity of an application is kept down.
If you create custom classes, you can use these to add business logic to an enterprise object. This allows you to process data prior to display or to check formats before database tables are updated. WebObjects will automatically generate a stub Java class for a custom enterprise object, using the database schema to generate the class properties. You can then add your own methods to the class – which can then be accessed directly from the WebObjects Builder and Project Builder development tools.
A bigger picture
This overview has only just scratched the surface of what can be done using WebObjects. Some of the world’s biggest and busiest commercial application-driven web sites are run on WebObjects driven systems. These include the online Disney Store and BBC News Online.
One unusual implementation that Apple are using in their WebObjects publicity is cybermeals in Seattle, an online restaurant delivery service – with links to several thousand restaurants. The WebObjects application used by cybermeals also includes email confirmation and links to a telephony application that handles the actual orders to restaurants. Another client is the E*TRADE share dealing service, who are using WebObjects to provide a framework for their international service, allowing them to customise their service for 20 different languages and countries.
WebObjects 4.0 is a major release of this powerful environment, and with high profile implementations appearing regularly is well worth a look. Apple’s pricing has also improved, with developer licences starting at around $1500 per seat and deployment licences starting at $7500 per server.
Web page design tools: The next generation
The latest web technologies need the latest page design tools to help you give your Internet and Intranet applications. Two of the best-known tools on the market are currently being upgraded. SoftQuad have just released version 5.0 of HoTMetaL Pro, with Microsoft currently showing the first public beta of FrontPage.
HoTMetaL Pro 5.0 extends the previous versions, adding support for CSS and W3C DOM-based dynamic HTML. However, it’s still not very good at round tripping HTML, and can have problems with pages developed in other HTML editors as well as with inline server-side scripts. One new feature is support for the Miva tag-based mark-up system, which links HoTMetaL Pro to the Miva e-commerce tools. This is an interesting upgrade of a standard web-page design tool that unfortunately offers little to the application developer.
Things are somewhat different with FrontPage 2000. Microsoft has completely rewritten FrontPage from the ground up for the new Office 2000 release. Like HoTMetaL Pro 5.0, FrontPage 2000 is designed to use the latest web technologies. However, where it succeeds over HoTMetaL is in its support for round trip HTML. Where previous versions managed to mangle both client and server side scripts, FrontPage 2000 is now able to work directly with ASP pages – including displaying Visual InterDev design-time controls. There’s no support yet for XML or for IE 5.0 specific features like DHTML behaviours, but even so, the round-trip HTML performance of FrontPage 2000 will preserve any hand-coded sections of your pages.
STAND up and be counted…
The DTI’s draft electronic commerce proposals are about to go before parliament in the shape of the Millennium Bug and Electronic Commerce Bill. Whilst these contain a number of useful proposals, one section actually threatens the development of a trusted electronic commerce environment in the UK, by forcing the use of government controlled encryption services – with full key recovery. This is despite a manifesto pledge by the government that they would not implement any legislation that would affect how encryption technology is used in the UK.
The key proposals are that companies wanting to provide encryption services, including digital signatures, are advised to apply for a licence. It will not be mandatory to have a licence. However digital signatures that don't have a licensed certificate won't be automatically legally binding. As a result you will have to prove in court that the signature is as good as it is presumed a licensed one will be. This will force businesses to use licensed services, for fear of huge legal bills every time they have to go to court over a contract.
All licences will be regulated by OFTEL, and cover all confidentiality services offered – not just digital signatures. The licence means that all keys must be stored, both public and private, and can be handed to the police or any other law enforcement organization under the terms of existing police legislation. This means that email communications can be intercepted on the say so of a senior police officer – instead of a warrant from the Home Secretary as is currently required.
The security of the key escrow system is not guaranteed, so if like many organizations, you use the same keys to create your digital signatures and certificates, you have no way of guaranteeing that your data is secure. The way the systems are currently likely to be set up, you will have no way of knowing who has access to your encryption keys and digital signatures. As a result organizations running business-to-business e-commerce systems or online secure transactions are likely to move outside of the UK – not into it as the DTI claims.
If you think that something needs to be done about this, pop along to the STAND website at http://www.stand.org.uk/, where you can “@dopt” your local MP, and help educate them in the complexities of this highly technical issue, which will have significant effects on the development of Internet-driven business systems in the UK over the next 10 years.
Summary
