Subject | Re: [firebird-support] database refactoring |
---|---|
Author | Woody |
Post date | 2006-04-06T07:17:34Z |
From: "Mike Dewhirst" <miked@...>
discussions, we should probably do it by email unless others here are also
interested.
I basically approached it by thinking about the basics needed to make
updating schemas work with any of my databases. Since I am now using
Firebird exclusively, I only concentrated on this type of database.
1. Naming Updates
Since I'm terrible at giving things names ( I like using things like uhrae:
array [1..10] of integer ) I decided that a versioning system like normal
programs have would work best. I added automtic updating of versioning
numbers containing Major, Minor and Release when you add an update.
2. Reminder/Note
You normally make changes for a reason so I figured that a comment about the
update couldn't hurt down the line. Later on when you try to remember why
you changed a field from VarChar(50) to VarChar(70), it's nice to see a
short comment about why to refresh your memory. :)
3. Easy to use
The biggest problem with the easy to use method is that you have to give up
some things to keep it simple. I generally work out the SQL I need using
IBOConsole or something and then cut and paste the code into the editor. I'd
like to be able to test it right there but just don't seem to be able to
spend the time to make it happen.
4. Easy to maintain
The program stores all projects in a single file using streaming. It
contains buttons to add/del projects, add/delete updates and create the
update file for a particular project. This file is the one that the update
class unit reads to perform updates on a database.
some of the things he talks about.
Unit Organizer: I use this utility to sort the procedure and functions in a
unit in alphabetical order. Much easier to find when they are ordered.
Search/Replace Program: I use this often to change global references
throughout a project. I can even search/replace inside of Delphi forms and
datamodules.
Graphics Viewer: When searching for icons or bitmaps, I use this to display
selected files in any directory. It can also print the graphics. It handles
bmp, ico, and jpeg.
Printing utility: I write all my own reports and printouts. I created a
print driver containing a preview and zoom functions. It can take most any
command a TCanvas can and contains functionality for column printing,
rotated fonts, etc. It makes creating reports a breeze, for me anyway.
Setup program: I wrote my own setup program which has two parts, the builder
and the actual setup. The builder keeps track of projects and I can define
any files to include, which zips to put them in, menu item entries, desktop
shortcut, include database server/client files, etc. It can even create a
network setup so the programs can be installed on the network for easy
installation on workstations. The workstation is then set to look at the
network directory for program updates automatically each time the program is
run. Makes upkeep that much better. An admin is required to set the updates,
though.
I probably have several others I use every now and then as I'm sure most
programmers do. There's just something about using something you built
yourself.
Woody (TMW)
>This is quickly turning off topic for FB support so if you want to continue
discussions, we should probably do it by email unless others here are also
interested.
> Would you care to discuss the design decisions you made in Versionator?By design, I suppose you mean logic design decisions and not aesthetic ones.
I basically approached it by thinking about the basics needed to make
updating schemas work with any of my databases. Since I am now using
Firebird exclusively, I only concentrated on this type of database.
1. Naming Updates
Since I'm terrible at giving things names ( I like using things like uhrae:
array [1..10] of integer ) I decided that a versioning system like normal
programs have would work best. I added automtic updating of versioning
numbers containing Major, Minor and Release when you add an update.
2. Reminder/Note
You normally make changes for a reason so I figured that a comment about the
update couldn't hurt down the line. Later on when you try to remember why
you changed a field from VarChar(50) to VarChar(70), it's nice to see a
short comment about why to refresh your memory. :)
3. Easy to use
The biggest problem with the easy to use method is that you have to give up
some things to keep it simple. I generally work out the SQL I need using
IBOConsole or something and then cut and paste the code into the editor. I'd
like to be able to test it right there but just don't seem to be able to
spend the time to make it happen.
4. Easy to maintain
The program stores all projects in a single file using streaming. It
contains buttons to add/del projects, add/delete updates and create the
update file for a particular project. This file is the one that the update
class unit reads to perform updates on a database.
>Along with the Versionator program, I have several others I've written to do
> What do you think of Fowler's list of 'simple' tools?
>
some of the things he talks about.
Unit Organizer: I use this utility to sort the procedure and functions in a
unit in alphabetical order. Much easier to find when they are ordered.
Search/Replace Program: I use this often to change global references
throughout a project. I can even search/replace inside of Delphi forms and
datamodules.
Graphics Viewer: When searching for icons or bitmaps, I use this to display
selected files in any directory. It can also print the graphics. It handles
bmp, ico, and jpeg.
Printing utility: I write all my own reports and printouts. I created a
print driver containing a preview and zoom functions. It can take most any
command a TCanvas can and contains functionality for column printing,
rotated fonts, etc. It makes creating reports a breeze, for me anyway.
Setup program: I wrote my own setup program which has two parts, the builder
and the actual setup. The builder keeps track of projects and I can define
any files to include, which zips to put them in, menu item entries, desktop
shortcut, include database server/client files, etc. It can even create a
network setup so the programs can be installed on the network for easy
installation on workstations. The workstation is then set to look at the
network directory for program updates automatically each time the program is
run. Makes upkeep that much better. An admin is required to set the updates,
though.
I probably have several others I use every now and then as I'm sure most
programmers do. There's just something about using something you built
yourself.
Woody (TMW)