Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Tuesday, April 21, 2009

JavaScript and Multi-Threading

Several internet sources, such as this, suggest that JavaScript in browser, runs in a single thread that is also responsible for updating browser UI; and JavaScript code is triggered by events. If this is true, it is not a surprise to see why AJAX has to be asynchronous, otherwise network IO will block the browser UI, i.e., make the UI irresponsible.

There were/are several activities to make JavaScript multi-threaded. For instance, the popular JavaScript toolkit Dojo has some support for multi-threading. And there is even a paper talking about multi-threading in JavaScript.

JavaScript now really becomes a serious programming language. Not only there are a lot of libraries/frameworks available so that programmers do not need to write everything from scratch, but also there are a very good programming support, such as profiling (YUI), unit testing (YUI), logging (YUI), debugging (Venkman for Firefox and for Microsoft Script Editor for IE).

Monday, April 20, 2009

Browser Application

I am working on a browser application, which I already made some good progress and will put online after it is refactored in object oriented JavaScript.

What I called browser application should have the following three characteristics.
  1. A browser application's runtime environment consists of a web browser and internet only. So if you can surf the net, you can run it. Of course nothing prevents it from being deployed on a web server for people to access. Note. in that case, the web server is not required to have any extra support except static HTTP hosting.
  2. A browser application uses AJAX to provide functionalities. With so many powerful AJAX APIs around on the internet, a browser application can have some amazing functionalities.
  3. A browser application can easily be a rich internet application given that now JavaScript, as well as other client side technologies, have already become so rich in terms of presentation capability.
In summary, a browser application is a browser (only) based rich internet application using AJAX.

Thursday, December 11, 2008

Yahoo User Interface

Programming in JavaScript was very painful. You have to make sure your code is compatible with all major browsers such as IE and Firefox. Now thanks to well-developed JavaScript libraries, JavaScript programming is much more pleasant.

JavaScript libraries, such as Yahoo User Interface (YUI), jQuery, Dynamic Drive, and Dojo, not only deal with cross browser compatibility issues, but also make common tasks easy.

I have used several components of YUI in developing the OMII-UK website:
BTW, browsershots.org allows you to see how your website looks like in tens of browsers.