Body
Database connections via xPDO are as simple as using MySQL, MySQL_connect or other traditional methods: with less code, built in try - catch handling, increased functionality, type casting, and injection protection.
Authored on
Org Logo
Image
Framework
There are three primary ways to implement xPDO, in your web projects.
MODX Object
The current MODX Object utilizes a persistent connection to its database. Most third-party developers should implement this method.
Static Connection
These types of connections are typical for developers:
- working with simple look-up tables
- data which is contained within a simple relational construct
- data which is typically directly associated with a single object
- and typically not using the MODX Revolution Environment (though they could be)
- Examples: Geographical look-up tables, song lists, form field creation, and single object data
Hydrated Connection
These connections are for packages which can stand completely apart from MODX Revolution, and include:
- Object to Object relationships
- Object to Object and child (sub-object) relations
- Examples: Content Management Platforms (Like MODX Revolution), social networks, demographics, inter-object functionality, order tracking, and logistics systems