[This is a blog post related to the PHP on Azure competition.]
I’ve had some time to think about how I’m going to build the application, and I’ve got some ideas for how I’d like to proceed. At this point I’d have liked to set my development environment up with the Azure tools and had a play with the example applications I’ve come across, mostly to get a feel for what’s possible, but unfortunately upon trying to install the Azure SDK I discovered that it requires Windows Vista or 7, and at home I’m still running XP. I toyed with the idea of installing Windows 7 into a Virtual Machine, which would probably be the quickest route to get back on track, but since I have been intending to migrate to 7 for a while this is probably the right time; technology is obviously evolving beyond XP (finally!).
So in the interim while I work on an upgrade I’ll start planning my CMS application. I’ve been thinking about the type of libraries and frameworks I want to take advantage of, and how I’m going to knit them together. I won’t be able to check they work on Windows Azure ’til I get access to a machine, but I’m fairly confident that the vast majority, if not all of them, will work on the platform.
Firstly I’ll be using Zend Framework to provide the backbone of the application. I’ve not yet decided how much of the framework I’ll be taking advantage of, but I’ll definitely be using Zend_Application and its related classes to handle the bootstrapping phase of the application, because its flexibility will be key when loading the other libraries I intend to use. The application will then utilise the ubiquitous MVC pattern, using the following components:
- Model: Doctrine 2 ORM / Windows Azure Table Storage
- View: Not sure yet, probably Zend_View but needs more investigation
- Controller: Zend_Controller
As I mentioned in my last post I don’t yet know how I’m going to work with the data layer: I really want to use Doctrine 2, which I know has SQL Server (and thus, I’m assuming, SQL Azure) support, but I’m not aware of similar support for Table Storage. Brian Swan posted a tutorial where he uses the OAuth SDK to access Table Storage, and that follows a similar annotations-driven approach to Doctrine 2; if one doesn’t exist, I’m wondering how much work it would take to write a Table Storage driver for Doctrine.
Functionally, it may be possible to use Table Storage exclusively within the app (it sounds like it’ll be cheaper) but there appear to be some crucial missing features, like full-text searching. I’ve been spoiled working with Solr for the past few years; I’d like to use Solr here, but have read conflicting reports as to whether it’s possible. The way things are looking, I’ll try to use Table Storage in the first instance, then fall back to SQL Azure if it doesn’t give me what I need.
Zend’s Controller classes are great, and I’ll probably use their routing system as well since it has RESTful support. There’s not much more to say about that really!
So in an ideal world, this is how the application will be laid out:
Next I’ll think in more detail about the frontend and backend applications. Now I have to go to PC World to buy a hard drive and a copy of Windows 7…