Migrating from Flex to HTML5 with Web Atoms JS

On September 14, 2013, in Programming, RIA, by Akash Kava

Flex – MXML + ActionScript

Flex was great platform, and it still it is, we spend years developing on flex and MXML markup was probably the best way to write UI components. However, dependency on Flash forced us to move away from Flex and migrate to HTML5.

HTML as Universal UI Language

  • Each device has different UI Elements and Different way of Interaction
  • Each device has different scale and screen measurement
  • Each device needs different programming language expertise
  • Each device has its own set of APIs
  • Emerge of Unified HTML Device Programming like PhoneGap
  • UI is complex to write, and is even more complex to rewrite for different platforms
  • Web is truly a unified version of User Interface

Problem with JavaScript

  • Easy to write
  • Difficult to maintain
  • Difficult to Refractor
  • Difficult to understand our own code
  • Cannot blame anyone for my own code
  • Difficult to visualize UI Hierarchy
  • How does my UI Looks?
  • And this is what code looks at the

Backbone, jQuery, Knockout, Prototype ….. Endless Names with Endless Forks on Github

No doubt, each of frameworks are trying to deliver Flex kind of capabilities, but not at all close enough. Creating application with any of them requires huge knowledge of JavaScript itself, including no inbuilt object oriented support. But code becomes chunky, JavaScripting is tedious. A year and half back, we studied and implemented every JavaScript frameworks, but it resulted in huge learning curve for people coming from Flex/Silverlight and Java background. All these libraries are based on “Functional Programming” where else Flex/Silverlight and JavaScript are based on component driven development.

Reason behind Web Atoms JS

Primary focus of Web Atoms JS was to introduce and emulate component driven development found in Flex/Silverlight and Java. A true potential of Object Oriented Development along with simpler syntax without reinventing whole new language. Let’s analyze small Flex Code vs Small Web Atoms JS code. A simple Signup Form.

Now let’s review, Web Atoms JS example for exact same UI component.

If you notice, methodology is exactly same, however since HTML does not offer custom Tag Names, we have to use atom-type attribute to convert HTML element to Web Atoms UI Element. For Flex/Java and Silverlight developers, this syntax is easier to grasp and learn instead of New HTML Grammar Syntax which is confusing. So let’s review available Flex to HTML components already shipped with Web Atoms JS version 1.1.1.

Web Atoms JS Counter Part Flex
AtomViewStack View Stack
AtomFormLayout Form
AtomFormGridLayout – a dynamic Form Layout that can manage multi column rows, with each row having independent number of columns.
AtomForm, AtomPostButton with AtomPromise. AtomPromise encapsulates all AJAX calls and AtomPromise is tightly integrated into Property System, so you can assign a promise and async call is automatically managed. HttpService
AtomListBox List
AtomItemsControl Repeater
AtomToggleButtonBar Horizontal List
AtomDockPanel Grid
Item Template Item Renderer
AtomWindow Panel
AtomFileUpload – AJAX File Upload
AtomVideoPlayer VideoDisplay
AtomNavigatorList – iPhone kind of UI Navigator to drill into detail and coming back Mobile Views ?


Dynamic Compilation from Flex to JS vs Recreating Components

We earlier did wait from Adobe to bring some sort of AS to JS compiler, but we realize that HTML5 is coming up with new technologies. Any dynamic compilation from Flex to JS will not result in perfect HTML app as Flex does not contain HTML elements and there is no possibility of including more HTML library. CSS3 brings up lots of new things and HTML will come with new things, it will not be easy to incorporate anything else apart from Flex components. So one time migration from Flex to HTML5 will give us the freedom from Flex itself as well as we will be able to expand and integrate other HTML or JS libraries easily.

Learning Curve

In case of Web Atoms JS, it is just a syntax that is different, but most common logic remains same, as Web Atoms JS comes with Components that are already used by your developers and they are familiar with all of them. Component properties are also very much similar to that of found in Flex/Silverlight and Java.

Mobile Development

All of components shipped in Web Atoms JS are 100% mobile browser compatible infact they are compatible with even non mobile devices like TV, Camera etc.

Single Framework

Web Atoms JS provides almost everything that you need to create working business application. However we have not considered Graphs yet, but there is an easy way to integrate third party components as well.

Editing Support

We have provided rich syntax highlighter for Visual Studio as of now, and we will be coming up with more editor supports soon. You can also check out our live website and you will get CodeMirror extension to colorize Web Atoms attributes on HTML.

Debugging Support

To analyze inherited Data properties and other Scope properties, we have created Chrome Web Atoms Properties Pane extension, which lets you analyze HTML Elements and data associated with it.

Download Source and Documentation


Tagged with:  


Apple announces iPad, a bigger version of iPod Touch. With a big screen of 1024×786 pixels. And it comes with basic need of surfing internet and be online. So called magical and revolutionary device does not support Flash and Silverlight yet. And most of business apps today, built upon RIA are running either on Flash or on Silverlight. And IT Devs are heavily investing in RIA technologies due to snail speed of WWW group. However, the device can replace a laptop for most of users who just spend time on internet doing their regular business, studies or entertainment. So lets analyze what will be future of Web for different type of users.


Today students need a good web browser and an internet with lot of social media websites to study, interact, entertain and play games. Apple iPad is a best bet for students. Do they really care that it does not support Flash and Silverlight yet? Answer is no. They will certainly buy iPad, come to the website, and if it has Flash or Silverlight, they will call website’s support instead of Apple’s support and say,

Your website is not working on my iPad.

Sales Reps and Business Owners

Looking at the cost, and attractive looks, Sales Reps and Business Owners will buy iPad because they usually do not type anything great whole day, all they do is, look at websites, present demos (which are powerpoint or keynote), and access their office through online business portals. For all these purpose they will be very happy with iPad. However, once they come to your business app through online portal, they cant see Flash or Silverlight, they are not going to call apple support. They will call IT devs and say,

What the hell IT devs are doing, cant they make our business app work on iPad?

Independent Professionals

Independent professionals like Doctors, Lawyers, Photographers, Actors .. anyone who probably does not sit in front of PC for more then 2 hours a day, will certainly like to get rid of big laptop bag with 4-10 external wires and device connectors. All what they do mostly is, check their emails, surf the websites, fill simple forms on some business web apps and which they can do it on iPad. Today iPad may not have great drawing tools but some professional apps on App store will certainly provide capability of tagging, drawing and marking tools needed by these professionals. Today lot of business applications are on Flash and new ones are coming on silverlight. But iPad will not support !! , once again, they will pickup the phone to vendor and say,

Your website is not working on my iPad.

Who needs any of following?

pc_vs_macClerks,  Graphics/Media artist and IT Developers, which comprises of small part of computer users. Because their applications and workspace requires bigger screens and multiple devices, connectivity and computing performance. Apple’s iPad will be useful only to test the business apps and for other entertainment to this group.

It seems iPad will spread in Home Entertainment, Education and Independent Professional sectors very fast because of low cost solution. And that will shake the developer community.

Troubles for IT Devs

  1. Current investment in Flex or Silverlight is at stake, as usage of mobile devices is increasing heavily, supporting business apps on these devices will not be possible until device OS creators, Adobe or Microsoft work towards supporting RIA technologies.
  2. Silverlight/Flex are heavy and costly to run on battery based devices, they will consume more cpu and battery to create consumption problems.
  3. Rewriting apps in light HTML5 is a big challenge, training, planning and supporting all existing modules will be a big pain. However looks like World Wide Web Consortium (W3C) has been sleeping for 10 years to create features of RIA required today. Need of consumers were high, that created innovations like DHTML, Flash and Silverlight, and the problem was, W3C never observed in market what consumers (Internet users) really need.
  4. Even if you decide to invest heavily on iMac and decide to make apps that can run on iPad, your Apps are at mercy of Apple Employee doing approval, here is the funny process.


Death of Free and Open Internet

IT Devs will slowly loose the independence over distributing apps against open free internet distribution. Today any release, distribution of media (song, movie, play) etc are controlled by major Labels.

If The  Intelligence will be controlled by major Labels in IT with narrow route to success by Apple, Google, Microsoft etc giants, then the growth we saw in last decade in IT industry will slow down very rapidly and independent innovators will become slaves to major labels.

Will Bubble of RIA Burst now?

Once again, just like Dot Com, if RIA (Flex/Silverlight) Bubble bursts and all IT Devs will be blamed again.

Tagged with:  

RIA – Why? Which One? How?

On December 13, 2008, in RIA, by Akash Kava

RIA (Rich Internet Application) means faster means to develop light applications to fit in your business presentation and few quick interactive applications. With RIA you can not make a money tree and you can not become rich.

Target Applications:

  1. Frontend Applications
  2. Small Quick Demo Applications
  3. Graphical Analysis of MIS
  4. Marketing Presentations
  5. Quick Forms/Data Entry for Mass Audience
  6. Polls, Social Interaction Applications
  7. Thin Client Applications

With RIA you can generally make a thin client applications, which surely needs to interact with high poerful web server or any other form of server over internet. RIA replaces frontend for modern internet applications from traditional HTML/JS form processing websites.


Traditional web portal applications (ASP.NET/EJB..) takes too much of time to process every single request, as it does not use full potential of client side computer. Every decision of which button to be displayed, state of an application and user’s choices and preferences, everything is maintained on server and applications utilizes too much of bandwidth as well.

Thats why, RIA is simple step to differentiate user interface and business logic completely with implementations of standards like SOAP web services and REST apis.

All RIAs are compiled at development site, that means the final RIA is in form of an application, which will execute accurately as designed. However in traditional HTML+JS, if any part of HTML is not rendered properly or its coded wrongly, there is no way to detect until it is delivered to browser and some error has been encountered. Pre compilation on RIA, reduces time required to develop web application drastically.


Flex Silverlight JavaFX XUL
Vendor Adobe Microsoft Sun Microsystems Mozilla
Open Source Yes
(I am talking about FLEX not Flash)
No Yes Yes

Community Support is very bad when you need quick solution in an emergency.

Paid Support & Community Paid Support & Community Community Support Community Support
Dependency Flash Player Silverlight Player Java Runtime + JavaFX Runtime XUL Runtime

According to various statistics, the by default availability of dependent software on PCs.

95% 10% 0%

Although few PCs and all MACs have Java Runtime, they still need something additional.

30% as FireFox supports XUL Apps
Size of Runtime 1MB 4.5MB 30MB 4MB
Native Device Access Camera, Mic and Speakers Speakers Speakers None in Web App,

May be few in Desktop App

Audio Video Support Widely used FLV and MP3 format, stable and its there since 2001 WMV/WMA/WMA Pro No No
Converters for the Supported Video FFMPEG and many other commercial vendors available Paid Encoders No No
Documentation SDK Documentation and Samples MSDN but still very premature, (Reason, the learning curve is little higher) JavaDocs but JavaFX is still new Apache Documentation, very scattered, difficult to learn.
Syntax XML + Action Script XML + C# / JS / VB.NET Totally New Syntax XML + JS
Language Feature Strictly Typed with “Object” being dynamic type Strictly Typed,

Dynamic type to come in C# 4.0

Strictly Typed Dynamic Typed
Binding Expressions

Flex introduced wonderful concept of auto updating expressions when properties or variables changes.

Very Accurate Accurate but lengthy code Available Better then JavaFX and Silverlight
Two Way Databinding
Not Available, Coming up in Flex 4 Available - Available
Binding Declaration Simple Attribute Extra Code in each bindable property Extra code in each bindable property Simple Attribute
Reflection Available Available Available Available
Code Size Very Concise Even simpler things like validator etc takes 6 lines, too big code size to maintain Size is small, but very disorganized, difficult to read Concise enough
Platform Availability Windows, Mac, Linux Windows Only Windows, Mac, Linux Windows, Mac, Linux
Stability Very Stable Pre Beta Pre Beta Stable Enough
Control Library Rich set of Controls available, plus lots of free stuff available as well Very basic controls, you have to spend money on other ISVs to get good controls Good set of Controls Almost everything is free, lacks good documentation though
Coders Availability

For project managers, how difficult it will be to find coders who will code.

Easily Available as existing Flash, HTML, JS, ActionScript can code. C# and Microsoft Technology programmers can code. Java Programmers can code, but due to new syntax, its still difficult to get hands on it. Very difficult as it requires too extra knowledge of mozilla architecture and various standards, which is not taught anywhere.
Commercial Training

Starting project is very easy, but ongoing maintanence and meeting deadlines requires excellent knowledge of technology, which you should not rely on community blogs, because time required to search any solution is costly.

Excellent Excellent Training available Where?
Threading Support No Limited No Limited
Themes/Skinning Yes Yes, but size of code is very big No Yes
WebService Integration Yes Yes Yes but very frustrating Yes
Upload/Download The Best Feature in Flex Yes Yes Yes
Installable on Desktop Yes No Yes Yes
Database Support (in desktop app only) Sqlite Not Applicable JavaDB

Too heavy and too slow

Auto Update on Desktop App Yes No No Yes
Present Since 2001 2007 2007 2001

Plugins are available under eclipse and netbeans etc type of editor, but problem is they are so premature, they dont support refractoring, analysis, debugging and lots of other facilities.

Flex Builder Visual Studio Plugin Plugin
IDE Cost
IDE Refractoring Yes Yes No No
IDE Source Versioning CVS

Good for Multiusers

Source Safe (Single Developer only)/ TSS (too costly) Plugin Plugin
Drag and Drop Editor Yes Limited, because to script you need Visual Studio and to design you need Blend (Other paid software) No No
Code Intellisense (Auto Complete) Yes Yes
Project Management Yes Yes
Library Management

Creating and importing shared code in the form of libraries.

Yes Yes
Component Development Very Simple Quite Complex as it is divided in User/Custom controls categories. Available Simple
The Result
Leader of RIA Flex Follower The Last Linux Love

Important Note:

Silverlight claims to be platform independent, but reality is, Microsoft no longer provides any more upgrades of Silverlight version for any other operating system other then Windows. And Linux was already not officially supported by Microsoft.

Advantages of RIA

  1. Reduce Development time
    As compared with traditional web application, since RIAs are pre compiled, errors due to syntax, wrong spellings can be detected earlier at time of desiging.
  2. Load First, Run Throughout
    RIAs load entire application (Except XUL) in the beginning, instead of HTML+JS, which loads as things proceed. This means, either application will load completely and work accurately even with slower bandwidth connection, or if some part didnt load, it will straightway display an error. So it works like transaction, either all or nothing. HTML+JS can behave unexpectedly in case of missing components.
  3. Seperate Design and Development Processes
    Flex and Sliverlight offers complete seperation of Development and Designing keeping integration simple, other platforms (earlier web ones) require too much time integrating designs and process.
  4. Utilize Client Computing
    Almost every computer has high powerful graphics capabilities, HTML/JS doesnt offer any great benefit over it. RIAs can completely explore native graphics capabilities and you get wide range of user interface functionality.
Tagged with: