How do I make simple multiple user access app?

Lynch, Jonathan bnz2 at cdc.gov
Thu Jun 30 09:37:37 EDT 2005


This simplest way, in my opinion, is this...

Have the data for each record be stored in a text file that is placed in
a folder that is only used for storing these records.

Have a rev app that allows the user to access the records as needed, but
not all records at once.

Whenever someone opens a record, have the app place the word "open " &
the users ID & whatever character you use as your itemdelimiter [I
prefer numtochar(28)] before all the text in the file.

When someone else tries to access that record, the app will see that
word 1 of item 1 of the file is the word "open", and that it is open for
a different user ID - and will know that it can only be opened in a
read-only mode.

You can create an override handler as well, so that the new user can
assume control of the open file, if necessary, in case the first user
failed to close the record for some reason. 

When finished with a record, the first item should be changed to "not
open", and then the record will be accessible to other users.

Storing information in separate text files is tricky at first, but once
you get used to it, it is very powerful. Doing it this way means your
stack does not constantly get larger as the dataset grows. It also means
you are not constantly saving and resaving your program, which increases
the odds of your stack becoming corrupted.

Another advantage to this approach is that you do not need to have your
program installed on every user's machine. Just have it on the shared
drive, and link to it from every user's desktop. Since it loads up into
memory when it runs, and since you are not saving changes to the stack
itself, it does not cause any problems to have multiple users running
from the same executable file. (This is on Windows - don't know if this
is also true for Mac or Linux)

The advantage to having just one executable that everyone runs is that
when you make a change to it, that change will show up for every user
whenever they restart the program.

Cheers,

Jonathan

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of keith
Sent: Thursday, June 30, 2005 3:44 AM
To: Revolution List
Subject: How do I make simple multiple user access app?

I've been working things out as much as possible by using the 
documentation and searching my email archives, but I'd appreciate 
some live input on this if y'all don't mind!

What's the very simplest way to build a basic card database stack 
which needs to be used by more than one person at once?

This is a simple data capture tool which creates a new card for each 
chunk of data that's entered (details on a new product) and spits out 
a tab-delimited text file to be sent off to another organisation for 
their use.

There's probably no need to alter existing data, but it would be 
necessary to let the user browse through previous entries. Easy 
enough: previous/next, popup menu listing the cards by product title, 
etc. We're talking just hundreds of items here, with simple 
sub-categories to keep browsing manageable if it grows much beyond 
that. But here's the twist...

It is likely to be left open on someone's screen, but it is also 
likely to be needed by one or two other people at the same time. The 
information (the cards with their fields and other controls) needs to 
be collated/kept in one location (i.e. run from the local network 
file server?), not as separate collections of data on different 
'single user' machines.

To start with at least there's no chance of a true server database 
such as MySQL. So, how is multiple user access handled in a situation 
like this, where it is all down to Revolution? What's the simplest 
solution, both in terms of ease of creation and robustness, that 
you'd suggest? (This aspect could be done in FileMaker, but that app 
just makes me want to scream when it comes to development control. It 
is as inflexible and blinkered as Revolution is flexible and 
open-ended! :-)

Thanks in advance, my fingers are crossed!

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




More information about the use-livecode mailing list