Web Apps

Some time ago, on a previous incarnation of my blog, I mentioned the subject of web apps. At the time there was a lot of debate (and still is) about which technology was best for web apps. AJAX was really beginning to take off, Java was sticking firmly to its Enterprise world, Adobe were releasing Flex and Microsoft responded with Silverlight. In addition, there was (are) a zillion different toolkits and frameworks in various languages (Ruby, PHP, Python, Perl…)

Now everyone is entitled to their own opinion, but for me the main decision comes down to “what sort of site are you building?” If you are building an information site where people click around and read stuff, maybe fill in a contact form or post to a forum – that style of app is served very well by a combination of HTML, DHTML and JavaScript (even AJAX).

If you’re building an online equivalent to a desktop application – HTML and AJAX suck – end of story. I’ve written thousands of lines of code using this more traditional style, and it is a serious pain in the backside. It’s the biggest reason I have long held out hope that Java would become the dominant web app technology. A Java app can be programmed in the same way as a windowed desktop app, can maintain state, and can be made as robust and responsive as any desktop application.

But there is a huge problem with Java, for me anyway; it feels too thick and heavy, and all the goodies that help people create Enterprise solutions with it seem to get in the way of “Rich Internet Application” development.

So what’s the answer? HTML is too fragile, Java is too heavy – Silverlight? No thanks – I’ve been a Windows programmer for a long time but there’s something about dotNet, and Silverlight in particular, that leave me feeling underwhelmed – but that’s another topic entirely.

The technology that has won me over is Adobe Flex. I know some people have issues with Adobe, but I have used it for a number of apps now and it strikes the right balance; it’s not too heavy, but it supports the creation of very attractive and usable interfaces, easily. Coming from a background of classic client-server development, data-aware controls, and the like, one of the things that threw me initially was the complete lack of any database capability. This actually turns out to be a major strength of Flex.

Even when the pressure is on, you are forced to create a system that separates database code, and presentation layer. You can still hack the business rules in multiple places, but the fact that you are forced to make SOME separation in your code, also discourages you from making “dirty hacks” that are so easy in an environment such as VB or Delphi.

You are also free to use whatever server-side technology suits your experience and/or needs. Implement a fully-fledged Java application server, a Ruby on Rails app, a custom set of PHP scripts, or a SOAP interface in ASP.NET. The choice is yours, the list is endless, and the difference to your Flex application is relatively minimal.

Is it perfect? Of course not, but for my money, when it comes to creating interactive desktop-style web applications you’ll find a good solution with an Adobe Flex RIA,  and simple HTTP/HTTPS communication with business/data layers coded in PHP on the server side.



Leave a Reply

You must be logged in to post a comment.