User

Chris Davenport/JData

From Joomla! Documentation

< User:Chris Davenport
Revision as of 04:38, 4 December 2011 by Chris Davenport (talk | contribs) (Created page with "JData is a new set of classes that provides a data handling library for the Joomla Platform. The aim is to provide a set of tools to make it easier to construct input and output...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

JData is a new set of classes that provides a data handling library for the Joomla Platform. The aim is to provide a set of tools to make it easier to construct input and output data handling code.

Ideally you should be able to write code that can process data without having to know anything about the format in which it was presented. So, for example, an application written using the data handling library to read and process data from an XML file should not require anything more than trivial amendment to run with the same data presented as a CSV file.

These classes are intended to make the task of writing data handling applications as quick and painless as possible. As such their performance is of secondary concern. If you are processing large amounts of data where performance is an issue then you should look at constructing a custom data handler instead of using these classes.

The data handling classes will take care of the mechanics of parsing the input data and the assembly and output of data records.

Currently there is an XML adapter that uses a stream parser to input documents of arbitrary size with minimal impact on memory, a CSV parser that uses the first line of the file to define field names, and a database table output adapter that will automatically add columns to the chosen table as required.

The code is in libraries/joomla/data.

For more information see How to use the JData classes