Q:
Are the following tasks possible with compiled Miva?
-
Developing and running scripts without Empresa
and
without Compiler?
Impossible
-
Calling non-compiled Miva scripts from compiled ones?
Impossible
-
Generating and executing Miva code in run-time?
Impossible
-
Selfcreating or selfmodfying applications?
Impossible
-
Parsing user defined expressions in compiled applications?
Impossible
-
Custom modifications of modules without compiler?
Impossible
WRONG! All of this is possible!
-
Features
-
Description
-
Installation
-
Calling Syntax
-
Examples of use
-
Supported tags / Compatibility
-
Limitations and known bugs
-
Support
-
Test / Demo
-
FAQ
top
Features
-
Lightweight Miva Script parsing engine (interpreter).
-
Platform independent. Runs on all platforms with a Miva Virtual Machine.
-
Compatible
to Miva Script v4 syntax.
-
Drop-in solution. No installation necessary. No configuration.
-
Miva Empresa not required. Miva Compiler not required.
-
Can be used in compiled scripts to
MvDO
uncompiled Miva scripts.
-
Can be used to replace macros in compiled scripts.
-
Can be used for executing of code entered by the user or selfgenerated by the application.
-
Can be used for executing code from a remote server.
-
Can be used for executing code from a database. You can build function libraries in indexed databases.
top
Description
Vladdy is not designed for running big applications like Miva Merchant, but rather for executing non-compiled Miva applets from within compiled scripts or executing simpler non-compiled programs on machines without Empresa, with just the VM.
Its functionality is especially needed for many advanced developers who write self-modifying applications or use advanced techniques requiring parsing Miva expressions and/or tags in the run-time, for executing user-defined code and for implementing modification of modules without the necessity of recompiling them. It can be used to for replacing macros. It can be used also for storing libraries of functions in databases and executing them directly from them, or for executing of Miva Script code stored on remote servers.
It is a platform independent, completely drop-in solution, with absolutely no installation or configuration needed.
top
Installation
Your server or PC must have the
Miva Virtual Machine
installed. Simply put the
vladdy.mvc
wherever you want in the Miva Script directory (public area). Call it through the browser in the following way:
http://yourdomain.com/path/vladdy.mvc
or (on a local PC with Mia on port 8000):
http://localhost:8000/path/vladdy.mvc
Now you can test Miva Script expressions and Miva Script code through the web interface. It is highly recommended that you protect the file by password or IP through
.htaccess
, or by disabling the testing interface by clicking the "
HIDE TEST
" button. The test interface may be re-enabled by deleting the vladdy.hide file from the Miva data directory root.
top
Calling Syntax
The syntax of the Miva Script expressions has to follow syntax rules of the
MVM
available on your machine. Syntax of Miva Script code follows the Miva Script v4 rules with the exceptions described in paragraphs
Supported tags / Compatibility
and
Limitations and known bugs
There are currently three function available for external calls from compiled Miva scripts:
eval
eval(
expression
)
where
expression
is a regular Miva Script expression stored either in a literal string, in any kind of variable (local, global, system, database) or as a result of a miva expression (may contain other functon calls). However, using a literal string makes usually few sense, because if you know the expression in advance, it is possible to compile and execute it directly without using the Vladdy parser. Vladdy engine is designed especially for executing and parsing Miva code that is not known at the compile time, cannot be included in the compiled file and therefore must be interpreted in the run-time.
parse
parse(
code
)
Similarly as above, the
code
may be a string, variable or an expression. In contrary to
eval
,
parse
may contain complete Miva Script application, including any of the supported tags, ASCII text and HTML code.
do
do(
fileName, function
)
Again, both arguments
fileName
and
function
may be strings, variables or an expressions.
fileName
contains a file name of a non-compiled Miva Script and
function
contains the name and arguments of a function to be called in the external file. If you want to execute the entire file instead of just a specific function, let the second argument empty (
''
).
Unlike the built-in MvDO command, the
do
function is capable to execute files regardless if they are in the script or the data directory. Vladdy first checks for the presence of the file in the script directory and if it is not found it checks the data directory too.
doCall
doCall(
url
)
doCall()
loads a file from a location on a remote server, defined by the argument
url
,
and
(unlike
MvCALL
) executes Miva Script contained on the page. If no Miva Script is included on the called document, it returns the text/html content. Please note that if the document is parsed by a Miva Script engine on the remote server, it usually does not contain any Miva tags (unless the remote script was explicitely designed so). Therefore, usually you have to use other than the default
.mv
extesnion at Miva Scripts designed for a remote execution.
top
Examples Of Use
You can call the parser functions from your own compiled Miva Script application in the followig way:
<MvDO FILE="vladdy.mvc" NAME="l.ret" VALUE="{eval(myExpression)}">
<MvDO FILE="vladdy.mvc" NAME="l.ret" VALUE="{parse(myCode)}">
<MvDO FILE="vladdy.mvc" NAME="l.ret" VALUE="{do(fileName,'')}">
For frequent use, it is recommended to declare the functions in the follwong way to avoid using the
MvDO
command:
<MvFUNCTION NAME="parse" PARAMETERS="code" STANDARDOUTPUTLEVEL="">
<MvDO FILE="path/vladdy.mvc" NAME="l.ret" VALUE="{parse(code)}">
<MvFUNCTRETURN VALUE="l.ret">
</MvFUNCTION>
Afterwards you can call the decalred function simply as any other function in MvEVAL, MvASSIGN, MvIF or any other Miva expression. For example:
<MvEVAL VALUE="{parse(fnLib.d.userPage)}">
<MvEVAL VALUE="{parse(g.myMacro)}">
<MvASSIGN NAME="l.ok" VALUE="{do('/test/test.mv','test()')}">
<MvIF EXPR="{g.admin AND eval(g.customCode)}">...
<MvSMTP TO="{eval(glosub(fnLib.d.verifyAdr,'%to%',g.to))}"...>
<MvEVAL EXPR="{doCall('http://server.com/path/mivaScript.txt'}">
...
top
Supported tags / Compatibility
The pre-release version still does not support all Miva Script tags, but implemetning of them is in progress. Syntax of the code has to be conform to Miva Script v4 and is currently limited also by various bugs in the Miva Compiler v0.9.
|
supported
|
not yet supported
|
|
MIVA
|
MvHIDE
|
MvASSIGNARRAY
|
|
MvADD
|
MvIF
|
MvDIMENSION
|
|
MvASSIGN
|
MvIMPORT
|
MvFUNCTION
|
|
MvCALL
|
MvLOCKFILE
|
MvMEMBER
|
|
MvCLOSE
|
MvMAKEINDEX
|
|
|
MvCLOSEVIEW
|
MvOPEN
|
|
|
MvCOMMENT
|
MvOPENVIEW
|
|
|
MvCOMMERCE
|
MvPACK
|
|
|
MvCREATE
|
MvPOP
|
|
|
MvDELETE
|
MvPRIMARY
|
|
|
MvDO
|
MvQUERY
|
|
|
MvELSE
|
MvREINDEX
|
|
|
MvELSEIF
|
MvREVEALSTRUCTURE
|
|
|
MvEVAL
|
MvSETINDEX
|
|
|
MvEXIT
|
MvSKIP
|
|
|
MvEXPORT
|
MvSMTP
|
|
|
MvFILTER
|
MvUNDELETE
|
|
|
MvFIND
|
MvUPDATE
|
|
|
MvGO
|
MvWHILE
|
|
|
|
MvWHILESTOP
|
|
top
Limitations and known bugs
In addition to the above mentioned
currently unsupported tags
, and to the limitations given by the compiler v0.9 there are the following limitations:
-
The use of
local variables
is
very limited
. Because of internal processing, local variables are being reset at each new command. Currently only global, system and database variables may be used.
-
<MvFUNCTION>
tag (user-defined functions) is currently not yet supported and the implementation may take longer time. It is currently not guaranteed that it will be included in the very near future.
-
The engine is designed to run
shorter scripts
, functions, code modifications, etc. Running heavy applications could be slow.
-
ASCII character
255
(on many systems displayed as
y-umlaut
/
ÿ
) is
reserved
and should not be used anywhere in the code.
-
The
parse( )
,
do( )
and
doCall( )
functions currently support only script files without user-defined functions.
-
Miva expressions (curly brackets) are currently not yet available in HTML tags.
top
Support
truXoft offers a
limited free suport
within 30 days after the date of the purchase for modules bought directly at
truXoft Co.
or at affiliated resellers as listed
below
. The support is limited to fixing evident unknown bugs in the engine. It does not include any help with general Miva Script or Miva Virtual Machine problems. Before submitting any support query, please be absolutely to sure to have entirely read the chapters
Limitations and known bugs
and
FAQ
.
Some questions may be already answered in the
FAQ
or may be solved with the help of other more experienced users on the
Miva Script User List
. I am monitoring all Miva user lists and, if possible, will help with related problems posted to the user groups.
top
Test / Demo
A demo comes here as soon as MVM v0.9 or higher for Linux is available.
top
Frequently Asked Questions
faq
Isn't Vladdy or Miva Corporation upset that you have brought a competing product?
No, I do not think so:
-
truXoft Vladdy is
not
a competing product neither to
Empresa
nor to the compiler or the
MVM
. It is a complementary product for compiled applications and especially on those systems that have no Empresa available.
-
It is not designed to parse entire huge applications like
Miva Merchant
and it was never planned for.
-
Vladdy is a
compiled Miva Script application
and therefore the interpreted scripts cannot be faster than compiled ones and in most cases the scripts are (few to much) slower than on Empresa. However, internal operations like for example database commands
MvFIND
,
MvFILTER
, etc are as fast as at the compiler.
-
There are currently diverse limitations of use. The
MvFUNCTION
tag is not yet implemented, local variables cannot be used and due to a buggy v0.9 MVM, Miva built-in functions with more than one parameter cannot be parsed. Some of these limitations will be hopefully removed with the next version of MVM.
-
All bugs in Miva syntax known at the v0.9 of the Compiler apply to Vladdy too. Again: Vladdy is compiled in Miva, runs on the MVM and therefore is fully depending on its syntax.
-
Vladdy is definitely
not
designed as a replacement of the
MVM
or
Empresa
. Its task is parsing (interpreting) of code that was not known at the time of compiling, for running user defined code, for executing variable and dynamical code in run time.
-
It is a complementary product that offers functions not available neither in compiler / MVM, nor in Empresa: Running non-compiled or variable code in the run-time from within compiled applications without compiling it.
top
License Agreement
Simplified explanation of the license:
the licensee is granted the right to use the Vladdy engine on a single server (i.e., machine; a machine may have multiple virtual servers) and one local PC (for development) that does not serve any MVM-driven documents to any network.
(Please read the full text of the license for a more precise explanation of the license terms.)
BY INSTALLING THIS SOFTWARE YOU AGREE TO THE FOLLOWING LICENSE:
Definitions:
-
"YOU" and "
LICENSEE
" refers to the person, entity or organization which is using the software and source code known as "truXoft VLADDY Miva
®
Script
TM
parsing engine (truXoft VLADDY)", and any successor or assignee of same.
-
"
truXoft VLADDY
" (hereinafter "VLADDY") is the application accompanies this License, and which allows parsing of Miva
®
Script
TM
, and which requires the use of Miva
®
Virtual Machine
TM
.
-
"
Miva
®
Virtual Machine
TM
" (hereinafter "MVM") is a Miva Corporation's server side application for parsing compiled Miva
®
Script
TM
documents.
-
"
Server
" is any device connected to any private or public network, such as LAN, WAN or Internet and used for serving documents processed by the Miva Virtual Machine (MVM).
-
This license is for the downloading and use of
VLADDY
. By downloading, acquiring and using
VLADDY
, YOU expressly agree to abide by this License.
-
This license is between
LICENSEE
and
truXoft
. Licensee acknowledges that truXoft is and has granted this license in reliance upon representations made by Licensee and Licensee warranties the truthfulness and accuracy of such representations. Any breach of this warranty of truthfulness and accuracy shall constitute a breach of this License. truXoft has the sole and unqualified right to refuse to license any person or entity for any reason, except for reasons which are specifically prohibited by state and national laws and statutes.
-
LICENSEE is granted a non-exclusive license to use
VLADDY
in conjunction with
one server
for each
VLADDY
licence purchased. License to use
VLADDY
with more than one server, must be separately purchased from truXoft and are specifically not granted in this License. LICENSEE is additionally granted using
maximally one copy
of
VLADDY
on a personal PC for evaluation, develpment and debugging. Such PC must
not
be used for serving
MVM
driven documents to any network.
-
VLADDY
contains valuable proprietary rights of truXoft. There is no transfer to LICENSEE of any title to or ownership of
VLADDY
or any copyright, trade name, trade secret, source code, or other proprietary rights relating to
VLADDY
, regardless of the form that
VLADDY
exists in. Licensee may not violate these rights, and Licensee must take all appropriate steps to protect truXoft's rights. truXoft may at any time replace, modify, alter, improve, enhance, or change
VLADDY
without prior notice.
-
Any license, right, or permission to use
VLADDY
is automatically revoked if LICENSEE breaches any term or condition of this License. Licensee agrees that in the event of a breach of this License, and upon the demand thereof by truXoft, Licensee will immediately return any physical copies of
VLADDY
to truXoft, will cease any further use of
VLADDY
, will remove the original and any modified or altered copies of
VLADDY
from his/her/its computers and drives, will cease his/her/its use of
VLADDY
, and will cease any claimed breach of this License. Licensee agrees that monetary damages alone is not an adequate and just relief resulting from any breach of this License, that a court
VLADDY
prohibiting any further breach of this License is necessary to prevent further damages, and that Licensee will not oppose any reasonable request for a temporary restraining
VLADDY
, preliminary injunction, or other relief sought by truXoft in the event of a breach of this License. truXoft shall not be required to notify Licensee of any breach, nor make any demand or claim against Licensee resulting from any such breach, or for a demand to stop any use or distribution in violation of the terms of this License, and Licensee agrees that any breach of this License and damages resulting therefrom shall relate back to the first and earliest breach thereof. Failure of truXoft to enforce its rights pursuant to this License shall not constitute a waiver of such rights, and shall not prejudice truXoft in any later enforcement of its rights or rights to seek damages therefrom.
-
truXoft WILL NOT BE LIABLE FOR (A) ANY BUG, ERROR, OMMISSION, DEFECT, DEFICIENCY, OR NONCONFORMITY IN SEK; (B) IMPLIED MERCHANTIBILITY OF FITNESS FOR A PARTICULAR PURPOSE; (C) IMPLIED WARRANTY RELATING TO COURSE OF DEALING, OR USAGE OF TRADE OR ANY OTHER IMPLIED WARRANTY WHATSOEVER; (D) CLAIM OF INFRINGEMENT; (E) CLAIM IN TORT, WHETHER OR NOT ARISING IN WHOLE OR PART FROM truXoft'S FAULT, NEGLIGENCE, STRICT LIABILITY, OR PRODUCT LIABILITY, OR (F) CLAIM FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, OR LOSS OF DATA, REVENUE, DEVELOPERS GOODWILL, OR USE. IN NO CASE SHALL truXoft'S LIABILITY EXCEED THE PRICE THAT DEVELOPER PAID FOR
VLADDY
.
-
This License Agreement shall be governed by the laws of the State of Nevada, USA. If any provision of this License is found void, invalid, or unenforceable, it will not affect the validity of the balance of this License, which shall remain valid and enforceable according to its terms. In the event any party is required to seek judicial enforcement regarding any terms of this License, or to seek a judicial interpretation regarding any terms of this License, the party deemed by the court to be the prevailing party shall be entitled to, in addition to its costs and damages, reasonable attorney's fees and costs as determined by the court.
-
LICENSEE acknowledges that
VLADDY
may be subject to United States export controls, pursuant to the Export Administrations Regulations, 15 C.F.R. Parts 768-799. Licensee shall comply strictly with all requirements of the Export Administration Regulations regarding use of
VLADDY
.
-
This License Agreement constitutes the entire and sole agreement between user and truXoft, and is agreed to and entered into on the date YOU download or implement
VLADDY
, whichever date is earlier.
top
Change Log