2007-12-20

Flash and Pink Floyd

I just had to write about this. My favorite band of all time is Pink Floyd and this holiday season they have released a special box set containing all their albums for sale. Although that is pretty neat in itself, the related web site they have is just as good. The whole thing is done in Flash and it gives you song snippets from every album, I just love it. Very well done. I just had to post it :)

2007-12-07

Careful of missing display-name tag

Recently one of my colleagues decided to add a mini-Flex UI to a portion of an existing J2EE application. In the process he obviously modified the web.xml to include all the parts required to make FDS 2.x (now called LC DS) work. Well he forgot to include the display-name tag in the web.xml and this prevented the application from starting-up properly. The exception below has found in the server logs:

flex.messaging.config.ConfigurationException:
Invalid channel endpoint class 'flex.messaging.endpoints.AMFEndpoint'
specified for 'amf-polling'.
at flex.messaging.config.MessagingConfiguration.createEndpoints(MessagingConfiguration.java:141)
at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:82)
at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:105)

(We are using WebLogic 8.1 SP6 in case you wondering) After some googling he found out that the missing tag was the mostly likely cause and indeed it was. So be careful people!

Adobe.com updated

Very nice indeed. When Adobe/Macromedia merger happened, the Adobe website took many elements from the old Macromedia web site, but for the first time since then, a complete re-designed of the Adobe.com has occurred. More emphasis has been put on content and taking advantage of wide-screen real estate is a real nice touch. Head over there now and check it out!

2007-11-26

Don't forget the power of callLater()

Don't forget that while you are developing in Flex your applications will run inside the Flash Player. One must remember that at its core the Flash Player is but a video player, and every Flex movie has but two frames. The first frame is for initialization work (when you see that progress bar appear) and the second frame is where the application executes. The second frame is the one that gets re-drawn X times per second, and the Player determines what parts to re-draw based on information provided by the Flex framework. This is why controls have an invalidateProperties() method, basically telling Flex that "hey I changed, I need to be re-drawn".

This is all fine and dandy and works, hmmm, 95% of the time, but sometimes you fall into these weird situations where things don't occur as you coded them. Happened to me just last week where I was developing a component to include in an email client that allowed the user to type a person's name or email and it would display a list of suggestions. Well once the user clicked outside of the component, the suggestion list should disappear but it didn't. You see sometimes your code won't execute in the same frame of animation as everything else; I don't really know why and probably only a Flash Player engineer can explain it. But what you can do is use Flex to tell the Flash Player to execute something in the next frame (probably when its less busy I guess?). You do this by using the global callLater() function like so:

// use it to call some local function
callLater( someFuncName );

// or direct inline call of a nameless function
callLater(
function() : {
... some code here ...
}
);

I've mostly used the second method because what I normally have to do is very short, like 1-2 lines of code. So for me this solved my problem, as I was able to close the suggestion list I was displaying. And it might do the same for you some day, so don't forget it :)

2007-11-19

People using AIR apps

It is very cool to see people at my office, non-developers use AIR based applications. First of all, our documentation master is big a music fan, so he uses Finetune to listen to his favorite tracks while he corrects all my spelling mistakes :) Secondly one of our big DBAs loves to wheel and deal on eBay, so he has began to use the eBay Desktop to get the job done. Both of these applications offer a better experience that their browser counterparts, and I think both of them demonstrate the potential of desktop-based RIAs.

2007-11-14

Intellij 7 Flex Module

As a follow up to my previous post, nicity was kind enough to point out that Intellij 7 does allow you to add a Flex module to your project. You do this by going to 'Settings | Project Settings | Modules' and press + (New) and select "Flex". Once that is done you can specify the path to your Flex SDK which I did.

This seems to kick off the reading of the content in the Flex SDK folder (and sub-folders), but it doesn`t seem to do anything after that. I tried editing an AS class and a MXML file to see if code-hinting was provided and such and there doesn`t seem to be any new options. Oh well, I guess this is only the beginning of the Flex support.

2007-10-30

Intellij supporting Flex

Once upon a time I used to be a big Intellij user, before the popularity of Eclipse. Love the IDE and actually I still do, but since everyone at my company uses Eclipse and of course due to Flex Builder, I haven't used Intellij in years. However I was recently looking at the feature set of Intellij 7.0 and noticed something interesting, they support Flex! So I was ok, let's download and see what they mean. So I did play around with it for an hour or so and here is what I discovered.

For MXML, they do syntax coloring but there is no code-hinting as far as MXML properties are concerned. But if I remember from way back, there is way to configure this in Intellij if you have the schema for MXML. One thing I noticed is that code-hinting does work for any AS code you write in a script block in an MXML component. As for ActionScript classes, they do syntax coloring and some code hinting, because they are basically supporting the ECMA 4.0 standard, which ActionScript 3.0 implements. One cool thing I noticed is basic refactoring is also supported which is great!

Unfortunately there is no way to point Intellij to your Flex SDK of choice (either 2.01 or 3.0) so it can provide code-hinting/auto-completion for the framework classes. As for compiling, you can configure Intellij to run externals applications, so basically point it to mxmlc with the right parameters and you should be ok.

So it is a good start for those using Intellij and building applications using Flex. I am sure someone will build a Flex plug-in at some point in the near future that will do even more, or JetBrains will simply upgrade their current support. Great to see that a major IDE has acknowledge the presence of Flex in this large development world :)

2007-10-23

DB access with j2flex

You know a technology is getting more popular as people start releasing more add-ons for it, and it is no difference for Flex. For those who are not keen on server-side development, someone is trying to make things simpler are the name is j2flex. It is for Java-only and allows you to do object-to-RDMS mapping from the UI all the way down to the database. Definitely something that certain people will be interested in, so give it a go if it peaks your interested....oh wait, there is nothing to download! I guess they forgot that, or it is coming soon. Guess you will have to wait :) Till then you can head over there and read about it.

Register for RIA Developer Camp

Adobe is holding an RIA Developer Camp in San Fran in a couple of week, sign up here: http://www.eventsadobe.com/devcamp/index.html

Great chance to learn about the latest Flex and AIR stuff and meet people!

2007-10-18

Genesis

Well here I am, blogging for the first time. My name is Dimitrios "Jimmy" Gianninas from Montreal, Canada and I have been in the Flex ecosystem since the beginning basically. You may have read one of the articles I wrote on Adobe's DevNet or seen me post on Flexcoders. I am basically going to use this blog to post things regarding interesting things I come across as I develop in Flex and Java at work and also share a Flex component or two as we go along!