Adobe Flash Builder 4 (beta)

I found a great site for an introduction to the new Flash Builder 4 that’s still in beta. It has finally convinced me that there is enough difference between Flexbuilder version 3 and Flash Builder 4 that it’s worth it to spend some time *now* with it than when it is coming out (whenever that will be).

The wiki site is called “Learn Flex 4 from Scratch” and is being written (so it’s not finished yet) by an Adobe community manager who is documenting his own strides in re-learning Flex.

If you want to follow it, you need to download Flash Builder 4 beta 2 – and you need an existing Flex Builder serial number if you want to use it more than the default 60 days.

Adobe Flex 4 or Flash CS5 To Be Used To Develop iPhone Applicaitons

Adobe is hard at work on giving developers the means to create iPhone application using Flash or Flex :

– how to develop iPhone applications using Flash CS5

– using Slider and Flex 4 to create iPhone applications

– Applications for iPhone Developer FAQ

While there are no public beta builds out as far as I know (the first one, Flash CS5 is promised for end 2009), this is exciting news for all of us using Flex or Flash to create applications !

flex error 1180: Call to a possibly undefined method SortField.

Here I was, following a very nice tutorial showing you how to use an XMLListCollection with a nice example with source view enabled (thank you Bruce Phillips, btw!) when suddenly flexbuilder starts to complain about error 1180 : Call to a possibly undefined method Sortfield.

Even when the sortfield function is right there in the same function !?

It turns out, after quite a bit of googling around finding not very much, that flexbuilder for once did *not* automagically write the import statement for the sortfield. It did so for the sort function, but not for the sortfield function. I don’t know if this only happened to me or if this is so all the time.

But here, the advantage of working with flexbuilder turned to a disadvantage – I expected it to add the import statement necessary for it all by itself; for once, it did not do it.

All I needed to do was to add theĀ  import mx.collections.SortField; to get things working again. Still, I lost some programming time looking for a solution to this problem, so I’m blogging this in case you have a similar experience.

Flex and Python and PHP : a first comparison

After two weeks of so of looking into Flex, MXML and ActionScript, the key differences between the two languages are for me that Flex is first most oriented to the ‘front’ as opposed to python, that is more oriented to the ‘backend’.

With front I mean that everything so far that I discovered in Flex is oriented to presentation to the web client. There’s heaps of stuff in Flex that you can use to easily develop and present quality stuff to the web visitor (or even to the desktop, if you develop in Flex for AIR, Adobe’s desktop runtime solution that uses the same code as your web application).

But to get to the data from the backend, you cannot simply write an SQL query in your code; since flex code is compiled to flash, anybody with a flash decompiler could read the credentials you are using (as opposed to php or python code on a webserver, which is executed and where only the results are shown to the client; code is never shown).

So that means that to connect to a database, you need an intermediary solution; a php script to talk to or a coldfusion server, or a java scriptlet thingey; anything else really that can talk to a data server without giving away the keys to the kingdom aka the credentials to the db server.

Python on the other hand is very good at connecting to just about anything : from csv files to xml to SQL in Oracle, Access or Mysql database servers : it all works. However, presentation wise, there is a lack of an easy presentation framework that works as in Flex. There are several ways to present your results in Python, but they are not baked in; you have to go and search them. QT, PythonCard, Tkinter and others are all there, but all have differences. All require an extended time to learn.

PHP is a mixture of both : it can connect to just about everything, but my personal opinion is that development is slightly more convoluted than Flex, plus you really need to take care not to mix code and presentation.

Using the various MVC frameworks around (Symphony is nice, but biiiiig to learn as it involves writing parts in YAML, yet another (markup) language) you can do this, but my personal opinion is that it’s a lot to learn if you just develop a few web pages. There’s Django for the pythonistas, which I’m partial to and keep returning to, but haven’t actually made anything usefull with.

It’s all good and well to have ‘flash and bang’ for your web customer, but you need to show them your data as well – unless it’s an arty type, he’s thereĀ  on your site for a reason : to get informed about something.

My hope is that the next flash version or flex version will have data binding implemented via another easier way; Adobe wants to make this big, it’s the reason why they open sourced flex in the first place…