Archive for January, 2009

Flex Forms and PHP

Monday, January 19th, 2009

Does anyone really like HTML forms? Seriously, just say no to HTML forms! Most of the IDEs and server-side technologies give you some visual tools to handle html form creation and validation but these tools lock you into specific technology and still leave the problem of cross-browser formatting up to the developer. After looking at Flex it seems like a potential answer to the cross-browser formatting problem and supports using whatever server-side technology you desire.

Here’s a quick sample to show you want can be done. The MXML source for a form is below. The form includes simple validation and will post to a web server that is running PHP. The post variables are echoed back to the Flex form.

How to deploy this example

1. Download SampleForm.mxml, edit the url in the httpservice to point to your web server and build the Flex project.
2. Download Form.txt, rename Form.txt to Form.php and move it to your web server
3. Preview the Flex form!

Flex MXML File

[The requested file http://threegerbers.com/examples/SampleForm.mxml could not be found]

PHP file to handle the response

[The requested file http://threegerbers.com/examples/form.txt could not be found]

What to do in 2009

Friday, January 2nd, 2009

News Years Eve we were talking over dinner with some friends about resolutions for 2009. My wife, while proud of my success with my 2008 resolution of running a 5K each month for charity, pointed out that this really wasn’t a resolution but more of a goal. I did challenge her “resolution”. Her resolution is to waste less. While I think this is a noble resolution I argued that measuring the success of this “resolution” is very subjective. It’s just my personality, things have to be measurable to determine if there is success or failure. There are numerous quotes from Caddyshack, Office Space or Talladega Nights to support my argument. Needless to say I lost the argument. That said, my goal (notice this is not a resolution) for 2009 is more conservative than 2008. I plan on running the Cap City Half Marathon in May. I’m planning on posting a running calendar and if things go well I might extend the “goal” to include the Columbus Marathon.