Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parametric program developing
Message
From
31/10/2002 14:14:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00717300
Message ID:
00717477
Views:
22
>Would you like expand this matter with some small samples Hilmar ?

This goes on and on, to your imagination. Here's some (this is actually called "table driven") examples where I used that:

- menus in the table, generated on-the-fly and filtered as needed
- class names, so if in a certain case you want to display a different set of controls, your code finds a proper class for that case in the table, and instantiates that.
- report names, so you have a "report dictionary", with the nice readable name, filename, and a few other properties of the report, so when you need to add a report you just add a record there
- messages table, so you don't have to hunt your messages around the app when you discover one of them is misspelled :)
- zip codes, so when a city changes its name, you don't have to hunt it in all your customers addresses (this happened a lot in the post-communist countries; even more with streets)

As I said, it's up to your imagination. With Fox and its macro expansion, Eval() function and now scripting, you can pretty much have anything built from the data in the tables, to avoid hardcoding the things. These tables are best kept apart from user's data; these are metadata (the data about data) and it's common to keep them in app\metadata directory. Many frameworks do so.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform