Prefs and Settings - best practices

2005-05-02 Thread Mikey
So is there a consensus on best-practices to handle settings for Rev
apps?  Substack?  File?  Registry?
-- 
http://taoofrunrev.blogspot.com
http://taoof4d.blogspot.com
http://4dwishlist.blogspot.com
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, This is good.
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Prefs and Settings - best practices

2005-05-02 Thread Scott Rossi
Recently, Mikey  wrote:

 So is there a consensus on best-practices to handle settings for Rev
 apps?  Substack?  File?  Registry?

One could argue the OS developers made Preferences locations for a reason.
It's standard to write where appropriate for the platform: Registry makes
sense for Windows and the Library/Preferences folders make sense for OSX
(System Folder/Preferences for OS9).  That being said, there are other
locations such as Application Support folders and equivalent, and one should
consider whether they are writing prefs for the current user or for any user
of the app on the current machine (save prefs under Current User or All
Users).

So while there are a few options for prefs locations, the one place I would
avoid saving preferences to is your app's folder.  It's likely that write
permissions will be disabled there so prefs will not be saved, or even
worse, users will get an error or possibly a virus alert when your app tries
to save.  Using the designated prefs locations makes better sense.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia  Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Prefs and Settings - best practices

2005-05-02 Thread Chipp Walters
Mikey,
I like to store them in the user prefs area (different folder for each 
OS) as XML files. They're easy to parse, and easy to write to and allow 
for future updatability.

And, because stacks are difficult to create (on the fly) from a server, 
I generally only use them if I have to store some sort of binary data 
(logo) with pref files. If you're interested in cross-platform 
compatiblity, it's best to stay out of the registry, unless you have to 
be there (file associations).

best,
Chipp
Mikey wrote:
So is there a consensus on best-practices to handle settings for Rev
apps?  Substack?  File?  Registry?
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Prefs and Settings - best practices

2005-05-02 Thread Richard Gaskin
Chipp Walters wrote:
And, because stacks are difficult to create (on the fly) from a server, 
I generally only use them if I have to store some sort of binary data 
(logo) with pref files.
What sorts of issues have you found?
This seems to work well on my BSD server:
#!mc
on startup
  -- make the stack:
  create stack tt
  -- set some props to verify it's working:
  set the destroyStack of stack tt to true
  set the uTT of stack tt to the long seconds
  -- put it away:
  set the filename of stack tt to data/test.mc
  save stack tt
  close stack tt
  -- send something back to the browser:
  put test--  the long seconds into tData
  put Content-Type: text/html  crlf \
 Content-Length: length(tData)  crlf  crlf
  put tData
end startup
--
 Richard Gaskin
 Fourth World Media Corporation
 __
 Rev tools and more: http://www.fourthworld.com/rev
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Prefs and Settings - best practices

2005-05-02 Thread Chipp Walters
Hi Richard,
For various reasons, we choose not to use MC on the server. The big one 
being it's unusual high use of resources per connection. Though Pierre 
has a nice workaround for it using Perl (or is it PHP?), we pretty much 
standarize on either MySQL or MS SQLserver.

I ran into this problem with Item Wizard launch/config files in our 
Hemingway Content Management System. Originally I had authored them as 
small read-only stacks, but then found I couldn't create them 
dynamically from the server w/out installing the MC engine, which we 
didn't want to do. I ended up re-authoring them in XML.

So, now, I think carefully about whether or not the file can be created 
in XML, and if so, I tend to use it instead of stacks. BTW, I think I 
remember Geoff Canyon ahwile ago created a STACK-XML-STACK utility. 
Pretty cool, but I couldn't figure out what I'd do with it, now I know!

best,
Chipp
Richard Gaskin wrote:
Chipp Walters wrote:
And, because stacks are difficult to create (on the fly) from a 
server, I generally only use them if I have to store some sort of 
binary data (logo) with pref files.

What sorts of issues have you found?
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution