Page 1 of 1

PHP5 Forum System

Posted: Tue Dec 27, 2005 6:26 pm
by capiCrimm
This project stems out of my playing with some ideas for fun. My goal was to create a highly modular, hackable system. What I came up with was a mix of a library and a framework. It's a collection of modules that are children of a parent module class that provides a common interface for communication. Two xml scripts are then used. One specifies how the code should be built up(i.e. what modules should be used and what actions should be taken given the user input) and a second that specifies a template-like html output.

The last part of the system is a compiler-like script, which transforms the xml into php(using xslt and a bit of php) and compiles the module scripts into system specific implementations where needed. This allows for people to not only customize the feel of a php site easily, but the actual working of it.

The idea is to implement a forum system to help work out the bugs and to give people a taste of what it can do. I've built most of the pieces together here and there and am satisfied with my testing that everything can work, though there are some problematic areas. I'm asking for volunteers because this was mainly a brain exercise for me and not a full blown project. However after looking around at other projects and frameworks I think it would be a shame not to implement this. It would be impossible for me to implement this by myself and keep quality; my lack of time forces me to cut corners and being alone hurts my ability to brainstorm and check my implementations.

I have a SVN server and Trac setup if anyone is willing to help. The project isn't released under any specific licence yet, but I'm leaning towards the GPL. You need to be able to set up a local server with php5.1 and understand the basics of OOP. Currently, the biggest problematic area is database design and building an OR/M. They are last big things holding up the project from going from core design to forum design. I've gotten some working implementations, but it's so important I want to make sure I have it as good as possible before going on, and someone with some experience in that area could really help this project.

capiCrimm {at) gmail (dot] com
or
PM me or post here.

It would be a shame to put this revolutionary project on the eternal back burner for lack of time and help.

Posted: Tue Dec 27, 2005 6:39 pm
by Gambler
Can you show us some code?

Posted: Tue Dec 27, 2005 6:42 pm
by foobar
Gambler wrote:Can you show us some code?
I doubt he'll show random people code if it's a "revolutionary project". However, some screens or UML diagrams would be helpful. Also maybe a link to a sandbox version or something would be nice too.

Posted: Tue Dec 27, 2005 8:16 pm
by capiCrimm
I'll e-mail you a .tar.bz2 or whatever you want of the current source. I'd give the trac link, but my router has been acting up and dying on me as of late.
I'll need to draw up some current UML diagrams. If someone is actually interested I'd have to document the source a little better too. It wasn't a priority when I first wrote it since A) I was still working on getting a viable design working and rewrote so much formal comments would have slowed me down to much and B) I considered it a experiment and not a real project. Most of the documents have been written, but they're strewn out amoungst different pieces of code.

As for "revolutionary project", in reality I'd call it a goulash of ideas. It's just that I saw someone else use revolutionary, and it sounded a whole lot better. :p

Out of curiousity does anyone know a good UML program for WinXP? I Normally use my deb box for development but I'm renovating it.

Posted: Tue Dec 27, 2005 9:51 pm
by capiCrimm
Here is a minimal class diagram of the core module(called capsule) extended to a simple project...

Image
capsule is located in cap/capsule and other modules are located in cap/<<module>>. Glu files are located in glu/<<glu>> and implementation files are located in ./<<impl>>

It wouldn't be to hard to imagine this as a MVC pattern with some sort of wacky pre-processor/compiler sort of thing added. Infact that may not be a very bad picture of it. Capsule is currently an empty class. Since it represents an actual module I thought it would be prudent to assume anything I put in would lead to Fragile Base Class or something simmilar.

OrmMeta and Orm are currently what I'm having trouble with. It probably shows that I'm a programmer and not a database designer(though, it may not show I'm a programmer either :D). I'm sure there is a pattern for what I did, but basically you implement Orm for the database(i.e. HelloWorldOrm) and it will search for a <className>OrmMeta_* and if it can't find that it will default to using OrmMeta_*. Since I'm using PDO the * is filled in by pulling the driver attribute of whatever PDO object Orm's constructor is passed. I'm just starting to implement Widget. It originally fed off of capsule, but I decided it would be better to do follow MVC and implement it off of a Model(id est Orm).

So, like I said, it's not ``really'' that revolutionary, more like an xml abstraction of a php MVC enterprise-pattern in the background. With the entire thing compiled down to real php. One of thing that needs to be taken into consideration is designing the controler(id est, capsule). When I originally implemented this it didn't look like MVC at all, but it followed something simmilar to this, where your going $command->$command->command(), and that fit into XML a whole lot better. The problem then becomes that if your not careful in your design you can create a impedance mismatch between the XML and the Controller, same thing with the View. I took that design tradeoff as I figured MVC would be more stable and have a higher recognition that anything I thought up.

There are also UnitTests for the project, but they are based on my own UnitTest framework. It works, but it's not beautiful and isn't finished, so I'd probably ditch it and take up SimpleXml.