Christian Heilmann

You are currently browsing the archives for the My Articles category.

Archive for the ‘My Articles’ Category

Good-Bye Easyletter

Thursday, April 27th, 2006

I just deleted my old PHP script EasyLetter from the server. EasyLetter was meant as an easy way to offer a newsletter for your web site and send out emails. It got some good recognition after once being featured on ScreenSavers, but I chose to discontinue it for several reasons:

  • It is not spam safe and can easily be abused
  • If you want to offer newsletters, get professionals to deal with the sending and data protection – there is just too much to keep up with
  • I don’t have the time to answer problems with people’s server configurations any longer
  • RSS feeds are dead easy to offer and are voluntary, not enforced data

So please don’t bother asking me for support for EasyLetter, I will not be able to answer, sorry. I might make it open source if there is interest, but I am not at all proud of it and email spam is too annoying a subject not to leave it to professionals.

FeedNav – an unobtrusive AJAX RSS displayer

Wednesday, April 5th, 2006

I finally reached the AJAX chapter in my book and had to dabble with it for the first time (yes I know I should have done it earlier, but I work behind a proxy in the office that doesn’t let any outgoing requests through).

The first outcome is FeedNav, a RSS feed displayer: Have a look and I’d be happy about feedback here on the blog.

New free article – From DHTML to DOM scripting

Wednesday, March 29th, 2006

I just published a new longer article (40 pages) trying to explain the differences between DHTML and DOM scripting. The article explains what DHTML, the DOM and DOM scripting is and shows how to create a web page with dynamic elements like tabs, a slide show and a big product shot in both ways.

The DHTML explanation is annotated with explanations why some of the techniques are a bad idea and the DOM scripting version explains why some of the assets are good ideas. As a summary:

DHTML issues:

  1. Script dependence – Users without JavaScript get stuck or get elements that only work with JavaScript but don’t do anything for them.
  2. Mixing presentation and functionality – If you want to change the look of the effect you need to hack around the JavaScript.
  3. Assuming functionality without testing for it – what it says
  4. Keeping maintenance JavaScript based – Maintainers are expected to change the script when they want to change the effect, and search through the whole script.
  5. Mixing HTML and JavaScript – what it says
  6. Blaming the user – Users get messages like “you cannot use this as your browser doesn’t support it, update your browser” instead of just not getting the functionality if it is not 100% necessary.
  7. Taking over the document – one onload to rule them all

DOM scripting assets:

  1. Progressive Enhancement – check if things are available, then apply those dependent on them
  2. Ease of maintenance – keep the maintenance as easy as possible via dynamic CSS classes and properties at the beginning of the script
  3. Separation of Presentation and Behaviour – add dynamic classes instead of changing the style collection
  4. Separation of Structure and Behaviour – use dynamic event handlers and generated elements instead of onclick and NOSCRIPT
  5. Using modern event handling – more than one onload please
  6. Avoiding clashes with other scripts – avoid global variables and encapsulate functions as methods in an object

Of course, you can disagree :-)

My book on Amazon – no pressure then

Monday, March 20th, 2006

Beginning JavaScript with DOM Scripting and Ajax: From Novice to Professional I was just mildly shocked that my book is already on Amazon.com while I am still writing chapter 6 of 9!

So I guess it is time to cut down on the posting here and other things like bathing, eating and sleeping to ensure I get it ready in time to beat the next Harry Potter in the sales ranks (or something like that).

Minislides – inline slide shows with DOM and CSS

Friday, March 17th, 2006

As part of my book, I am right now writing the “common uses of JavaScript” Chapter, and this morning a request by Michel Bozgounov on the CSS-d list tickled my fancy.

He wanted an easy way to show slightly larger images when clicking on very small thumbs inside a page. While his solution would force visitors to load all the images (including the large ones), I quickly put together a solution that only loads the larger images in the same list when JS is available.

This is only a beta and a freebie. The full version with explanations is part of the book and I cannot give it out (yet) as it will be part of the whole copyright and all that Jazz.

Enjoy, and hopefully you find it useful.