Friday, December 07, 2007

HTA Application

Ever heard of it? Me neither until I started my current job.

The "application" part is redundant actually as the "A" in "HTA" stands for "application".

Anyway, I have one I need to fix at work preferably before my last day this Friday.

It's an unholy mix of VBScript and JavaScript in a gelatinous* mass of client and server side code with a healthy dash of classic ASP and PHP (and now I am adding some ASP.NET into the mix). Throw in a lot of XML and you have a recipe for disaster. I guess this type of application predates ASP or AJAX.

It could be kind of cool, but whoever wrote it was lacking in several key areas. Namely a basic grasp of logic. And skill.

I would never have touched it but I kind of have to and I thought it would be fun.

It, along with all of this departments web apps, were moved to a production IT environment and the old web server (a 5 year old Dell sitting in an empty cube) is supposed to be removed from the network. I haven't taken the old one offline yet, for no particular reason other than I like to annoy the IT guys.

Now, for the past month I've been going through all of the department apps and updating them to all use a global config wherein the connection string to the database is stored because IT is kicking us off our current SQL Server and moving us to a production IT environment.

This story is taking way too long.

In the course of updating the programs I discovered that this HTA application has tons of hard coded references to the old web server. Include files, regular links, style sheets, ASP pages that receive database queries and spit back out recordsets in XML. Good stuff. This app is used by everyone. Their bread and butter.

I can only imagine the hell that would have broken loose if the old web server was remediated before this was discovered.

I fixed the hard coded links by using variables to which I assigned certain property values retrieved from JavaScript objects.

The ASP pages that returned XML were funny. They literally built the XML by doing a whole lotta this response.write <record>.

This post is boring. I quit. I had a conclusion but I lost it.

*I edited this post to change the word I used from glutinous to gelatinous because glutinous actually means glue-like or sticky and this thing is anything but.


Anonymous said...

:) funny

btw, you can convert any hta application to EXe using this tool hta converter

gagknee said...

i would, but thank buddha, i don't work there any more.