The Future of Flex.

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

Posted by Daniel Wanja Tue, 15 Nov 2011 16:06:00 GMT


Redis-Flex: An ActionScript Library to integrate with 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

Posted by Daniel Wanja Mon, 13 Jun 2011 20:40:00 GMT


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

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

Posted by Daniel Wanja Fri, 27 May 2011 22:01:00 GMT


Building Rails Apps for Rich Client - Using the bulk_api from 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

Posted by Daniel Wanja Fri, 27 May 2011 04:04:00 GMT


Journey into Android Development - Part 3 : Flex Development (Adobe AIR for 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.

Posted by Daniel Wanja Sun, 10 Apr 2011 19:12:00 GMT


Good RobotLeg presentation at 360Flex

Paul Robertson gave a RobotLeg presentation at 360Flex and put his slides online. I had to dive into a RobotLeg application the other and wanted a refresher and found his slides really great so I’ve extracted for your (and my) convenience some useful bullets points:

  • View
    • the View is represented by your view components and their Mediators
    • Mediators provide API for view components
    • Mediators listen for view component events
    • Mediators listen for framework events
    • Mediators dispatch framework events
    • view components are not coupled to their Mediators
    • Mediators are coupled to their view components
    • Mediators can access Service and Model classes directly
  • Actor
    • Actor is the base class for Model and Service classes
    • eventDispatcher is injected into Actor
    • Actor provides a dispatch(event) method
    • Actor is for your convenience
  • Model
    • Models extend Actor
    • Models provide an API for data
    • Models sit between application data and other actors
    • Models should not listen for framework events
    • Models dispatch framework events
  • Service
    • Services extend Actor
    • Services usually implement an interface
    • Services communicate with the outside world and provide an API to external services
    • Services can parse results from external services
    • Services do not store data
    • Services do not receive framework events
    • Services dispatch framework events
  • Controller
    • represented by the Command class
    • Commands are executed in response to framework events
    • Commands are stateless
    • Commands perform work on Service and Model classes and dispatch events (call other commands)
    • Commands receive data from the events that trigger them
    • Commands dispatch framework events
    • Commands do not receive framework events

You can get the slides here and also checkout his blog entry for more info.

These days everyone has his preferred Flex framework. Mine is still Swiz as it doesn’t impose a structure like Cairgorm or RobotLeg. I’ve also just started on a new project that uses Parsley, so I’ve soon done them all!

Enjoy!
Daniel

Posted by Daniel Wanja Tue, 28 Sep 2010 01:20:00 GMT


UsageReport Downloader for Amazon Web ServicesTM. A simple tool to download all you usage reports with one click. ec2, s3, sns, sqs and more

UsageReport Downloader for Amazon Web ServicesTM is a simple tool to download all you usage reports with one click.

Install UsageReport Downloader

mainui.png

The files are download in your documents folder. You can change the default folder. You selection is kept for the next time.

Click the Download XML or Download CSV button to choose which format the report should be downloaded from and off you go…

downloading.png

All you files are download to the select download folder (here /Users/daniel/Documents/usagereport/downloads/Current\ Billing\ Period)

downloadedfiles.png

When the application start it checks if you already logged in and you will see the following message.

pleasewait.png
You can stay logged in between launching the application, we recommend that you log out once you download all you files.

If you need to login just enter your email and amazon password as usual for https://aws.amazon.com.

usernamepassword.png

If you use the authentication tokens for signing in you will be presented this additional screen:

token.png

Et voila…Happy downloading!

Please contact me at daniel@appsden.com for any bugs, issues, questions.

Enjoy!
Daniel Wanja

Posted by Daniel Wanja Tue, 20 Apr 2010 03:01:00 GMT


Sneak peek of Usage Report for Amazon Web Services™

I have been working on a tool to visualize your Amazon Web Services usage logs for EC2, RDS, SQS, S3, SDB (and soon CF). There will be a limited free version and a full version that has the dashboard and the drill down for each of the services. This tool is still in development but my todo list is getting shorter...so you can have a sneak peek here:

Sneak peek of Usage Report for Amazon Web Services™ from daniel wanja.

Posted by Daniel Wanja Thu, 18 Mar 2010 05:20:16 GMT


360Flex last day.

What a conference! The talks where really awesome so far. Not exactly sure what I will attend today. I might attend “Optimize it! ActionScript Tips for iPhone Games” followed by “Adobe is from Mars, Microsoft is from Uranus: A View from the Client”. Then I will have to split early to catch a flight to Salt Lake City for the MountainWest RubyConf 2010.

Optimize it! ActionScript Tips for iPhone Games Renaun Erickson

Renaun is Plaform Evangelist for Adobe since last week. He will put up the slides and code on his blog later today. Many of the tips are good for any Flash/Flex app not just for iPhone ones.

  • Packager for iPhone (PFI)
  • LLVM cross compiles

He will focus the talk on Memory/Cpu/Mouse Move and Game Timers.

Instead of going to the Flex/Silverlight talk, sorry Jun and Eric, I went to Nate Beck’s talk on pushbutton. And Doug McCune had something special planned for Nate’s birthday…

Flex 4: It’s a Wrap

Thank’s Tom and John…the conference was awesome!

Posted by Daniel Wanja Thu, 11 Mar 2010 05:43:28 GMT


360 Flex - Day 2 (Tuesday) - Live Blogging

As you saw yesterday afternoon I didn’t blog too much, so let’s how today goes. The party last night was really fun, lot’s of networking, rock band playing and just a nice general geek atmosphere.

Evolution of RIA Design Principals

Right now the “Evolution of RIA Design Principals” panel is about to start.

Panel is:

  • Chet Haase – Senior Computer Scientists at Adobe
  • Bill Scott – Director UI Engineering at Netflix
  • Ehud Waizer – SAP
  • Paul Guirata – Catalyst Resources

Context: oriented to customer facing applications. Not games.

Chet Haase

He works on effects at Adobe. Effects used in a subtle way can make the user more effective.

What are the top 3 rules

  1. Transitioning
  2. Anticipatory
  3. well-timed.

Don’t Lose the User.

Bill Scott

Principles for Interesting Moments

  • Input where you output
  • Require a light footprint
  • Stay in the flow
  • Offer invitations
  • Be reactive
  • Use transitions

Paul Giurata

Modular
Reusable

  • Panel vs Page
  • Panels being reusable application(s)
  • Panels being re-used down to the code level
  • Panels potentially being entirely separate applications

Bill mentions Christine Perfetti has a few videos on usability testing.

Compiled Favorite Principles

  • Transitioning (Animations)
  • Anticipatory
  • Timing
  • Don’t Lose the User
  • Interesting Moments
  • Modular
  • Reusable

Consistency .via. developers working from the same code. Not a style guide as it’s open for interpretation.

Whats New in Flex 4 that’s NOT Spark! – Deepa Subramaniam

Deepa was on the engineering team for 7 years and now just got promoted as product manager.

She will put the slides on her blog. So I will go easy with the notes.

We will talk about:

  • Enhanced States
  • Pixel Bender Integration
  • Text (TLF)
  • 2-way Data Binding
  • Advanced CSS
  • OSMF
  • MXItemRenderer
  • RSLs
  • Charting Enhancements
  • ASDoc
  • MXML Vector
  • Compile time FXG Optimization
  • Improved Compiler

2-Way Databinding

Inline declaration using the syntax, @{bindable_property}

<s:TextInput id="t1" text="@{t2.text}" />
<s:TextInput id="t2" />

Enhanced States Syntax

  • AddChild/RemovedChild replaced with includeIn/excludeFrom
  • State Groups
<m:states>
 <m:Sate name="A"/>
 <m:Sate name="B"/>
 <m:Sate name="C"/>
</m:states>

<Button label="b1" includeIn="A,B" />
<Button label="b2" includeIn="C" />

Text

  • FTE – Flash Text Engine in FP10
  • TLF – Text Layout Framework, set of ActionScript classes build atop FTE. Is XML-based markup

Each text element maps to a class


flash.textLayout.elements.DivElement

flash.textLayout.elements.ParagraphElement
flash.textLayout.elements.SpanElement
flash.textLayout.elements.TabElement

TLF Partitioning:

  • Simple, plain text
  • Rich text
  • Rich editable text
  • Rich, editable, selectable text

Pixel Bender Integration

  • Pixel Bender: language for hardware-indepdent image processing algorithm
  • Shader: compiled instance of a Pixel Bender kernel
  • Flex introduces the ShaderFilter class. Simplifies pixel bender such that they can be invoked in MXML

Advanced CSS

  • Flex 3: type and class selectors
  • Flex 4: Multiple class selectors, id selectors, descendant selectors, pseudo-selectors, pseudo-state selectors

Eg pseudo-state selectors

@namespace s "library://ns.adboe.com/flex/spark";

s|Button:up {
  color:#000000;
}

s|Button:down {
  color:#FFFFFFF;
}

OSFM

  • Generic framework for managing media in Flash applications
  • Offers playback functionality, exposed in the Spark video component
  • replaces FLVPlayback
  • org.osmf.media.MediaPlayer
  • Play, pause, stop, loop, seek, volume, autoLoop, autoPlay, …

MXItemRenderer

  • Spark ItemRenderers for use with MX List-based components
  • Extends Spark ItemRenderer and handles the contractual differences

Charting Enhancements

  • FilterFunctions for chart types. Can specify custom filter functions against the data set
  • Inverted axis support
  • RendererDirection in PieSeries
  • Performance related bug fixes

RSLs

  • By default RSL is turned on.
  • Default linked HelloWorld is 78% smaller
  • How to monkey patch when using RSLs. If you monkey patch you loose the benefits off RSLs
  • Flex is split in 6 RSLs: textlayout, osmf, framework, spark, sparkskins, rpc

MXML Vector

  • New type
  • Like Arrays but contents are restricted to a single base type
  • Faster than array
<fx:Vector id="myVector" type="String">
  <fx:String>hi</fx:String>
  <fx:String>bye</fx:String>
</fx:Vector>

Compile-time FGX Optimization

  • FXG directly to SWF representation
  • Faster and smaller
  • .fxg or past FXG into an MXML Component uses compile-time FXG Optimization

ASDoc

  • Comments in MXML
  • Support DITA creation
  • Max, Win, Linux

Improved Compiler

  • Incremental compilation. 50-80% better
  • Full compilation: 30-40% better (large apps)
  • Compiler Memory Usage: large apps are 30% better. multi-project apps are 70% better. Small apps are similar to Flex 3
  • Posted by Daniel Wanja Tue, 09 Mar 2010 19:19:08 GMT