<< Click to Display Table of Contents >> Providing the Data |
VPE and dycodoc are database independent; i.e. they do not access themselves any databases nor do they include any database drivers. Instead your applications - or rather you as developer - are responsible for providing the data to VPE.
Using the FieldStudio you define DataSources (this is similar to an SQL View). DataSources consist of any number of Fields (i.e. variables). DataSource files have the suffix FLD.
In dycodoc you may embed DataSources into documents in order to define the set of available fields for a specific document. You and / or your end users may then insert any of the available fields into text objects, pictures, barcodes, etc.
The used DataSources and the used fields from each DataSource are stored together with the layout information in the template file.
However, the fields are just placeholders for some kind of data your application will provide to a template when processing / printing it. For VPE it doesn't play a role from where or how you retrieve the data.
VPE simply offers a set of methods to assign values to fields. In most cases your applications might retrieve data from a database and assign it to fields, but in practise you might retrieve or generate the data from any data source you wish.
The advantages are obvious:
•Support of true multi-tier programming models, the data is completely independent of the view
•No database drivers are installed nor used by VPE on the target system
•Increased performance, because you can optimize database accesses and computations
•Easy concatenation of different data sources, for example databases and internal computed variables
•Work with very rarely databases is possible
•Work without existence of any database is possible, data may come from any data source, for example a TCP/IP stream via the internet, a plain text file or whatsoever
• Flexibility, since you have exact control over the provided data
Disadvantage:
•You need to program something, i.e. you need to provide the data by code to VPE. But this is done in a very easy way and usually requires very little coding.
In the example below three DataSources are used:
•customers.fld
•providers.fld
•articles.fld
They are used in conjunction with the dycodoc DCD document "request.dcd".
The graphics below shows the file structures and how the template "request.tpl" is used by your application in interaction with Virtual Print Engine.