About RedBeanPHP

Light-weight loader for the RedBeanPHP ORM

Category Development Tools
Modules that have more to do with assisting development of a site rather than managing its content.
Release StateStable
Should be safe for use in production environments. *
Module Version1.0.0
Class NameRedBeanPHP
Compatibility2.6, 2.7
Date AddedOctober 20, 2015
Recommended ByNew recommendations may take up to 1 day to appear.


This module's files should be placed in /site/modules/RedBeanPHP/
How to install or uninstall modules


RedBeanPHP ProcessWire Module

This module is a loader for the RedBeanPHP ORM, a simple, easy-to-use objectmapper. RedBeanPHP is particularly easy to get started with for two apparent reasons: there are no config files, and it can (if you so choose) create the database schema for you on-the-fly.

The main task of this module is loading the RedBeanPHP library and passing ityour database credentials from $config. Module config contains some settings, and the module exposes some often used RedBeanPHP methods, but that's it.


RedBeanPHP is, first and foremost, a tool for developers. The docs make thisquite obvious: "it does not focus primarily on performance, maintainability, object orientedness, correctness or proper design. No, RedBeanPHP's purpose is to boost your productivity." (http://redbeanphp.com/quick_tour)

When in fluid mode, RedBeanPHP can create the schema for you. While this maynot be desirable in production, it can be handy during development. Learning the basics of RedBeanPHP takes minutes, but grasping how to define relations between beans (objects), how to define models, etc. can take a while longer.

One interesting aspect with RedBeanPHP is that it contains no Query Builder,instead relying on raw SQL (with parameter binding). While some may see this as a shortcoming, it's actually about keeping things simple.

For more details about RedBeanPHP, visit http://redbeanphp.com/. RedBeanPHPis copyright (c) 2015 Gabor de Mooij and the RedBeanPHP community, licensed under New BSD and GPLv2 (dual license).

ORM and ProcessWire

ProcessWire has a very effective way of modeling and managing data, so mostof the time you'll find a separate ORM nothing but a distraction. There are still cases where you might prefer to drop out of the typical workflow, and for those cases RedBeanPHP is an easy and light-weight solution:

  • Working with (possibly large) existing sets of data
  • Working with SQLite or PostgreSQL databases
  • Working with multiple databases at once
  • Rapid prototyping (using code only)

.. and so on, the main point being that situations can vary and if you feelthat a separate ORM is the best option, then by all means go for it!


No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.