Posts Tagged web 2.0

A Cascading Style Sheets (CSS) Beginner’s Tutorial

Learning CSS can be a bit daunting if you’ve never encountered it before. Likewise, if you’ve only had limited exposure to CSS, the various ways browsers implement various aspects of the CSS standard (or make up their own) can leave you with the impression that it is all a giant hairy mess. So to help out, I’ve compiled a list of resources to make the learning curve not quite as steep for beginners and to hopefully help tame the CSS wilderness for novices.

First, here is a pretty good and in-depth video on HTML and CSS basics:

Next we have several handy beginner’s tutorial sites:

Finally, here are a few CSS frameworks designed to help make CSS a lot easier by providing a standard system that takes care of much of the common ugly quirks found in CSS:

As a bonus, here are a few inspirational sites to help give you an idea of what CSS can do if applied properly:

Share/Save

Tags: , , ,

Multi-threading in Web 2.0

I’ve been tasked with speeding up a web 2.0 application based on ExtJS 2.2.0 that contains several routines that take up quite a bit of time and, because IE6′s javascript processing engine is less than stellar1, I needed to find a way to “speed things up”.

Enter Ext.TaskMgr, a helpful ExtJS object that is essentially a glorified setTimeout implementation that allows us to run tasks that don’t block execution. This means we can set our more expensive blocks of code to run later but return control back to the user in the meantime. It’s not true multi-threading, but it does allow us to make the user interface a lot more responsive and in an age when users think 5 seconds is an eternity, perception is everything.

  1. In other words, it sucks pretty bad. []

Tags: , , , ,

Browsers, timezones, and Date

Recently I ran across an interesting problem involving dates and timezones while working on a rich web 2.0 application whose primary purpose was to allow the user to enter time values that were then saved, as true date objects, onto the server1.

Up until now I have not used time values on both a server and client level, I’d referred instead to use a UNIX timestamp that the server2 did not touch or, if they did, they did so with the client being the authoritative source.

This case was different in that the server was the authoritative source and all clients were required to deal with time values in the server’s timezone context3.

Herein lies the rub.

For this project we were using ExtJS 2.2.0 and made extensive use of ExtJS’s extensions to the regular Javascript Date object. Little did we know, the Date object is implemented per browser and while some browsers4 will honor timezone designations, other browsers5 doggedly convert any and all Date objects into the timezone  of the current system they are running on6.

While there are some solutions out there like Freegix that perport to include solutions for switching timezones on the client-side, we have yet to find any solutions that are truly drop-in replacements.

Why couldn’t IE just honor the ‘T’ or ‘O’ designations in the first place? One can only wonder what possessed the IE team when it came to this issue…

So if you are writing a web 2.0 application that passes dates between the client and server, make sure you remember that the browser has the final say in how your time gets parsed.

  1. Which, in this case is JBoss and Oracle []
  2. Database or web application tier []
  3. For us, this happened to be Eastern Standard Time []
  4. Such as Chrome and Fire Fox []
  5. Such as, surprise surprise, Internet Explorer 6 and 7 []
  6. We tested this by simply adjusting the date/time on our Windows desktops []

Tags: , , , ,