Stack file organisation
Jan Schenkel
janschenkel at yahoo.com
Tue Dec 17 21:04:01 EST 2002
--- Sarah <sarahr at genesearch.com.au> wrote:
> Hi All,
>
> I am about to start a major project and I have
> various ideas about
> stack organisation that I wanted to float past the
> group and see if
> anyone had any experience or advice either way.
>
> My application will have a set of interface stacks
> that do not need to
> be writable and a single data stack that is written
> to. This seems to
> lead to two possibilities:
>
> 1. Make it all in a single file and separate out all
> the sub-stacks
> when I build.
> 2. Make the interface stacks in one file (and build
> into a single file)
> and the data stack in another.
>
> [snip]
>
> Having written all this, I think I am swaying
> towards the separate
> sub-stacks option, but if anyone has any warnings or
> suggestions, now's
> the time :-)
>
> Thanks,
> Sarah
>
Hi Sarah,
Depending on the number of records and the type of
data in them, you might be better off using a 'real'
database, such as Valentina, to store your data.
>From what I've read here, performance can suffer if
you have more than a thousand cards or so, as the
engine will load the entire stack into memory.
If you still want to go for a data stack, you should
have a look at Rob Cozens' Serendipity library, which
contains the SDB database manager.
And in case you'll be doing all of the programming of
the storing/retrieving code yourself, yes you would
have to use 'long' names to refer to the objects in
the data stack.
Or you could use 'send' to trigger messages in that
data stack, which can then refer to 'this stack' and
be working on the right stack -- with limitations, as
you can't 'send' over arrays for example.
Best regards,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the use-livecode
mailing list