more useful options | |
PerlMonks |
Re: Synchronizing constants/enums in database and codeby jplindstrom (Monsignor) |
on Apr 11, 2004 at 15:39 UTC ( [id://344261]=note: print w/replies, xml ) | Need Help?? |
As you have already figured out, there should only be one single representation of a fact in the system (The DRY principle from the Pragmatic Programmers).
So the question is where the fact is stated. Some ideas: You can get it from the database as per your #4. But how does it get into the database in the first place? If you nuke the db, how do you rebuild it? I imagine that somewhere there are SQL scripts for default data.
/J
In Section
Meditations
|
|