I've been reading lately several blogs from people mentioning the promise of Ajax. It seems to be rating very high in the "coolness" category. Of course, I don't believe the people who have been writing have actually delivered a significant application. So, I'm a bit skeptical about all the hype.
Background
Several years ago, before .NET and broadband connections, I created a web site that delivered streaming audio to a Windows media player embedded in the browser page. It made extensive use of Javascript to control the player. Since only some people had high speed internet connections, there where 2 different audio sources for each song, a low-bit-rate and high-bit-rate version.
The project was a learning experience. Here's some of the JavaScript issues that I discovered:
- JavaScript has slightly different implementations between browsers.
- Each browser has a slightly different DOM that means you must do browser detection and modify some code.
- On some browsers, I discovered some precision errors when doing simple math.
- There no one tool for easily testing JavaScript code against different browsers.
- Lack of types creates big problems as the code base gets larger and you need to refractor code.
SuggestionInstead of getting on the Ajax bandwagon, I think I'd get on the .NET smart-client wagon. Here's specifically what I mean:
- Write a web service with .NET that supplies business logic/data.
- Write a .NET Windows form application which provides UI but uses the web service for the business logic/data.
- Host the Windows form application on the web site and provide a link to it.
It's really not that different from the whole Ajax concept. The only difference is that you have a real application providing UI instead of a browser. You get a typed language with a consistent execution environment, and a strong toolset for application creation.
RebuttalYeah -- I hear those people who are scoffing because it won't work for Apple and Linux users. They seem to be the not so silent minority. In the last 4 years, I've run many, many web reports and have paid close attention to browsers. In the "real world" Apple and Linux users hitting any web site I've created has been < 1% of the entire traffic.
I realize that users will have to have the .NET framework installed. I don't see that as a major issue. On the web site, a link to the .NET framework could be provided with instructions to install it first. Since that's just a one time installation, I think that is not a major issue with most users. In fact, the browser web traffic that I've seen shows that a slight majority of the users already have the .NET framework installed. As more and more applications are created using the .NET framework, I think some day soon, its going to be a common assumption that most users will already have the .NET framework installe.