The Future of Flex.  »

Created at: 15.11.2011 18:06, source: OnRails.org, tagged: Flex iPhone android flash

At first I thought “Wow, Adobe really messed up their communication”. They could have focused on what they are adding, strong support for HTML5 and CSS4, Adobe AIR for Mobile, and not on what they are removing, the Flash Player in the Browser. But then they also announced that they opened sourced Flex via the Apache Foundation. And the main stream media, the blogosphere, and many developers I know went crazy and said Flex is dead, it’s over, time to convert all your projects to HTML5.

At a second thought I think it’s pretty smart what Adobe did. The saying goes “If you can’t beat them, join them”. In fact the Flex against HTML fight wasn’t one where Adobe had anything to win from. So they just made it loud and clear and now they are saying “We are HTML5”. In fact detaching themselves from Flex in appearance allows them to ride the new HTML5 technowave and get in the news when they upgrade their tool, bring out new HTML5 component framework or acquire hot companies like PhoneGap and TypeKit. We are HTML5!!

Adobe has already two great tools for HTML5, Muse and Edge and needs to push them way further and also needs to create or acquire a great HTML component framework such as Sencha so they call build and sell new development tools as well as design tools for the new growing crowd of HTML5 developers.

So where does that leave Flash and Flex. I use a lot Flex in the enterprise, and that’s where Adobe just did the most damage in my eyes. Go now try to convince any CTO that Flex is a good idea. Flex is a mature framework and Adobe has a great enterprise offering, but it will be hard to convince anyone that Adobe is still behind that technology after the way they managed their communication. This said I think the move of Flex to the Apache open source foundation is a great one and if managed right will give Flex a good run for years to come. Flex is still a great choice for many enterprise projects and will remain so until a solid and widely adopted HTML component framework emerges. If Adobe is smart they could provide that offering.

Flex is also a great environment to develop “native” mobile applications that can run on iOS and Android. The forthcoming Flex SDK 4.6 will show that potential and it’s a great way to create cross platform mobile and tablet applications. Adobe will not kill Adobe AIR for the mobile as it’s a too appealing growth market. But that message didn’t get through to the main stream media.

As Adobe said Flash for the desktop for games and Adobe AIR for mobile will be here for a while. But Adobe has the most to gain if they become the major player in the HTML5 field by providing tools, framework and making the web standards evolve. And they are in a good position to get there. To achieve this goal it also means that they will refocus many of their development teams and this will impact Flash and Flex. Moving the Flex SDK and some of the key developers to the Apache Foundation will allow to continue to evolve the SDK regardless of Adobe’s new focus. The move a few years ago to the Flex Sparks components and the recent addition of the new mobile components provide a great and mature framework basis for a real open source effort which I believe will have a long life even if it will become a niche environment over the long run. Note I consider Ruby on Rails a niche market, a really great one to be in. Adobe has something great with Adobe AIR for mobile and this is the one area where they could even grow their developers basis if they get their message right. For me AIR for mobile/tablets and the Flex SDK 4.6 is one solution where I can build mobile apps faster than in any other environment and this will be a great business to be in, especially for the enterprise market.

The smart enterprises will realize that Flex is stable and here to stay for the long run, even if it’s not in the spotlight. They will start HTML projects in parallel to gradually improve their developer workforce and experience in this area. They will also realize that the HTML5 frameworks and coding technics are evolving so rapidly that it will be time consuming just to keep up. Also these frameworks are not as mature and complete as in the Flex ecosystem. Finding Flex developers is difficult, but finding great HTML/Javascript developers is even harder. This said, there is no denying that pretty quickly the HTML5 tools and frameworks will catchup with what Flex offers today in ease of development for enterprise applications.

Personally I’m looking forward to see how these HTML5/Javascript tools/libraries will evolve and will play with many of them.

So where does all this leaves you, the developer. Well, it’s for sure time to jump on the new HTML/Javascript bandwagon if you haven’t yet. I cannot see many companies starting new enterprise projects with Flex. If you are into mobile or tablet development give the new Flex SDK 4.6 a try, I believe there is a great potential for Flex to become a major player in the mobile development arena…targeting “native” applications and not the browser. Yep, your heard it here first ;-)

Enjoy,
Daniel


more »

Redis-Flex: An ActionScript Library to integrate with Redis »

Created at: 13.06.2011 23:40, source: OnRails.org, tagged: Flex redis

Announcing redis flex An ActionScript Library to integrate with Redis.

A while back I looked into accessing Redis directly from Flex and I found an existing library, as3redis that however didn’t support the new unified request protocol. So I wrote a minimalist wrapper that now allows to send commands to a redis server.

To access the Redis server from Flex just instantiate a Redis instance:

    <redis:Redis id="server"
                 connected="server_connectedHandler(event)"
                 result="server_resultHandler(event)" />

Then you can send commands:

    server.send("SET A 123");
    server.send("GET A");
    server.send(["rpush", "messages", "message one"]);

Note it’s not a good idea to connect a Flex application directly to Redis. Redis is usually used in the context of an application server that protects it’s access in the same way that Flex doesn’t connect directly to a database. However they may be cases that this could be useful.

Enjoy!

Daniel


more »

To Infinity and... no beyond - An ActionScript bug...I mean, feature. »

Created at: 28.05.2011 01:01, source: OnRails.org, tagged: Flex

So yesterday I was asked about a bug in a legacy Rails and Flex application. There was one company name that wasn’t displayed correctly on the front-end. “Infinity Corp Name” was just displayed as “Infinity”, so nothing beyond infinity. First I thought it was a joke, but not, a real bug that could cause issues.

So I looked at the code and the service call was a plain HttpService call with the resultFormat set to object. The server returns XML but the Flash Player converts the XML to a tree of objects. This is where it get’s funny. In fact when the player converts your hash to Objects it checks if a value is a number or a string…Hey guess what “Infinity followed by something” is a number.

Here are some conversion examples:

String Is Number Converted Number
“123” true 123
“123 Abc” false NaN
“Infinity” true Infinity
“Infinity Abc” true Infinity

It’s the last conversion which is the root of the problem as “Infinity Abc” is a number that when casted translates to Infinity!

So we found the problem but the solution is really don’t use the Flash Player to do the conversion for you using the return type “object”. Use “e4x” which would turn your object in XML or use JSON and do the conversion yourself.

To Infinity… and beyond!

Daniel


more »

Building Rails Apps for Rich Client - Using the bulk_api from Flex. »

Created at: 27.05.2011 07:04, source: OnRails.org, tagged: Ruby on Rails Flex

In this screencast we are going to show how to build a Rails app in a couple of minutes that is optimized for Rich Client. The application is a todo application build in Flex connecting using the bulk_api to the Rails server using my new bulk data source Flex framework.

Enjoy!

Daniel


more »

Journey into Android Development - Part 3 : Flex Development (Adobe AIR for Android) »

Created at: 10.04.2011 22:12, source: OnRails.org, tagged: Flex android

Ok, today I’m at the 360Flex conference following Brent Arnold’s AIR for Android presentation. We are playing with the Flex SDK 4.5 to build an Android app however we had to sign an NDA, so I cannot say some of the detail unless it’s already on the internet. This said I assume that tomorrow Adobe will announce the official release of Flash Builder 4.5. And a ton’s of information was already published:

  • http://labs.adobe.com/technologies/flex/mobile/
  • http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+Hero
  • http://corlan.org/2011/01/12/understanding-flex-mobile-views-and-viewnavigator/

Here is TourDeFlex that shows all the capabilities of the Adobe AIR runtime. Download TourDeFlex. The source code can be found at https://github.com/jamesward/TourDeMobileFlex

In the training we created a small application that checks the capabilities of your device: Download DeviceCapabiliites
The application uses the Capabilities api that checks various parameters of your device., such as multi-touch, camera, location. Here is the source code:

Within Flash Builder in the properties of your project you can go to the Flex Build Packaging | Google Android and create a self-signed certificate.
Then you can use the Project | Export Release Build… option to create an .apk file for your project.

The application itself is not that exicting but allowed us to discover how to create AIR apps for Android using Flex and Flash Builder.

Enjoy!

Daniel.

UPDATE (4/10/11): Et voilà Flex 4.5 is announced, but the final version will only be downloadable early May. Here is a good article on mobile development.


more »