Looking for Simple, Lightweight Interface (not Enterprise Framework) for PHP Application Framework
June 3, 2004 9:33 PM   Subscribe

PHP Application Frameworks. Google and the other usual suspects seem to be pointing me toward the big guys, but I'm not looking for an enterprise-level framework, rather a smallish, lightweight tool that will--given some kind of definition information--render a reasonably simple administrative interface; i.e., the kind my grandma could use. I've been working on a homegrown version as a stopgap, but does anyone have any recommendations for something like this?

Basically, I'd like to provide a definition of sorts for each section (e.g., the Photos node would consist of a text field called Title, a textarea called caption, a file upload field called Image File, etc.), and have it take care of rendering the actual administrative functions (Add Photo, List Photos, Edit Photo, etc.)

The fact that I've been relatively successful in developing my own leads me to believe that there's got to be something similar out there already. I mean, I can't possibly be the first person to think that something like this would be helpful for web developers weary of writing yet another "Create Widget" script.
posted by oissubke to Computers & Internet (6 answers total)
 
*shrug* They exist ... but ... are you using objects and a templating engine?

I mean, that's kind of what objects do. And when you're dealing with database queries and data formatting, you pretty much end up writing the code for the specific data anyway (potentially reusing things from project to project, like a user object).

And as for templating engines, well, create a template that wraps the whole thing and dump your content into it, and create the template for that content, like a form.

I write admin interfaces like that for a living and I'm down to about thirty minutes per page, depending on how much complexity there is.

You could use Fusebox, but I've always found it a needlessly complex hack.

Or maybe I'm misunderstanding your question...
posted by SpecialK at 12:49 AM on June 4, 2004


when you're dealing with database queries and data formatting, you pretty much end up writing the code for the specific data anyway

Yup. I'd love to find something that saved writing interface code every time, but it's hard to be generic enough. At some point you'll need a really complex database schema to be able to handle the level of abstraction that covers (whatever you wind up defining as) "almost everything". I've moved from the header-and-footer include model to having an HTML template file I read in and do replaces on. It's nothing revolutionary, it just seems to save time and a few headaches compared to creating header and footer files that are usable throughout the app without losing their usefulness.
posted by yerfatma at 5:01 AM on June 4, 2004


That last sentence stunk. What I mean is a header and footer that can be used on every page but still carry enough redundant information to make it worth pulling them out into a header and footer.
posted by yerfatma at 5:02 AM on June 4, 2004


Response by poster: I guess "application framework" could be the wrong term.

Really what I'm looking for is an easy system for building the backend portions of websites. It's easy enough to write the frontend in PHP Smarty once everything's in the database, it's writing the admin section that sucks.

What I've currently written is a system that will read a configuration file that lays out the basic fields associated with a site object. The admin script then reads the configuration for the selected object and renders all forms and handlers necessary for creating, deleting, editing, etc.

(Basically, I got tired of trying to heavily mod MovableType for backend work, so I wrote my own that allowed fully customized fields for every entity.)

At some point you'll need a really complex database schema to be able to handle the level of abstraction that covers (whatever you wind up defining as) "almost everything".

I thought of this too, but I actually just went the route of manually creating the database tables to match the configuration of each object. I might get ambitious and abstract it all someday, but it ain't gonna be tonight! :)
posted by oissubke at 8:55 AM on June 4, 2004


While it's based on Perl (not PHP) you might want to check out Maypole. It's a very clever application development framework that when given a few database tables and a definition of the relationships between the tables, will create a web-based front-end for managing the data.

Perl.com has an excellent two part tutorial (here and here) that walks you through the framework. The first article builds a full-fledged (albeit small) web based interface for managing a product database in only 10 lines of code. Nifty stuff.
posted by kaefer at 4:33 PM on June 4, 2004


If it's truly back end and as simple as you suggest, I've used PHPMyEdit quite extensively. Customizable to a large degree even with CSS now but I've never bothered beyond creating dropdowns for foriegn key fields.
posted by billsaysthis at 7:25 PM on June 4, 2004


« Older Advice and experience with interstate moving...   |   Knoppix Newer »
This thread is closed to new comments.