2005-09-28

State of the art in programming web based applications

A while ago I blogged about web based applications. I wrote that I think they are the way of the future and offer many great advantages. But how does one go about writing those applications? I mentioned before that the current state of the art is a collection of technologies which goes under the name AJAX. To tell you the truth, I consider AJAX to be stone age. Web development needs some serious improvements. Why do I think that? When using AJAX you must use so many different tools. There is JavaScript, XML (which really isn't anything in itself, just a piece of common syntax) and some programming language of choice for the server side program. And this is if the program is small and well structured. A good example can be found in an article posted not long ago on /..

My point is that there are too many technologies that need to work in synchrony. If you want to change your application you need to fiddle in some JavaScript, perhaps some XML files and in your server code. And then you have to make sure they all still fit together. It just seems fragile to me. But I must be honest here. I don't have very much experience here, this is just an observation from my general impressions of the situation.

So, what do I propose as a solution? Well, I don't have the solution in my hand right now but I have a rough picture of what I think it should look like. What we need is a language where we can express pretty much our whole program with all its parts. We shouldn't need to worry about the exact layout of the messages sent between the server and the client. I care very little whether its formatted with XML or JSON or what have you. Of course it is useful to be able to control this at some point but if I don't want to worry about it I shouldn't have to.

Is there any work done in this direction then? Yes it is. I was not the first one wanting a better solution than the present. The thing which seems most promising is Ruby on Rails. I know next to nothing about Ruby on Rails but it seems to be a very nice framework for developing web apps. The only problem I see with it is that it is based on Ruby which is a scripting language which too few static checks in my opinion. But I know other people have other opinions about that so I'll stop whining about it.

There is also an academic effort to develop a language which can take the place as the language for web programming. The language, not yet fully defined, is called Links (it doesn't have any official homepage that I know of) and the initiator is non other than Philip Wadler. Since Wadler is the brain behind it I'm sure it is going to be a sweet language. What I am afraid of is that it will have rather little impact on the web developer community. You can check his blog where he posted an email I wrote to him about this.

Another thing I'd like to complain about, while I'm on the subject, is how to develop the interface of web based applications. Assuming that we're running the application in a browser, it requires vastly different technologies to develop the interface for a web based app compared to a standard one. My utopian dream of how this should work is that there would be no difference in how to specify the interface of a web based app and non-connected one. The only thing I should have to specify is a bit which tells the program where to run. In a browser or in a standalone interface. Well, perhaps a little more that one bit would be needed but not much more. But in this case I'm afraid I haven't seen any signs of reconciling the two camps. Or rather the gazillion camps since there are just so many ways of writing a standalone interface depending on what library you're using. I think some reconciliation here would be a clear win. But I also see that it is a very difficult task and that it's not likely to happen any time soon.

On a more abstract note all of what I've written here is about being able to expressing oneself at a high level of abstraction. Some details you simply don't want to care about. You want to be able to express yourself clearly, succinctly and without having to repeat yourself. Here are my key rules for achieving this in computer science. Pick a programming language with powerful abstraction capabilities and arm yourself with good libraries and write new ones when you have to. When that fails come up with a new (often domain specific) language to be able to express yourself naturally in your particular domain. Finally, code generation can do wonders, sweeping loads of boring details under the carpet where you will never have to see them again. Maybe some day that will be the case for developing web based applications.

3 comments:

lfa tai chi blog said...
This comment has been removed by a blog administrator.
Limousines in Los Angeles said...
This comment has been removed by a blog administrator.
Rob said...

I enjoy reading through your blog. By the way, if you are interested in talking about a link exchange with me at http://best-kid-games-online.com, please let me know.