Gahhhhhhhh!!! Every programmer hates this...
Ok,
I have a question which is more in theory/concept than a concrete question. Basically I have been handed 6 VB6 applications that have NO documentation, NO comments, and the origional developer(s) is(are) either long gone or long since forgotten. The code is terrible in both structure and design.
These applications currently use DAO and an Access 97 database to store their data. The issue is these applications were from a recently purchased company and now we have been mandated to get their data to integrate with our data. (Were both manufacturing company's of similar products.) Currently all of our engineering data is stored in an Oracle 9i enterprise server and we have several applications (VB6, C++, ASP, ASP.Net, Python/Zope) which interact with the data.
I have been tasked with the "conversion" of these applications from using Access as a database to using Oracle. While most of the applications were initially started by a part time programmer (whom I'd like to kick, but that's anoither story) the last one I am looking at now was written entirely by an engineer in the "cobbel feature, test, deploy" development cycle, for lack of a better term. As you can imagine after 6 years of continous cobbeling there is no clear program flow or structure.
I regret to say it but there are well over a hundred global variables which "control" how the application runs. Above and beyond that, he always implictly used forms (IE he never declared a form on his own, just let VB do it [Grrrrrrr]).
Givin this situation, I want to attempt to inject some resembelence of OOP into the application in regards to the database access. For the previous apps, I wrote 2 custom classes for the database: a singleton connection class and a "recordset" class which mimiced several of the features of DAO. I would love to (and seriously hate the engineer [who is now my boss]) rewrite the application, but I only have 3 weeks before I MUST have all these applications ready to deploy. None of this would of been that bad untill I walked into the verification and testing phase of this application, in which I was informed I was givin the wrong source, as it was 2 years out of date.
**********
Ok, that's my situation and I am wondering:
A) Is there any software that can take a VB6 spaghetti code application and give me a visual representation of the "workflows" and data (IE who is really using those global variabels. (Hopeing for a trial version that I could use, as I am sure there would be no way I could get the $$ to get it before the deadline.)
B) Is there any way to prevent VB6 from allowing implied decleration of forms? (Option Explicit dosen't do it.)
C) Do you know of any other tools which would help in defining the code (Also looking for dead code, as I KNOW there is some that exists.)
D) Anyone else have a story to share and how they addressed it short of a ugly bandaid or a complete rewrite?
Start Free Trial