Video recording from my talk about Flex, Flash Builder and Android development is available (only Slovak version).
RIA erra was annouced several years ago by companies like Adobe, Microsoft and Sun. Those companies had special software “fixtures” that move web behind static HTML. Flash player, Silverlight or JavaFX carried promise of more interactive future.
The only problem was that technologies like Flash Player and Silverlight were under control of companies. Yes, there were a lot of things that you could do with RIA tools. Building video player, complex enterprise apps and so on.
Adobe took even further step and made this technology available for Linux community. Unfortunately some managers took measures and decided that they won’t ship Eclipse based plugin for Linux and as a result this led company to cancelling support for Linux in Adobe AIR. The glorious promise of one code multiple platform was broken.
Flex/Flash/AIR and Silverlight are very advanced technology. They can do a lot. The price for that is hidden in their complexity. The web learned from mistakes of those technologies.
It happens that when you write code for the first time then you make a lot of mistakes. Once you do it again you can make it even more efficient. RIA era was great starting point for open technologies that we have today.
I would like to add further points to Flex, because I invested huge amount of my time into this technology. Flex is great piece of technology art. There is no question about that. Flex is even open source. Unfortunately it is complex. Complexity is good when you want to sell enterprise software. Let me formulate it in other way: It was good when you wanted to sell enterprise software. Complexity of projects were blocking Innovation. Take jQuery do some fancy stuff in 5 minutes and you won’t be able to do it in Flex in 4 days.
The primary trap of Flex was one big untrimmed framework. Adobe found out that Flex 3 is too big to fit on mobile devices and therefore Flex 4.5 has completely different architecture. It is so different that it took several days or weeks to port application. That is expensive and result is questionable. My advice is do not try to port app to Flex 4. Write a new one.
The last hope for Adobe Flash player was to promise something great. They promised wonders of 3D in Flash player “soon” at Adobe MAX 2010. Today is summer 2011. No 3D was launched in official version of Flash Player. Meanwhile WebGL and Canvas took off. Open technologies are taking over the ground of 3D and people are doing real creative stuff with great performance even without Flash.
Adobe focused Flex 4.5 on mobile development. I doubt that it was right step how they did it. In order to meet the promise of mobility they had to broke a lot of backward compatibility stuff and to be honest you have to rebuild apps from the scratch again. Another problem is that many good Flex/RIA developers left Adobe in last months. It’s a big challenge for Flex team to keep the ball rolling. I wish them good luck.
As far as I understand actual situation Adobe is now moving toward more “safer” enterprise world. Adobe bought Day software and other companies that are focused on enterprise world. But that is different story.
To tell long story short: This is the end of the RIA era as we know it. There are new challenges 🙂
Sergei Sokolov wrote article about Using automated tools across the lifecycle to develop higher quality Flex applications.
He explained some tools and approaches how to build better Flex based software.
I’d like to add some of my notes to this topic:
1. The key factor for reaching good quality of Flex products is learning. Flex is platform and it is evolving. Therefore it is imperative to learn new approaches to solve some problems.
2. Automation is very important. Flash Builder is bundled with support for Ant. That is not enough. Continuous integration should be implemented via tools like Maven using FlexMojos. Without this point everything is useless, because you’ll end up with mixing different versions of Flex SDK with your framework. Thanks to Jenkins and FlexMojos you reach stability in SW production. We already launched Jenkins CI for open source ActionScript projects – you can find some details at corlan.org.
Here is small example how to use FlexMojos.
3. Teach developers how to use FlexUnit. Companies tend to buy cheaper version of Flash Builder which has no support for FlexUnit. Investing few more bucks could give them very handy tool. See lynda.com or tv.adobe.com for lecture about FlexUnit. There are also other helpful tools like FlexMonkey, etc.
4. Different tools. Flash Builder is great, but real development power comes with combination of Flash Builder with IntelliJ Idea Ultimate. Those two tools together could speed up development and improve code quality. Also test automation has good implementation in IntelliJ Idea.
5. Flex PMD. This could help team which deals with new developers. Often it is hard to guess level of skill of new developer in the team. Using Flex PMD could help with measuring and detecting anomalies in his code style
6. Get rid of Not Invented Here Syndrome. There are many small useful frameworks which could help to improve Flex productivity, like Swiz, RobotLegs. Knowing those frameworks could save hundreds of development hours. So give a space to developers to learn new approaches.
I prefer small frameworks with less singletons inside. Some Flex frameworks are overflowing with singletons. Do not use sw with too much singletons, it will bite you and maintainability of your Flex product will drop to zero. Just a friendly warning at the end 🙂
In my opinion this is the core of producing real good and stable Flex software.
New CS5.5 is here. You can download it from adobe.com.
I strongly recommend to test it. CS5.5 contains many useful features.
One very interesting feature for Flex developers is hidden behind CTRL 1 keyboard shortcut.
CTRL 1 opens Quick Assist tool. It’s context dependent. Quick Assist could help you with some routine tasks in development.
It is worthy to mention that there is also CTRL 3 shortcut. This shortcut came from Eclipse and it helps you to quickly invoke anything what IDE provides.
Jean-Philippe Auclair published open source FlashPreloadProfiler.
More information at http://jpauclair.net
It is quite easy to create mobile version of application with Flash Builder Burrito “Preview”. You can run and test this application with Google Android emulator. There are few tricks how to achieve it.
2. Unpack Android SDK, run SDK manager, download all updates.
3. Add two paths to your PATH system variable: Flex SDK/bin and Android SDK/platform-tools. You will be able to run adt (Flex) and adb (Android) commands.
4. Create Virtual Device in Android SDK Manager. Target platform must be Android 2.2. Android 2.3 does not work with emulator version of AIR. Start this new device.
5. Open shell/command line and go to directory Flex SDK/runtime/air/android/emulator. Install AIR Runtime to Virtual Device by this command:
adb install Runtime.apk
6. Create Mobile project in Flash Builder. Try to run it. It will create some files in bin-debug directory.
7. Open shell/command line and go to this bin-debug directory. Create package for Android emulator:
adt -package -target apk-emulator -storetype pkcs12 -keystore cert.p12 Main.apk Main-app.xml Main.swf
Note: cert.p12 could be create by Flash Builder in “Export release build” step.
8. Install the package to Android emulator:
adb install Main.apk
That’s all 🙂
adb install -r Main.apk
Pokiaľ máte čas, určite si pozrite nasledujúce video z konferencie Max 2009 – Flash Builder 4 Advanced Tips and Tricks
Follow @jurajmichalek on twitter.