Guidelines for Using Stacks on Web Back End
Sivakatirswami
katir at hindu.org
Tue Aug 14 14:52:12 EDT 2007
Though I've use simple text CGI with revolution for nearly 8 years, I'm
just now getting started with stacks as back end libraries on the web
server.
It's marvelous!
A couple of caveats I ended up banging my head against.
Perhaps someone can articulate the "Rules of the road" with better precision
than my bumbling hard knocks discoveries.
Confirm, deny or clarify the following:
Assumes in all the following we have
start using "SongsListing.rev" # at the beginning of our cgi...
1) I had some failures which were cured by adding the
word "stack" but, frankly I wasn't debugging from ground zero and possibly
I had another error in my script and was blinded sided
into drawing wrong conclusions. So:
is there or should there be any difference between:
start using "../httpdocs/Music/SongsListing.rev"
start using stack "../httpdocs/Music/SongsListing.rev"
or should these be equivalent?
CMS note: seems better to keep these stacks in the directory realm where
they belong rather than turn the cgi-bin into a maze...
if you have 20 web apps, all distinct, with their own separate content
directories
putting their dynamic delivery resource stacks all in the cgi-bin
just gets more and more confusing...
feel free to comment.
2) read reference to data in fields of the library stack require using
explicit
stack declarations
start using "../httpdocs/Music/SongsListing.rev"
put fld "artists" into tArtists
# the above fails...
start using "../httpdocs/Music/SongsListing.rev"
put fld "artists" of stack "SongsListing" into tArtists
# where we use the stack name minus the file extension
# the above works... why?
3) write reference: adding data to a back end stack library:
put cr & "AR | Aruni Ranganathan" after fld "artists"
put cr & "AR | Aruni Ranganathan" after fld "artists" of stack
"SongsListing"
save this stack # or # save stack "SongsListing"
# both the above fail?
How do you get a cgi (or any script that puts an external stack
into use) to add data to a stack that is in "library mode"? I see in one of
Andre's things he did for us that he uses the form:
go invisible stack "SongsListing"
This implies that even though an external stack has received the
"libraryStack" msg, and it's scripts are now "in play"
that it's field or custom props are still not in a "read-writeable"
mode...
I'm missing something very simple.
Need help: Please clarify... best practices...
OT: (old subject) where is all this best documented? We have at least
1/2 dozen
initiatives going now to provide cyberspace for rev resources...
but still a virtual black box for any newbie looking for help.
Eric's resources picker being the best solution floated to date.
but I don't think it is up to date with new repositories.
TIA
Sivakatirswami
ps. see http://www.himalayanacademy.com/natchintanai/
for a web page that delivers random selection and which is dynamically
rebuilt
with Rev cgi and back end data stacks. disclaimer: only of interest to
Tamil devotional song fans...
More information about the use-livecode
mailing list