Development Tools

This month has been a month of trying out various web development enviroments. On my lap has landed NetObjects Team Fusion, Macromedia’s Drumbeat, Flash4, and Microsoft’s Visact. All of these environments seem to have a common requirement. This requirement is that you need a large monitor to get the best out of working with them and to stop yourself going barmy, opening and closing windows all the time. However I am fortunate, as at the time I have the loan of a Mitsubishi 2020u monitor. This beast is a 21" CRT monitor with an absolutely flat screen and is capable of running at 1800 by 1440 at 79Hz. To work with a monitor such as this is a real joy.

Previously I was running an Iiyama 17" at 1024 x 768, the increase in productivity is significant as well as the improvement of my mood, although at times there are those in the office who would disagree with this last statement! The Mitsubishi was previously competitively priced at just under a thousand pounds, however this has dropped to a ‘must buy’ price of £650 plus VAT. Although mine is on loan at present, when that dreadful day comes and the nice people want it back, I shall be going out and buying one without hesitation. Of course to run at this sort of resolution, you have to choose your graphics card carefully, so on the recommendation of Aaron at Computer Connections (01473 286 586) I bought a Matrox G400 with 32M of Ram. These cards cost about £150 and are one of the few on the market that will drive this monitor at its highest resolution and at 32bit colour depth.

Along with this upgrade I decided to rebuild my main machine as it is time to have a good clear out of the software, and the installation of NT was getting very flaky at times. Rather than wipe all the data off, I decided to leave the scussi drives in there and add a 14G IDE. The bios on the motherboard lets me select whether it checks IDE or Scusi first for a bootable drive, and so by changing this setting I can either boot up my old configuration or the new one. Even more importantly, I have full access to the old drives when in the new configuration so that I when I reinstall the apps I can transfer the data from the old configuration. Although I never keep any of my data on this machine, that being stored on another server, it is amazing how much vital information is stored within the program directories of certain apps. Slowly the new install is coming together, but it will be some time before I feel confident enough to wipe the old hard discs.

HTC

As regular readers know, I am currently involved in a project that requires the writing of a VB program and the cutting and sending out of this on CD at fairly regular intervals. The battles that one has as a developer, of writing install programs that work on all versions of 32 bit windows is enough to make one give up and sell vegetables instead. If a solution presented itself that made this distribution easier then I for one would welcome it. Some months ago I found a little piece on the Microsoft site about Hypertext Applications (.HTA) and Hypertext Components (.HTC). Later I found that Microsoft Press did a book on the subject, which I bought (Dynamic HTML Reference and Software Development Kit by Microsoft Press ISBN 0-7356-0638-2).

Now the capabilities of this technology are only touched upon in this book but if you read between the lines and extend the possibilities you start to get the feeling that this could be something really big. I wanted to report to you about a development tool that will enable you to write and debug these programs, but as no one at Microsoft UK seemed to be able to come up with any suggestions, I must assume that at present you will have to stick with notepad. When I first saw Microsofts Vizact2000 , which is marketed as a DHTML developing tool, I thought that this may be the tool to do this. However although it does generate true DHTML pages it is surprisingly missing some vital functionality, it does not support pixel-precise positioning of images, so leaving the layouting of most objects on a page down to those dreaded tables still. The exclusion of form objects like buttons, text boxes etc means that its value is limited to the point of being useless.

So, I hear those of you who haven’t fallen asleep ask, what are these .HTA and .HTCs ? Well quite simply they are text files which under IE5 will not only do every thing that an HTML or DHTML web page will do, but will also run as a trusted application. The user is asked if they want to open or save this page, if they open it then the application will run, if they choose save then double clicking on the saved file will run the application. Where these pages differ to ActiveX or Java is that no components need to be downloaded for an application to run, as the components are already installed within IE5 as part of DHTML. The concept is that IE5 is a container in which a scripting language can access all the object model and functionality built into IE. This means that you can have tables on a page that take user input and recalculate the table. Data can be downloaded from a web site to the client so that they can drill down and sort, all without extra calls to the server. Combo boxes can be built which display up to 5,000 items fed from a database without downloading the whole 5,000 items so that the page is rendered quickly.

So lets write our first Hypertext application. Open your trusty copy of notepad and type the words "Hello World" or something similar. Now save the file with the extension .hta, next double click on this file to run it. What happens, is that a window opens that displays your text. At first it seems that notepad is displaying this file. However, if you right mouse click on the background of this window you will see that you have IE’s dialog with ‘view source’ etc in it and not notepad’s. So IE5 is displaying this page not as a web page with all the buttons, but as an application window. IE happens to be very forgiving and does not need <HTML> tags to render a file which makes this demonstration easy. So now what do you do? Well there is an application object that enables you to set things like whether title bars appear as well as all other properties of the application window.

I will not attempt to put the code in this article as the formatting of the pages can lead to interesting results, but if you point your browser to http://www.ecats.co.uk/pcpro.hta then you can see an example that I quickly knocked up, and if you do a ‘view source’ then you can wonder at my code, most of which I must confess, was stolen from the Microsoft examples at http://msdn.microsoft.com/workshop/c-frame.htm#/workshop/author/hta/reference/htaref.asp. Although this demo application is not very impressive, what will make your jaw drop is what Microsoft have done with this technology in the new web front end to Exchange which is currently called Platinum. This product is some 7 months from release. This web front end is an HTA that looks and feels just like the Windows application, Outlook. If this is an example of what can be done then I believe that what we have here is an exciting and powerful application generation technology and more importantly a delivery mechanism for applications. All we are now waiting for are the development tools that will enable us mere mortals to develop solutions like the ones being turned out by the eggheads in Redmond. Visual Basic 7 has apparently many HTML-like functions and this may become the DHTML tool that is needed, although InterDev is closer at the moment, but the dividing lines are beginning to blur between web development and application development. It's all a case of ‘watch this space’.