amfPHP v2 Reloaded Release Candidate 1 is out

news at Silex Labs :

download at sourceforge:

Pin It

State of amfPHP

Pin It

Error Routing for AS3, a kind of design pattern and some code

There’s this piece of code I keep on using, I thought I could share it here. The idea is to keep the displaying of error messages separate from their generation.

The error router is a singleton that can be used to separate error generation from error display. Code generating an error can call ErrorRouter.getInstance().notifyError(errorData)
A visual object responsible for displaying error messages can implement IErrorDisplay and call ErrorRouter.getInstance().registerErrorDisplay(this)
If no error display is registered, a simple trace is used.

I’d post the code if posting code in wordpress wasn’t such a pain. You can download it though

Pin It

amfPHP at the “Tontons Flexeur”s Paris Flex User group

Yesterday I presented amfPHP to a crowd of Flex developers, and they liked it!

My slides, and a post about the evening, both in French:

Pin It

amfphp v2 public alpha

Pin It

Flex ACE exam sucks

One of my customers asked me to get an ACE and said he was buying, so I decided to give it a shot. So I got it, it wasn’t that hard. But those questions were terrible. There were something like 3 questions that asked me more or less the same question: do I know the name of the class that manages the updates for an AIR app, and what is the name of its main method. It happens that I guessed my way to the right answer, I think, but really, what is the point? Isn’t there the Internet for that kind of knowledge? Or autocomplete in Flash Builder? Furthermore there were some basic English language mistakes in the text. I’ve heard from colleagues that the French translation is atrocious too.
But, you might ask, those are isolated, right? Most questions require some actual knowledge, don’t they? I’d say about a third of the questions required something else besides learning the API and doc by heart. The other was stuff like the update question above. Another one that struck me was “You have a DataGrid. To add a column, do you use DataColumn, or DataGridColumn?”. Gosh that’s deep.

Pin It

AMFPHP v2 status update

Pin It

Faster Tweening for Flex

Although this will be old hat for pure AS3 developers, this will be of interest to Flex developers: Don’t use the Flex tweens, they are slow. The most well known alternative would be greensock TweenLite , but there are many others to choose from. While working on I found 4x frames per second, though this is an isolated test, so YMMV.

Pin It

Does PHP development still suck?

This is not a post about the language, but rather about the developer experience. That means less dogma, and more “getting stuff done”. When starting work on AMFPHP 2.0, I decided it was time to refresh my toolkit. PHP is not my main language these days, so I had to take a good fresh look at what was actual and what was not. The last time I looked at IDEs for PHP there was Zend Studio, Aptana, and PHPEclipse. They all sucked so much that I ended up working with Notepad++.
Furthermore, I always found that there were no decent libraries to base my work on. Both Zend and PEAR were all riddled with bugs and impossibly badly designed so far as to make them nearly unusable.
So a few years down the line, what has changed?

IDEs have gotten better. I find that NetBeans does a decent job for PHP development, and so does PHPStorm. So much so that I’ve dropped NotePad++. However getting a development server up and running and to have it properly integrated with my IDE using xdebug and whatnot still involves messing with Apache config files for the better part of a day. I’ve got it kind of working, but it’s nowhere near as nice as getting a Java or even Flex development environment set up.

The libraries still suck massively. I’ve heard some nice things about a couple of them, but the one I’m the most interested in, PHPUnit, is still terrible. One of the big failures of the old AMFPHP development process was the lack of unit tests, and I’ve spent a lot of time and energy to try and get it right from the get go for AMFPHP 2 so that the team can buikld on a solid foundation. For example, something as simple as using a data provider for a test rather that copying and pasting boiler plate code just doesn’t work. This is just an example, the aim of the post is not to write bug reports, but it is symptomatic of the experience.

So, to wrap it up: The language still allows you to write really bad code and even encourages you to do so, but if you want to you can actually do things with a clean OOP design. The IDEs are slowly getting better. However it seems that the libraries are still pretty ugly. If I compare the situation with all the amazing stuff you can get just by looking at what the Apache Foundation has on offer, it’s pretty sad.  Furthermore I’d pay for an IDE to come with a ready server so that I don’t have to tweak and hack files to get things going. Because I did it once, but I’m not even sure I could do it again.

Pin It

Specs for AMFPHP 2

I just posted the specs for AMFPHP 2 over at the Silex Labs blog. Feel free to bash it!

Pin It