Table of Contents
Getting Started With Valentina for Xojo/REALbasic
This section should help you to start with Valentina for Xojo.
It is written for “Valentina for Xojo ADK”, but it is also helpful for other products that interface with REAL Software's Xojo development environment.
Introduction
“Valentina for Xojo ADK” is a reach plugin for Xojo IDE, which allows you to develop Xojo applications that:
- Contain embedded Valentina DB engine to work with local Valentina databases.
- Contain embedded Valentina Report Engine to work with local Valentina projects.
- Contain the Valentina Client to connect to a Valentina Server, which can be used as 1) Valentina DB Server, 2) Valentina SQLite Server, 3) Valentina Report Server.
- Mix all above at any combination.
Downloads
Please note, we differentiate between the Hosted platform - a platform where you install and develop, and Target platform - a platform for which you compile application in Xojo.
There are separate archives of “Valentina for Xojo” for different platforms. You should choose and download one for the platform on which you going to develop.
Installation
Please read installation instructions on Valentina for Xojo/REALbasic Installation or watch our video tutorials for each specific OS.
Docs and Examples
Paradigma provides many documentation, tutorials and examples to help you learn Valentina. You can find links to major documents required for Valentina for Xojo developers on this page of Paradigma site: http://www.valentina-db.com/en/products/documentation/V4RB, as well, as in the this WIKI one level up: Valentina for Xojo Documentation.
Way to learn Valentina
You can read the detailed advice on ways to learn Valentina docs on Way to Learn Valentina Docs.
Style of coding
Because Xojo is designed to be highly object-oriented, accessing Valentina is extremely flexible.
As a result, V4RB developers have many options for coding styles for their applications. You should start by reading Choosing a Style of Coding to understand your options.
RBDB API Style
You should choose this style if:
- you already have application with this style for another vendor's database and you are now porting it to Valentina.
- you want to develop new Xojo applications, and the ability to port to different vendor's databases is the highest priority for your project.
Valentina SQL Style
You can use Valentina SQL in a very similar way to any other Relational SQL DBMS.
Developers work with Database or Connection objects, send some SQL commands to these objects, get back a result, and get info from this result. This is often a cursor. Usually, you cannot modify cursors, so to modify records from a result, you should build SQL strings with some UPDATE/INSERT/DELETE command, execute it, then repeat SELECT again to see your changes.
Using Valentina for Xojo you can do all above using classes VDatabase, VCursor and VField and some of their methods such as VDatabase.SqlSelect() and SqlExecute().
One benefit you get with Valentina is that you can read/write cursors, so to change e.g. some field of selected record it is enough to write:
curs.Field("name") = value
curs.UpdateRecord()
If you are going to develop client/server applications, choose the SQL style of coding.
API Style
In contrast to almost all other SQL Relational DBMS, Valentina gives you not only SQL access to the database, but also direct access to the engine core via API methods.
This is a direct access to the core, and the same Valentina SQL engine uses these methods also after parsing of the SQL command. You can by-pass the SQL engine and reap huge performance benefits.
Many professional Valentina developers prefer to use API style of coding. For example, look how many overhead exists e.g. for Object-Relational-mapping around some SQL DBMS! And image how huge win you get with Valentina! Really, e.g. with mySQL they do:
(db engine) <- (SQL engine) <- (ORM) <- Your App
With direct Valentina API you get:
(db engine) <- Your App
Class Style
Class style is the Object-Oriented version of the API style. Valentina for Xojo has very special built-in features that allow you to write code in the Class style, which are similar to Object-Relational mapping (ORM).