PHP, Zend Framework and Other Crazy Stuff
Archive for November 6, 2006
Response to the Unit Testing Experiment
Nov 6th
Blank Filler Post for id#244 RSS export to new blog at 22 Jan 2007
Rob Allen’s Updated Zend Framework Tutorial
Nov 6th
I’m a few days late in getting around to reading it… Rob Allen has updated his excellent tutorial for the Zend Framework 0.20 release over on http://www.akrabat.com/zend-framework-tutorial.
As he notes in his blog entry, he only needed to make some small changes (including his updated Zend_Config use) to migrate the tutorial from the 0.15 to 0.20 version of the framework. Version 1.1 of the tutorial is a must read if you’re looking for an easy to access introduction to the Zend Framework.
Rob is the guy to blame if you ever have any Zend_Config issues
.
I’m not titling this one!
Nov 6th
I haven’t posted much general entries for a while, I have a stockpile sitting on my desktop. Yep, I have a directory for nothing but random notes and nuggets of wisdom. Comes in useful sometimes if I feel like looking back on the interesting things I’ve read or posted about previously.
Anyways.
This one is just a quick update on progress in the Redux project. It’s kept a very low profile with no forums or wiki’s publicised. To review, Redux is a temporary name for a new game project. This project aims to create a space strategy in PHP which runs from a browser and utilises AJAX (heavily).
Now to the progress. Starting a new project in my experience follows a predictable curve. The first stage is the initial Enthusiasm. Everyone starts throwing around ideas, brainstorming, posting little code extracts, exploring ideas and possible technical additions. We’re currently well into the second stage – Exploration.
The Exploration phase has a lot less random ideas, and a lot more focused detailed discussions. The topics I’ve been involved in during the current phase are largely about the Navigation and Mapping details for the project. We’ve covered generating coordinates, displaying maps, using AJAX to navigate, map formats (squares and hexagonal styles), the underlining mathematics of square vs hexes, and even an element of AI in the form of the A* pathfinding algorithm.
Amid all this discussion, I’ve been busy on Phase 3 in parallel – Planning and Initial Documentation. I have this perverse love of documentation – give me an idea, and I’ll merrily write it half to death
. In this phase I’ve started a basic library which is focused on writing generic classes useful in future game projects we might undertake. Mapping for example is completely generic, only the specific details in The code to date is very early, but its covered by unit tests as a rule.
We’ve also drawn up some Coding Standards, a working Coordinate Navigation test with AJAX (see TesterMap test) and more.
As part of Phase 3, I’ve invested a chunk of free time to writing a tutorial to introduce the inner workings of the future source code. This is a 7 page document which introduces the Zend Framework 0.20, AJAX, PHP5′s SimpleXML, the JSON response format, Prototype (the AJAX lib integrated with Ruby On Rails) and other general concepts. It builds a very simple application from scratch and should be a very informative introduction to the larger game application which uses the exact same structure, libraries and practices. As a bonus it also comprises a useful chunk of code for future use
. Two birds with one stone…
I’ll have it released online in the near future. It’s not a project specific tutorial – other folk would find it useful I think.
Phase 4 is still to be reached: Implementation. This is where all the abstract ideas, code snippets, and initial documentation builds up enough confidence for folk to actually start coding the game in an initial form without being too worried their making a complete mess of it
. I won’t dig into the project goals and such again – but suffice it to say we’re aiming for a pure OOP solution that’s as easy to maintain as possible. It’s very likely the PHP requirement will be deliberately high, i.e. PHP 5.2.0. This limits potential public users of course, but this project would not be finished for quite some time. Better to get a major PHP revision utilised and adapted to now than months down the line when it’s a popular hosted version (and of course when PHP6 will be grabbing more attention!).
