Q. data stacks and app design

Ken Ray kray at sonsothunder.com
Fri Oct 4 00:22:00 EDT 2002


Ron,

I'd say that it generally has to do with the size of the data: if it's
*really small*, custom props work great, but you have to be careful not to
try and set custom props of your standalone because that data won't be saved
when you quit. If you're keeping small amounts of data, an external file has
its advantages because it is quick to read and write to. However if you have
a *lot* of data, and the data is more or less organized into "records", a
database connection is probably best if you can set it up that way.
Otherwise, a stack that has the same cloned architecture as the stack
presented to the user for data entry is good because you get that 1:1
relationship between fields and you can write a simple "put field x of stack
<A> into field x of stack <B>)" kind of script.

The other thing that seems to me to be easier to maintain in custom props is
data that needs to be in an array form. Since custom props already are
basically arrays, you can take advantage of that without having to worry
about data delimiters you'd have in files/databases/cloned stacks.

That's my $0.02, anyone else want to chime in?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Ron" <rbarber at yhb.att.ne.jp>
To: <use-revolution at lists.runrev.com>
Sent: Thursday, October 03, 2002 11:23 PM
Subject: Re: Q. data stacks and app design


> Ken, and others,
> Would you care to comment on the pro/cons of maintaining a data file or a
> preference file as an external text file rather than, say, a user prop of
a
> data/pref stack?
>
>
> Is it simply a matter of 'style' or are there distinct advantages to each?
>
> Thanks
> Ron
>
>
> > From: "Ken Ray" <kray at sonsothunder.com>
> > Organization: Sons of Thunder Software
> > Reply-To: use-revolution at lists.runrev.com
> > Date: Thu, 3 Oct 2002 21:42:28 -0500
> > To: <use-revolution at lists.runrev.com>
> > Subject: Re: Q. data stacks and app design
> >
> > Alex,
> >
> > Why don't you just maintain the data in an external text file? Then, you
can
> > read and write it as simply as:
> >
> > put url ("file:" & tFileName) into tData
> >
> > and
> >
> > put tData into url ("file:" & tFileName)
> >
> > Ken Ray
> > Sons of Thunder Software
> > Email: kray at sonsothunder.com
> > Web Site: http://www.sonsothunder.com/
> >
> > ----- Original Message -----
> > From: "Alex Rice" <alex at mindlube.com>
> > To: <use-revolution at lists.runrev.com>
> > Sent: Thursday, October 03, 2002 7:35 PM
> > Subject: Q. data stacks and app design
> >
> >>
> >> So I think I need to use a data stack. What's the most elegant way to
> >> get cards and/or stacks to write all it's state out to disk, which I
> >> can go check on later from another stack, and write a report from the
> >> responses? I hope this question isn't too vague. I'd be glad to tell
> >> more about the application if it's not clear what I'm asking.
> >>
> >> Thanks in advance!
> >>
> >> Alex Rice, Software Developer
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list