Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Programming using data structuresby dash2 (Hermit) |
on Feb 20, 2003 at 09:15 UTC ( [id://237026]=perlmeditation: print w/replies, xml ) | Need Help?? |
I've recently done a quick and dirty implementation of quite a big project - not a 100 line script, but a full DB aware program. It still had to be quick and dirty, though, so I had a chance to notice how I program in these circumstances.
One thing I tend to do is use data structures for programming. That is, I create functions that require complex data structures as input. I then create these complex data structures for each of my classes, which then have differing behaviours as a result. Disadvantages of data structure programming
Advantages of data structure programming
The classic example of programming with data structures would be the database schema objects used by e.g. SPOPS, Tangram or Class::DBI. These tend to look like
and to my mind this works quite well. An exception is Alzabo, which makes you use method calls to create the schema; and note that they have felt it necessary to include a web-based schema builder. Your thoughts welcome. dave hj~
Back to
Meditations
|
|