What's the Best Way?

new topic     » topic index » view thread      » older message » newer message

I've got a big project I'm workin' on, and I've come across a question for
which my experience cannot yet provide a reliable answer... so, I'm throwing
it out here:

I'm creating an include file to help me with data management. Right now I am
accessing the include's procedure with abc( COMMAND , Parameters ), where
abc is the procedure, COMMAND is the particular command, and Parameters is a
sequence containing the parameters for the COMMAND. (Duh, right? smile )

Right now, any output is automatically sent to a global variable, abcOutput,
for the programmer to parse himself.

It goes something like this:

    abc( GET_DATA , { recID, field } )

and abcOutput would contain the data returned by that command.

But would it be better for me to make individual procedures/functions?
Instead of

    abc( GET_DATA , {recID, field} )

I would use

    abc_get_data( recID , field )

or turn it into a function,

    abcOutput = abc( GET_DATA , { recID , field } )

or

    abcOutput = abc_get_data( recID , field )

Right now it has, maybe, 10 commands, and is handled like this:

procedure abc( sequence command , sequence params )

    if command = COMMAND_ONE then...

    if command = COMMAND_TWO then...

    etc...

end procedure

What's the most efficient way? I'm thinking about cross-platform
compatibility, maintainability, extensibility, etc-bility...

Thanks for your input!

<\<

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu