in reply to Performance v's Maintainability

You can have your cake and eat it, too. If you abstract the persistence code into a class of its own, you can pass instances of this around without tying your framework to any specific persistence media. You just (a big just, though) have to define a consistent interface to your persistence class and can then hide access to a certain variety of SQL database, flatfiles, DBMs or whatever you may wish to use inside it, without giving up any maintainability. In fact, you're actually gaining another degree of maintainability. The extra layer costs some performance over the hard-wired approach of course, but it can be a relatively thin layer with only minor impact, and if your app is anywhere near as I/O-heavy as one might suspect by your description, it won't make any real difference.

"Every problem in computing can be solved by adding another layer of indirection."
(Another quote I'd love to know the originator and exact phrasing of.)

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Performance v's Maintainability
by pmas (Hermit) on Sep 27, 2002 at 14:48 UTC
    ...solved by adding another layer of indirection
    There is one problem not solvable this way: if you have too many layers of indirection... ;-)

    I recall a discussion in PM about solving problem by adding layers of indirection about a year ago.

    pmas
    To make errors is human. But to make million errors per second, you need a computer.