BackPress, Your New Best Friend

If you’ve spent some time poking around in the code for either WordPress or bbPress, you may have come across comments that mention “BackPress”. You may have wondered what this BackPress thing was, well, wonder no more.

In the last few days, I’ve put together a quick site to try to help introduce people to the BackPress project. From the site:

BackPress is a PHP library of core functionality for web applications. It grew out of the immensely popular WordPress project, and is also the core of the bbPress and GlotPress sister-projects.

So effectively, BackPress takes all of the best core functionality (on a code level) from WordPress and bbPress, and makes it available to you and your next PHP-based web application/project. By using BackPress in your projects, you are then able to use most of the code you’ve come to rely on while working on WordPress-based projects, such as $wpdb, trailingslashit(), make_clickable(), __(), wp_remote_fopen() and more. The site includes some details on how to use BackPress in your project, and has the beginnings of a collection of documentation covering the main parts of the code library.

I’m personally really excited about this because I think BackPress has huge potential as a library for other folks and other projects. It allows them to benefit from the lessons learned through years (and thousands of “man-hours” worth of development) on the WordPress and bbPress projects. I’m using it as the core of my HTFS project (not released yet), and I know that some other projects are starting to use it as well. As a developer who has spent a lot of time in “WordPress land”, it makes life so much easier to be able to continue using a lot of the design patterns and techniques that I’ve become accustomed to.

Check it out, and please let me know what else we could get on the site, what needs more documentation etc!

  1. uberVU - social comments

  2. BackPress, Your New Best Friend ยซ Dented Reality

  3. @om4james said:

    Great work Beau!

    Having a dedicated website for BackPress should really help with the promotion of the project.

    Last week I started using BackPress in a project, and noticed that there wasn't any documentation around. Hopefully this will change now that there's a new website up and running.

    It's great to have access to standard WordPress functions when writing other projects!

    • Beau Lebens said:

      Thanks James, although all I've really done is slapped up a quick site thus far ๐Ÿ˜‰

      We're hoping to rally some support and get some interest in BackPress, so I figured this was the first step. Keep an eye on the site for more updates!

  4. Court said:

    Hello, i really would like to be apart of backpress the only problem is i have no access to the code. i am on a windows machine and svn and all of that just doesnt work well into my workflow because of so many different reasons. i consider myself a fairly decent coder. id just love it if u could send me the files to coolcourt [at] id really love to see what i could cook with the skeleton

    • Beau Lebens said:

      Court – there are a variety of tools TortoiseSVN is the first that comes to mind) that can help SVN become a part of your workflow on Windows in particular. Using some sort of version control (e.g. SVN) is critical to a project like this, where there are different people all over the world contributing and working on the code.

      We may also offer downloadable ZIP/TAR.GZ files at some point, but right now we don't because the library is still maturing as a project of its own, so it doesn't make too much sense (there are no specific version numbers or "releases" in the common sense).

  5. Brian said:

    hmm…i'm not a WP rookie, but i guess my biggest question right now is how to get BackPress up/running. I've tried to setup a simple DB call using something like:

    $wpdb = new BPDB('root','','www','localhost');

    but i'm getting:
    Fatal error: Call to undefined function wp_parse_args() in …includesclass.bpdb.php on line 226

    What is needed (configurations, WP files, etc….) to get BackPress up/running?

    • Beau Lebens said:

      Hi Brian — you do indeed need to include a couple of files to get things running, and I'm actually planning to write up a quick tutorial on how to get started using certain parts of BackPress.

      In the meantime, I have a project where I'm doing it something like this;

      – load configuration file with database details similar to wp-config.php
      – include a series of backpress files
      – start doing custom app stuff

      The second step there, in my case, involves loading these files (in this order);

      require_once dirname( __FILE__ ) . '/backpress/functions.core.php';
      require_once dirname( __FILE__ ) . '/backpress/class.wp-error.php';
      require_once dirname( __FILE__ ) . '/backpress/class.bpdb.php';
      require_once dirname( __FILE__ ) . '/backpress/functions.formatting.php';
      require_once dirname( __FILE__ ) . '/backpress/class.wp-taxonomy.php';
      require_once dirname( __FILE__ ) . '/backpress/functions.wp-taxonomy.php';
      require_once dirname( __FILE__ ) . '/backpress/functions.plugin-api.php';
      require_once dirname( __FILE__ ) . '/backpress/loader.wp-object-cache.php';

      depending on what you're doing, you'd definitely be able to leave out a bunch of them, probably everything from wp-taxonomy onwards (perhaps also formatting).

      Keep an eye out here for the tutorial I'll post with more/better detail ๐Ÿ™‚

      • Brian said:

        Thx Beau,

        Your advise worked perfectly. I got the script up/running this morning. I look forward to reading your upcoming tutorial. Any plans for tutorials focused on using the User Roles management and User management sections? Hint! Hint!

        • Beau Lebens said:

          Hah, glad to hear it. We'll see what we can do about a tutorial
          covering that particular part of BackPress. Ideally I'd like to have
          tutorials covering every \”concept\” available within BP, but that will
          take some time to put together, obviously. Slowly, slowly!

  6. Jon Dunn said:

    Thanks Beau! You're right, I have been seeing lots of mentions of Backpress lately but have yet to take the time to research it myself. Thanks for saving me a step! Send me a reply when you update the article with that Backpress demo you're talking about – I'm looking forward to it.

Comments are closed.