comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: large info structure?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: large info structure? [message #56124 is a reply to message #56120] Tue, 02 October 2007 08:42 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
markb77@gmail.com writes:

> I'm writing a widget application which will serve as a data analysis
> platform for scientific image data. The idea is that after loading
> the image, there are many different types of analysis that the user
> may wish to run on it, and this application will support them all.
> There will be an 'Analysis' dropdown menu, for instance, with several
> options. I also want to make it easy to add new analysis methods to
> the program.
>
> I've finished writing the front end and now I'm in the process of
> adding some analysis. What I'm noticing is that the info structure
> that gets passed around between event handlers is getting to be very
> large. Mine is up to 130 variables, at the moment.
>
> Does anyone have a strategy to suggest for dealing with this type of
> situation?

Ahhmumm, may I suggest writing your widget program as an object? :-)

It doesn't solve the "lots of info" problem, but it
does mean you don't have to pass anything around anymore.
It is ALL built right into the fabric of the program.

And the "lots of info" problem eventually gets sorted out
into a "several objects" solution, which tends to compartmentalize
the functionality and keep things from breaking when adding new
functionality.

There is a danger to this kind of programming, however. It is
easy (WAY too easy!) to make your objects "clever". Which is
good, don't get me wrong. But clever objects make it almost
impossible to follow the programming flow. (Have you ever tried
to figure out how something works in the iTool system?) So I would
resist the clever solution whenever possible and write really, really
simple solutions. Six months from now, you will be VERY glad you
did! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: envi_setup_head for TIFF
Next Topic: What is the main difference between a script and a procedure?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 20:52:27 PDT 2025

Total time taken to generate the page: 1.28057 seconds