PHP

aerial-logo

Introducing Aerial CMS

Well, I finally let my irritation get to me… I’ve been developing Flash, Flex & AIR applications for two years now – most of them pulling data through AMFPHP from a PHP-based back-end. In those two years, I’ve tried nearly all the suggested solutions for managing content on the back-end and pulling it through to the front-end; Drupal, MODx, WordPress, Symfony. They are all fantastic PHP-based frameworks and systems, but they don’t allow me to develop applications the way I want to. So, as a consequence of this combination of irritation, frustration, egotism and flat-out boredom with writing the same code, over and over, for each project, I’ve decided to build a CMS – Aerial CMS.

aerial-logo

What is Aerial CMS?

Aerial CMS (named Aerial because it was the first word i could think of with “RIA” in it) is a simple content management framework. I decided to rethink the concept of a content management system, because – the way I see it – CMSs these days are about content management AND content presentation. I think that these two massive areas of development & design need to stay very far away from each other. They are like brother and sister to us now, but sometimes – when stuck in a room together for so long – they breed and the results are disastrous (on top of being scandalous!).

Design Philosophy

Look at how the MVC (Model View Controller) pattern came about: software engineers found that separating application logic from presentation from data has serious design benefits. Now, i’m not attempting to bad-mouth all the incredible efforts of the CMS developers… I’m saying that for Rich Internet Application development, it really becomes a chore to use systems like Drupal or Symfony because they were not meant to be used in that way. They do what they do superbly well, but for RIAs they fail to impress me.

Aerial CMS has been built from the first line of code for optimized Rich Internet Application development. It focuses only on content management and development tooling, and wants nothing to do with how you present the data. It’s certainly a change from the standard model, and i’m convinced about how I want to develop my RIAs, but that’s why i’ve put out this early release – to see if you all agree with me. This CMS still has a very, very long way to go; it works well for most situations but the tools haven’t been developed yet.

Technology

Aerial has been built on two very well established and loved open-source frameworks, namely AMFPHP 1.9 and Doctrine 1.2.1. The Aerial framework is built for compatibility with PHP 5 only. Aerial enforces no rules upon you when you get down to developing your back-end code, but it does stick to Doctrine’s method of generating database tables and models. In essence, once you’ve set up your database schema, you can do whatever you like :) you can plug into Doctrine’s API or you can write your own code; it really gives you the freedom to code the way you’re comfortable with.

Tutorials and Videos

I’ve made a Getting Started video to get you familiar with the framework and i’ll be writing a series of tutorials in the Wiki section of the Google Code page for Aerial CMS. I’ve also got plans for a couple more video tutorials, so keep checking the site for updates or follow me on Twitter (@dannykopping).

Comments, Suggestions, et al

I’d love to hear what you have to say (as long as it’s in English – being monolingual sucks)! I’m very open to suggestions, any offers to help contribute would be welcomed and all constructive criticism is encouraged!

XAMPP 1.7.2 Released

It’s finally here! The new version of the XAMPP stack has been released…

This new version includes PHP 5.3.0, Apache 2.2.12, MySQL 5.1.37 & phpMyAdmin 3.2.0.1 (amongst a myriad of other features). You can check out the new stack here. I wouldn’t recommend upgrading if you are using AMFPHP or CodeIgniter as the new version of PHP (5.3.0) will mess up quite a few things – i learnt the hard way.

I upgraded from 1.7.1 to the new version on my Linux Mint virtual server that i run within my Vista installation (damn you Adobe! Just release your software on Linux already!) and i came across an error in one of my AMFPHP installations on a project that i’m working on at the moment:

(mx.rpc::Fault)#0
errorID = 0
faultCode = “Client.Error.DeliveryInDoubt”
faultDetail = “Channel disconnected before an acknolwedgement was received”
faultString = “Channel disconnected”
message = “faultCode:Client.Error.DeliveryInDoubt faultString:’Channel disconnected’ faultDetail:’Channel disconnected before an acknolwedgement was received’”
name = “Error”
rootCause = (null)

I think that AMFPHP is still the simplest and easiest way to use Flex remoting with PHP (i recently wrote an article for FFDMag on this topic – look out for it in the September edition). However, it doesn’t have the greatest error handling mechanism ever…

Using Charles Proxy, i managed to find the real root of the error, and it appears that there is some sort of discrepancy with the dates/timezones in Gateway.php in the core of AMFPHP.

To resolve this issue, open the Gateway.php file in the core/amf/app folder in your AMFPHP installation and go to line 213. You need to tell PHP which timezone you’re in, and you can paste the following code:

date_default_timezone_set("Africa/Johannesburg");

above this line:

$dateStr = date("D, j M Y ") . date("H:i:s", strtotime("-2 days"));

I reside in Johannesburg, South Africa so that timezone will apply to me, but if you live anywhere else, you’ll have to find the pertinent timezone to use.

That should fix things up…