PHP

Application Framework Generator

| |

I have loads of ideas for implementation as LAMP applications. While I'm a pretty quick coder, it is quite disheartening (not to mention time consuming) to write basic database structures, data handling code, class wrappers for tables etc. The last three turns around I have almost decided to write a code generate to spit out the necessary. The idea is that you'd model your data structures in an XML file, and then you'd have some code which would generate the necessary MySQL code to create the database, as well as generating the necessary PHP classes to deal with the data - maybe even generate a rough-and-ready user interface.

Well, I've got fed up with wasting time writing boring code. Code generators can be a wee bit tricksy, of course, but I reckon the productivity gains will justify the time investment - especially as I have a number of cool applications which I want to implement at the moment! I've started work on it, and plan to complete it in the following stages:

  1. Process model, validate. Also generate MySQL code to create the database. (DONE - it was a bank holiday weekend)
  2. Generate PHP classes to handle the data model. Produce a decent front-end for the code generator. Document the model format and use of the system.
  3. Generate some UI bits as well - forms, grids and so forth.
  4. Iterate a model - given previous model and new model, generate ALTER TABLE statements for MySQL, or else data migration scripts or something.

Once it's further along (no earlier than after completion of step 2) and a bit more robust, I may open-source it. There seem to be a few similar ideas floating about out there, but none really suited the way I want to work, so maybe others could benefit from my work...


OCCCM Redevelopment Under Way

| |

I originally developed a nice little content management system called OCCCM for PHP and MySQL. It was quite functional, performed well (although it was never really tested under load), had a very capable permissions model, was easy-to-template and exceptionally easy-to-use. However, it didn't have a lot of features I wanted from my CMS (eg blogs, image galleries). Worse, as it had grown up in stages from a very basic page editing tool, the design of the thing made it quite difficult to extend. Nevertheless, it was used by (and is still used by) a handful of sites, though I switched most of my own sites to Drupal.

Now Drupal is great; it's very functional and has oodles of extensions. However, it's also hard work. Writing custom templates is comparatively difficult for the uninitiated, and many users find the tools for managing content and site structure to be quite challenging. The admin features are effective but quite obtuse. Other content management systems are great as well, but for one reason or another just don't suit me. So I'm delighted to announce that Ballaird is going to be redeveloping OCCCM! A completely new design has been developed, which honours the ease-of-use and simplicity of templating of the original OCCCM, while providing template designers with much more flexibility and control, users with more functionality, system administrators with better performance and scalability, and developers with a much more extensible platform.

Development of the new OCCCM is already under way, and you can check on news, status and progress at the OCCCM web site. As before, the new version will be GPL-licensed (probably under the "v2 or later" language).


Politicianwar Site Now Up

|

The Politicianwar site - like kittenwar , or puppywar , but with British Members of Parliament instead of cute animals (cue joke about the only difference being the lack of cuteness), is now available at www.politicianwar.org. What it really needs now is thousands of votes so that reasonable stats can emerge - so go vote!

I built the site with PHP on MySQL; it runs on Apache2 on Linux. I will most likely GPL the source code in a few weeks - with a bit of work it could be made configurable - so that you can easily create any-war sites...


PHP4 to PHP5 - domxml

| |

When I recently upgraded a server from PHP4 to PHP5, a number of scripts using domxml stopped working (obviously - domxml is not used in PHP5 any more, there's the new PHP5 DOM stuff built in). However, fixing the scripts looked like being a real chore until I found Alexandre Alapetite's XML Transition page. His script works like a charm - thanks Alexandre!

 


Syndicate content