May 18 2007

Smalltalk and Seaside at RubyConf 2007

Avi Bryant just delivered a great talk about Smalltalk – and not that I like to jump on bandwagons, and I don’t (even though I am at RailsConf) – but Smalltalk seems very, very cool for development and is certainly worth looking into. There are of course some cons to using Smalltalk and Seaside for web application development like deployment, which is an unknown for me currently, but perhaps it is only a con because it is unknown. Smalltalk does run inside a virtual machine (the way Java runs in a virtual machine) so theoretically we can simply take it anywhere. An additional con is the learning curve, which looks rather steep. I’ve downloaded a Smalltalk IDE (Squeak) and have been playing around with it but steep yes, probably mainly beacuse I do not know how to write Smalltalk code yet. Know you all must be saying “why are you learning about SmallTalk at RailsConf?” and good point. The reason is that Avi Bryant thinks Smalltalk is the future of webdevelopment and Bryant was (or perhaps is) on the core Rails team and built the Seaside web developement framework in SmallTalk. Now we get to the pros of Seaside and Smalltalk, which are mainly developer things but are extremely important developer things, like the debugger and actually the entire IDE, which is very sophisticated. The debugger is even integrated into the web presentation. Perhaps more importantly than the IDE is object persistence, persistence of state on every object that the user interacts with. There is a lot to learn so I suggest reading up: Seaside, Squeak.


May 18 2007

A Look at CSS/HTML Emails

Building HTML emails is probably more complicated than building normal web sites. You not only have to consider cross-browser issues, but also have to worry about all the different desktop and web email clients out there and how they handle html emails.

Looking at most of the major email clients that are in use today, I tested to see how these clients display an email that is built and laid out using only CSS and HTML (no table layouts).

The email template that will be tested is based on a Pages newsletter template. It uses background images, border styles, multi-column layout, and overlapping images, which make for a fairly complex html layout. In addition to including the CSS styles within the head tags, I also added some inline styles to position the columns to test whether these clients support inline styles (if they strip out the style tags). With this example, I’ll be able to examine which elements are usable when building designs for use in emails.

Email Firefox on Mac

Eudora 6.2

Email template on Eudora 6.2 for mac

Eudora ignores all CSS styles even when it retains the stylesheet in the message body.

Gmail

Email template in Gmail on Safari

Gmail strips out the style tags and everything in it. Inline CSS styles still work but background images and colors are stripped out.

Hotmail

Email template in Hotmail on Safari

Hotmail used to support CSS styles that are embedded within the body tag, but it seems now that it strips out the style tags and everything inside, just like Gmail. And just like Gmail, inline CSS styles still work except for background images and colors.

Yahoo! Mail

Email template in Yahoo Mail on Safari

Yahoo Mail seems to support most of the CSS styles being used in the template except for negative margins, which might not be such a bad thing. As long as there are no overlapping images or blocks, Yahoo! Mail should display CSS/HTML message properly.

Apple Mail

Email template in Apple Mail App

Apple mail supports CSS layout and looks almost exactly as the template would look under a web browser.

Thunderbird 2.0

Email template in Thunderbird on Mac

As with Apple Mail, Thunderbird displays html email messages as a browser would display them. There were no problems that occurred when viewing the template on Thunderbird.

Outlook 6

Email template in Outlook 6 on PC

Since Outlook 6 is rendered by the IE6 engine it suffers from the same faults and glitches. It also seems that Outlook 6 has some trouble rendering margins properly. Notice the left margin of the content butting up against the side of the sidebar.


Table of CSS & HTML element compatability across different email clients.
Email Client Images PNG Transparency* BG Image BG Color Font Style Font Color Div Float Border Styles
Eudora 6.2 yes no no no no no no no
Gmail on confirm yes no inline no inline inline inline
Hotmail yes yes no inline inline inline inline inline
Yahoo! Mail yes yes yes yes yes yes yes yes
Apple Mail yes yes yes yes yes yes yes yes
Thunderbird 2.0 yes yes yes yes yes yes yes yes
Outlook 6 yes no yes yes yes yes yes yes

* PNG transparency support may also depend on whether the web browser you are using supports this feature.