Friday, January 02, 2009

Flex integrated with Spring in Eclipse. Myth or reality?

One afternoon spent on integrating flex with spring and eclipse. Myth BUSTED.
Here are the steps you can follow:
1. use this site Using BlazeDS with Spring for figuring out how to make flex work with Spring on a server and make some samples work. You will discover a new buzz-word: BlazeDS. There are other tutorials too, but they forget an important thing: you must put .swf files on the server!!! (.swf is the bytecode of the .mxml files). If you are a flex novice and you don't want to lose 2hours for such a small important thing, use the mentioned tutorial. (note: the build.xml for compiling the .mxml files into .swf files has a mistake: points to the wrong flex_ant jar)
2. thinking of how will you do session-management? Well, there is no client-session in flex. Actually client-session is a hack. Read here.
3. I guess the next question is: what about security? the answer is here.
4. if you are happy that your samples are working and you understood the above blogs, go celebrate with champagne cause you reached dead-end. Now you must probably be releasing you need a flex-IDE. Adobe made Flex 3 SDK free; this means "in theory" you can use whatever IDE you want, even Eclipse. Well, guess again and read this: Flex 3 SDK + Eclipse: an encouraging union, especially these lines:

"Adobe does not ship the XML schema definition file with the “free” SDK. Read that line again. Yeah. I really was *incredibly* pissed off about that. This is basically a complete refusal to allow another application to understand anything in the flex realm." [by Leona]

Leona managed in the end to make it work with an old version of xsd 1.5. But it looks a whole lot of work to make eclipse the perfect IDE for flex. It's 2:34AM and not in the mood. And for what? So that I have to fully learn an entire new language: actionscript? Sorry, not my target right now. Just wanted to put live an idea and at this hour it sounds more easier with a drag-an-drop functionality ===> this means buy Flex Builder. 500$. Sorry, we an in economic crisis.

Conclusion:
- I only wanted to do something cool with images like PicLens. I've googled 2 mornings for time-to-time (from work) for an ajax solution, didn't find it. Must have been blind :) 5 minutes ago found this: http://www.dhteumeuleu.com/. Go to Gallery and pick Image FLow (diapo). Already subscribed to newsletter and donated 30$ dollars to Gerard Ferrandez. I think I should give more. So, I'm going with this solution. At least I know this will work; with flex I wasn't even sure how am I going to do that photo gallery. Founded a flex example on net (for 90$), but not sure was really what I wanted.

Maybe someday, not in the near future, I will get over my frustration and start again with flex (if it's still a buzzword)

No comments: