My ISP is not as reliable as I want it to be. From time to time it happens that I cannot upload files using FTP, have enormous number of dropped TCP packets or have some other interesting surprise. Of course, there are alternative ISPs but there are reasons to not replace my current with another one.
During looking on "Request time out." produced by famous ping I realized that I need something similar but for Web requests. And I want to check my download speed, and upload, and... Stop. It may be a good idea, it may be bad idea but I want create a nice and simple software that shows me how reliable my internet connection is. I can test other ISPs, show problem to my ISP, etc. And this only requires a few Ajax requests.
The result comes quickly and you now can test it too. http ping does exactly what I need. It does almost the same what ping does: sends the request, receives the response and shows amount of time the request takes. It does it four times and shows report. That's all.
In his recent post Travis Swicegood is talking about the "Fluent API". This kind of API is very popular in scripting languages and I use it during my work with Zend Framework or jQuery projects. Another good example of such technique is Document Object Model API.
This article is for people who spend hours working in browsers. After reading it you will get to know how to improve your productivity by using bookmarklets for creating shortcuts for some of your routine operations.
The "How to display tree with expanded nodes?" question raised on our forum and it seems that there is no easy answer on this question. Here I want to post my investigation and describe my solution on this.
Here is minimalistic implementation of Fifteen puzzle that you can try to solve just in your browser window. You can use it to spend some time or to investigate how to use the excellent jQuery library to create JavaScript applications. The game internally consists of two modules: model that stores game data and UI that build with jQuery and contains only 26 lines of code.
Available as Google Gadget, which you can add on your iGoogle.
Here you can type the any JavaScript expression and if it returns object, the tree below shows all object model below this object. For example, you can type "document", "document.body", "location", "navigator" and so on. This Object Browser works successfully in Firefox, IE, Opera, Safari and created using YUI TreeView with dynamic node loading.
During my work on XML Serializer I ran into the problem with differences with XML support in browsers. Hopefully, this problem now is much clearer than in early days and you do not need a special library, like Sarissa, to work with XML nodes in modern browsers. Things are clear and nice now, because the standard DOM is implemented in latest Mozilla/Firefox, Opera and Safari.
How to support different serialization formats?
Supporting various formats requires serializer architecture to be pluggable. It should support replacing serializing engine and this can be done by separating common part from the algorithms specific to each engine. The specific engine contains two modules that support saving objects to stream and loading them. And the each module, either saver or loader, contains one part that represents a stream and another that represents one saved object in the stream.
Type-safe serialization
I've added a draft of new article, called Serialize JavaScript object tree to XML or JSON. I want it to grow to a some useful project that (who knows) may be incorporated or used together with some of JS frameworks.
I wonder whether some JavaScript objects serialization exists in one of the top JavaScript frameworks.
But looks like there is no any framework that supports flexible and powerful serialization. So I try to introduce some concepts I'm thinking of and how to implement them.