Welcome to my online portfolio, the complement/substitute for my resume. The opinions included herein are my own and do not reflect those of any client or employer, past or present. Please check out the new site: http://danieljohnsonjr.com

Friday, February 2, 2007

Backing up the bridge applications and drive-independence

When I was developing the bridge applications, I had set the code up to recognize a "test" environment and a "production" environment through hard-coded filenames. It became cumbersome to change the filenames in code every time I moved the application to each environment. We also realized we needed to set up a "standalone" environment for the applications.

...hence, the need for the application to be made "drive-independent".

I wound up setting a property in one of the main VBA classes to "auto-discover" its environment as the application launched. That made it possible to move copies of the application easily among the test/development, production, and standalone environments.

While we're on that topic, every week we need to backup the copies of the bridge applications from the production environment to the other two. The reason for this is because there are certain changes made to some self-correcting features while payroll specialists run the applications each week. (I'll have to discuss these features in a separate post.)

For a few weeks I would manually navigate to each folder that contains a bridge application and copy the application file over to the other environments. That's okay for a couple of files, but as we started implementing this for several clients, it became very cumbersome.

The solution: batch files. I created batch files that copy all the files from the production environment to the development/test and standalone environments. What used to take 45 minutes now takes 1 minute. Way cool.

No comments: