New Product: DataCruxWeb

DataCrux has been leading a secret life since last Spring. I was asked to create a series of applications for ZFootball last year. Instead of hammering out a bunch of throwaway code that used hardcoded query strings and static method names, I decided to create a "lite" version of DataCrux in PHP.

In fact, knowing John, building an application platform was the only reasonable course of action. He has no shortage of things he wants to add, I couldn't afford to deploy unmaintainable code with an engineering team of one. I needed something that could be improved and changed over time.

I actually considered several options for the foundation, including both WebObjects and Rails. We might have gone with WebObjects had it not been for the fact that deployment was/is fairly complicated in our environment. John also wanted to use something that we already had experience with, so we decided to go with PHP over either WebObjects or Rails.

I've been working with PHP for seven years, so this was easy to agree to. Which reminds me, it's funny to think back to a time when I had to explain to headhunters what PHP was. They'd invariably ask what the name stood for, at which point I'd find myself describing the idea of a recursive acronym. They usually didn't get the joke. Anyway, moving on.


Port Considerations

The start of the ZFootball project ended up coinciding nearly perfectly with the release of PHP5, which provided an object model close enough to Objective-C's to make the idea of a port possible. It turns out that the "lite" version grew into a full-fledged port of DataCrux to PHP. In fact, in many ways, it's far more refined than the Cocoa version.

It actually wouldn't have been so far-fetched to copy and paste large portions of the port line-by-line. Much of DataCrux is actually raw C and PHP understands ANSI C syntax nearly verbatim. Going this route, though, would have not resulted in something that exploited what PHP has to offer.

Instead, DataCruxWeb is essentially a rewrite of DataCrux tailored to PHP. Many of the same basic public interfaces are intact, but I was able to throw out tons of cruft and layers that weren't pertinent for a web application.


Infrastructure?

I ran into another issue, though. PHP has no infrastructure! It's brilliantly easy to write your first PHP script, but there's very little in the way of established, clean built-in classes. It's mostly an immense collection of functions with some classes here and there. There is PEAR, but the problem is all of those packages are separate from one another. So to solve this, I just wrote my own infrastructure layer.

As a result, DataCruxWeb has a number of implementations of things that would typically be offered by say, Foundation or AppKit, but don't have counterparts in PHP. This does not mean that I blindly reimplemented Foundation. Instead, I let needs drive development. When I had something that couldn't be cleaned solved with built-in tools, I wrote something new.


Already Deployed, and You're Using it Now

DataCruxWeb is now in its fifth or sixth major iteration. In fact, it has been used in production since last September.

Virtually all development has been driven by real-world needs. As a result, I was able to deploy a number of applications on the ZFootball intranet for the 2004-2005 tour in record time, and with about two lines of application-specific code (not counting simple procedural functions to send out emails). Those two lines register delegate functions to activate after records are inserted or updated.

To be fair, these are fairly simple data-entry applications, but they get the job done. As we all know, even getting to that point can sometimes be a real achievement.

DataCruxWeb has also been used for the ZFootball Control Center (sort of like a team setup page) and the ZFootball message boards. On a related note, it's used on the San Jose Flag Football site, which is a youth football league run by ZFootball staff and partially sponsored by the NFL.

It's also the engine used for (surprise, surprise) Theocacao. Every time you read a post here or add a comment, you're using a DataCruxWeb app. In fact, the blog engine here is just a thin layer over the framework.

This post is already quite long, so I'm going to save some technical details for next time. As of now, I'd like to release the public version around September 15th. It will once again be a BSD-style license. This time, however, I'll post a running issue tracker so that people can determine if the current version suits their needs, or if they want to wait for a later release.
Design Element
New Product: DataCruxWeb
Posted Aug 19, 2005 — 3 comments below




 

David Allison — Aug 19, 05 338

Hi -
I've been following your blog for some time now, and I just wanted to say that it's great news that you've written such an app! I'm quite excited to try it out when it's released. I do development for Zach Lyon Creative (zachlyon.com) and have worked for a number of other companies and projects doing freelance web development work over the past several years.

Best,
David Allison

Benjamin Stiglitz — Aug 19, 05 339

I'm interested to see what you've come up with. I recently released a DB layer of my own for PHP 4, and had a much nicer lazy-loading PHP 5 variant that I never got around to finishing because I was stuck on PHP 4 at work. Perhaps some ideas will be combined.

Scott Stevenson — Aug 19, 05 340 Scotty the Leopard

Benjamin -- I just quickly looked through your code. A lot of it is different from what DataCruxWeb does, but there is some overlap.

There are some interesting ideas in your stuff, and the implementation is clean and straightforward. It looks like you have a BSD-derived license, so perhaps we can borrow from each other.




 

Comments Temporarily Disabled

I had to temporarily disable comments due to spam. I'll re-enable them soon.





Copyright © Scott Stevenson 2004-2015