50 Best Websites 2007
|
|
The offline web applications like Zimbra narrow the gap between the web and desktop applications in many aspects like connectivity, performance, reliability, etc. The newly released Google Gear is an even bigger hit in that it sets a platform to help bring any web application "offline". This will change the way people perceive "web application". You do NOT need to be always connected to a network in order to use a web application any more.
| (From TechCrunch.com) Google Gears Lets Developers Take Apps Offline: Tomorrow, Google will be hosting a developer day for 5,000 developers worldwide… |
Followed offline app demo above, I tried the offline Google Reader. It is very cool. Also tried simulating an unexpected network connection drop. When browsing the feeds in Google Reader in "online" mode, the network was suddenly disconnected. It tried to read the content but timed out. Then it popped up a window reporting the connection drop and asked if I would like to switch to "offline" mode. Answer "yes" and I was able to continue reading the feeds offline! After I get back online, the local data (items marked as read) is synchronized back to the server. I was never a big fan of Google Reader due to its lack of useful features. But this offline mode really draws my attention and interest to try using it more.
What’s next? If this offline technology is used in developing mobile applications and it supports automatic smart downloading and synchronizing, it could greatly improve the performance of the sophisticated applications running on mobile devices with limited bandwidth.
An interesting comparison is with the Microsoft Smart Clients offline mode emerged in 2004 with the similar idea.
In Javascript, using an element’s innerHTML property to dynamically edit its content provides much flexibility and convenience. But special care needs to be taken when using it, because it could bite you silently. Take one of my experiences as an example, it could break the event handlers of the child elements. Sample code as the following:
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>innerHTML</title> </head> <body> <hr /><div id="myd"></div><hr /> <script language="javascript"> var d1 = document.createElement("div"); var d = document.getElementById("myd"); </body> |
This code works well and when you click on div, "hello" will pop up. However if you uncomment the last line of the JavaScript code. The message won’t pop up any more. innerHTML manipulates the content of the element as a string instead of DOM, so it might just break the underlying "wires" that hooks up the elements and their event handlers. So watch out, when any of the events stops working as expected, look for the evil "innerHTML" first.