Sunday, February 20, 2011

Creating desktop-like web applications

For the longest time there's been a gap between web developers and the so called desktop developers. Both branches used different tools and different techniques to get things done.

What has changed in the past couple of years is the web itself and what's being expected from web application. With the change that occurred in the field of RIA (Rich Internet Applications) many products that would previously just be a set of web pages turned into SPAs (Single-Page Applications), utilizing the power of Ajax, dynamic DOM manipulation and recognizing the full potential of all the 3 core technologies (HTML, CSS and JavaScript).

The Misery



With that in the picture it is worth taking a moment and looking at the options we have when creating a new application (be it a web app or a desktop one):

1. Operating system.



Nowadays if someone targets their product at one OS it means pretty much that they allow for competition right from the beginning. And not only allow for it but in a sense ask for it. Sure there's Java that compiles and runs on everything that has a CPU but talking seriously about creating an usable GUI in Swing or SWT is plain and simple asking for trouble.
Then there's .NET and Mono as its multi-platform solution. It all looks nice and dandy but the truth of the matter is that WinForms is still not 100% usable and with WPF in the game it's going to be very hard for Mono guys to keep up. So even though creating breath-taking and maintainable UI under .NET is feasible it narrows down the potential clients to Microsoft Windows.

2. Windowing System.



Platform (and operating system) aside there are some great windowing toolkits. WX, GTK (and even recently GTK#) and even SWT - those are all viable options and should be considered as candidates for new projects. There's only a couple of small issue with most of them: they look and feel different on different platforms and have very little support. Don't get me wrong here - with the right amount of desperation one can work out miracles with those - it's just not something that you'd take, toy around it for a day or two and start using it. WPF, WinForms and VCL included!

3. Maintenance.



Even though we developers don't like to think about what our application will do in 3 years and how those new features will be delivered to the customer it is vital for the continued success of our efforts that the deployment of new versions is as painless as it gets. Different platforms (and I'm talking managed platforms only here) have different solutions to this problem. On .NET you get the "Click once" capability which pretty much covers it. On Java you get the web launch capability which is close to the Click Once, but less feature-rich.

4. Access to developers.



Finally if you're so damn successful like Facebook or YouTube you might want to hire some new developers to do your dirty work. Choosing (or as I like to call it: closing yourself on) one technology means that the amount of people you can hire is not enough to find the right people for the job in a reasonable amount of time.

So it seems that all is lost and the fragmentation of what's available and what's struggling with the rest of the world brings an end to reason in software development.

The Solutuion.



As it turns out not all is lost. Let's examine what's available on the market to make our future more predictable.

Desktop Web Applications.



As weird as it might sound it is not science fiction at all. Right now with the capabilities of HTML5 this actually is a viable option.
Redeployment is as easy as it gets (just hit the damn F5 button and you're done), technology is already there (just take a look at Ext JS to know what I'm talking about) and the actual browser platform is getting faster and faster every day (look at Internet Explorer 9 and the direct hardware access they are doing - it's amazing!!! - not to mention Google Chrome and FireFox that kick ass since god knows when already).

If the flexibility of CSS+HTML+JS is not good enough (for whatever reason) and you just need to go all crazy there's Flash (and Flex), Silverlight and JavaFX. My personal choice would be Silverlight but that's mine .NET fetish talking :D

So what's the future going to bring? Who knows? But one thing is certain: After the web revolution that happened since Ajax the world is never going to be the same. The browser attack is not going to go anytime soon and in fact (with Google's Chromium in the picture) it might very well be that the OS to win users is not going to have the two whacky glossy panels or an animal but a circle in the logo.

No comments: