Re: Standalone - Using stack as DB

2008-08-02 Thread Scott Morrow

Peter,
I think a common variation is to have a standalone application (which  
most long-timers try to put minimal code into), a program main  
stack (perhaps with substacks) which can also be a stack file that  
the standalone loads first to establish the interface (and doesn't  
need to be saved), and data files which can also be substacks.  Then  
just the data substacks need to be involved with the save process.   
Keeping the data separate from the everything else has been consistent  
advice on this list.


Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web   http://elementarysoftware.com/
email [EMAIL PROTECTED]
--
On Aug 2, 2008, at 1:35 AM, Peter Alcibiades wrote:



Yes, very true.  This is, now its pointed out, obviously the  
underlying
source of my power off/saving problem.  Its also an argument against  
using
the traditional splash stack and then a real program + data stack,  
is it
not?  One should rather have a program main stack, and then data  
substacks.
No need ever to save the program stack since it never changes, just  
save the

data stacks as changed.  Is this what you usually do?


Eric Chatonet wrote:



I should have added that this way of doing never mix any line of code
with user's data in the same file.  And I think it important.




--
View this message in context: 
http://www.nabble.com/Re%3A-Standalone---Using-stack-as-DB-tp18756589p18787268.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution









___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-08-02 Thread Eric Chatonet

Bonjour Peter,

Actually, splash stack architecture is the best one because it allows  
you to run you app/exe and Rev IDE simultaneously with the same project.
You test the app and correct in the IDE: at next launch of the app,  
you'll use changes made in the IDE because most of your code is not  
in the splash stack but in separate stack files. e.g. without having  
to rebuild an app/exe.


Now as for user data, external files are a good choice but you can  
use stacks also assuming there is not any code in these stacks and  
they are simple containers you are able to restore (from a template  
stack kept in a custom property for instance).


Le 2 août 08 à 10:35, Peter Alcibiades a écrit :

Yes, very true.  This is, now its pointed out, obviously the  
underlying
source of my power off/saving problem.  Its also an argument  
against using
the traditional splash stack and then a real program + data stack,  
is it
not?  One should rather have a program main stack, and then data  
substacks.
No need ever to save the program stack since it never changes, just  
save the

data stacks as changed.  Is this what you usually do?


Eric Chatonet wrote:



I should have added that this way of doing never mix any line of code
with user's data in the same file.  And I think it important.


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-08-02 Thread Richard Gaskin

Scott Morrow wrote:
I think a common variation is to have a standalone application (which  
most long-timers try to put minimal code into), a program main  
stack (perhaps with substacks) which can also be a stack file that  
the standalone loads first to establish the interface (and doesn't  
need to be saved), and data files which can also be substacks.  Then  
just the data substacks need to be involved with the save process.   
Keeping the data separate from the everything else has been consistent  
advice on this list.


Yep, that's how I work.  I've come to love using stack files for data 
storage.  They give me all the flexibility I've enjoyed with my own 
custom formats but I don't need to worry about parsing the file, since 
the built-in routines for getting and setting properties make it dirt 
simple to stuff any data I need discretely.


Extra bonus points:  simply setting the password of the data file makes 
the data unreadable to other apps.  Sometimes I do this with hard-wired 
passwords just for modest on-disk protection.  If I need user-managed 
security I use either fwPack/fwUnpack 
(http://www.revjournal.com/tutorials/handy-handlers-005.html) for very 
modest security, or Rev's encryption externals for industrial-strength 
security.


And a nice extra:  in those rare cases when a save is interrupted, the 
engine has automatically made a backup of the last good save (the ~* 
copy), which has made a couple of my end-users very happy to learn about. :)


--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Standalone - Using stack as DB

2008-07-31 Thread Bert Shuler

I have a main stack with 2 sub stacks.
I use the sub stacks as a db, flipping through the cards and saving  
them on changes.

Now when making a standalone, the save does not save the sub-stack data.
What is the best way to use substacks for data?

Thanks

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-07-31 Thread Eric Chatonet

Bonjour Bert,

Le 31 juil. 08 à 16:24, Bert Shuler a écrit :


I have a main stack with 2 sub stacks.
I use the sub stacks as a db, flipping through the cards and saving  
them on changes.
Now when making a standalone, the save does not save the sub-stack  
data.

What is the best way to use substacks for data?


I assume that you did not check the 'Move substacks into individual  
stackfiles' box in the stacks pane of Standalone Application Settings.
For this reason, your substacks are part of the app and a app can be  
saved.

You can only save a stack that is not included in your app.

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-07-31 Thread Bert Shuler

That seems to have done it! Thanks so much.


On Jul 31, 2008, at 10:44 AM, Eric Chatonet wrote:


Bonjour Bert,

Le 31 juil. 08 à 16:24, Bert Shuler a écrit :


I have a main stack with 2 sub stacks.
I use the sub stacks as a db, flipping through the cards and saving  
them on changes.
Now when making a standalone, the save does not save the sub-stack  
data.

What is the best way to use substacks for data?


I assume that you did not check the 'Move substacks into individual  
stackfiles' box in the stacks pane of Standalone Application Settings.
For this reason, your substacks are part of the app and a app can be  
saved.

You can only save a stack that is not included in your app.

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-07-31 Thread Richard Gaskin

Bert Shuler wrote:

I have a main stack with 2 sub stacks.
I use the sub stacks as a db, flipping through the cards and saving  
them on changes.

Now when making a standalone, the save does not save the sub-stack data.
What is the best way to use substacks for data?


As Eric noted, applications cannot modify themselves at runtime, so 
you'll want to break out any savable data stacks into a separate stack file.


For more info on saving data in standalones, Sarah Reichelt has written 
a very helpful tutorial on this at revJournal.com:


http://www.revjournal.com/tutorials/saving_data_in_revolution.html

--
 Richard Gaskin
 Managing Editor, revJournal
 ___
 Rev tips, tutorials and more: http://www.revJournal.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-07-31 Thread Eric Chatonet

Bonsoir à tous,

Le 31 juil. 08 à 17:03, Richard Gaskin a écrit :


Bert Shuler wrote:

I have a main stack with 2 sub stacks.
I use the sub stacks as a db, flipping through the cards and  
saving  them on changes.
Now when making a standalone, the save does not save the sub-stack  
data.

What is the best way to use substacks for data?


As Eric noted, applications cannot modify themselves at runtime, so  
you'll want to break out any savable data stacks into a separate  
stack file.


Actually, I never save any stack that is a part of any application  
package.
I always prefer to use externals files (text, xml, database, etc.) to  
save user's data or his preferences.
And for stacks designed to run in the IDE (plugins, utilities) I  
create a custom propertyset in revpreferences stack.
This ensures that files I have created can't be corrupted in any  
case :-)


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Standalone - Using stack as DB

2008-07-31 Thread Eric Chatonet

Sorry:
I should have added that this way of doing never mix any line of code  
with user's data in the same file.

And I think it important.

Le 31 juil. 08 à 17:23, Eric Chatonet a écrit :


Bonsoir à tous,

Le 31 juil. 08 à 17:03, Richard Gaskin a écrit :


Bert Shuler wrote:

I have a main stack with 2 sub stacks.
I use the sub stacks as a db, flipping through the cards and  
saving  them on changes.
Now when making a standalone, the save does not save the sub- 
stack data.

What is the best way to use substacks for data?


As Eric noted, applications cannot modify themselves at runtime,  
so you'll want to break out any savable data stacks into a  
separate stack file.


Actually, I never save any stack that is a part of any application  
package.
I always prefer to use externals files (text, xml, database, etc.)  
to save user's data or his preferences.
And for stacks designed to run in the IDE (plugins, utilities) I  
create a custom propertyset in revpreferences stack.
This ensures that files I have created can't be corrupted in any  
case :-)


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution