[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: cooperation between existing Perl cgi programs and Minivend possible?
Quoting Philip Tsai (tsailipu@yahoo.com):
>
> Hello all,
>
> I am a new user of minivend and just start to learn
> the intricacy of MV. To start, I have read through the MV documentation
> and searched through the mail archive
> for a topic that I think, to many users coming from the popular Perl
> cgi scripting community, should probably be an FAQ. However, I can't
> quite find discussions or
> documentation about this:
>
> Is it possible for existing Perl cgi scripts to
> cooperate/interact with Minivend ? For instance, say if I already have
> a Perl script that implements stage-by-stage form-filling, -verifying
> and -confirmation tasks (a popular, basic task for a cgi script, I
> hope), will it be able to update/modify/share
> a product/order/user DB with MV ?
>
> By reading MV doc., I know one can always re-implement such
> form-filling/verifying task using MV
> templates and tags. However, there are some merits to a standalone,
> working Perl cgi scripts (for one thing,
> form-filling/verifying/confirmation can be implemented in one cgi
> script, whereas if one is to do such stage-by-stage task, one has to
> write separate MV pages (if my understanding of MV is correct so far)).
> That's why I wonder whether in general it's possible for external Perl
> scripts to cooperate with MV at least w.r.t. the use of common DB
> files. One possible issue that arises is the possible DB file-locking
> between Perl and MV, i.e. can a Perl script simply lock a MV DB file
> (say, *.asc/gdbm) while reading/updating that file without running into
> a race condition with MV ?
>
> To a new user coming from Perl cgi-scripts, the above seems to be a
> natural question to ask, and if so, perhaps we can make it an FAQ ? :)
>
Here is where DBI comes in. As long as you use a SQL database, you
should be fine there.
MiniVend's internal databases would require locking (or access by using
its modules). It does honor file locks on the ASCII files so you could directly
access those if you wanted without too much fear of corrupting the databases.
The other part is changing a bit with the new ASP interface
that will be in 4.0 -- look at
http://www.coolios.com/way/cool/cell/scores
for an example of MVASP in action. Actually it is two pages, an
intro and then a display page, but it could have been in one.
(The whole site is done with MiniVend as the publishing system.)
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
131 Willow Lane, Floor 2 | || _ \
It's a little-known fact Oxford, OH 45056 | || |_) |
that the Y1K problem caused <mikeh@minivend.com> |___| _ <
the Dark Ages. -- unknown 513.523.7621 FAX 7501 |_| \_\