TagCloud Goodness

      2 Comments on TagCloud Goodness

p. There is no more perfect icon of Web 2.0 than the TagCloud. These days they are everywhere and while some see them as the new pink, they are still a valid navigational element. Jenny, (last name to be determined) over at “Prism-Perfect”:http://www.prism-perfect.net/ shows a quick way to build them.

p. This is not so much a tutorial as it is a code dump. The article, inappropriately titled “PHP Tag Cloud Tutorial”:http://www.prism-perfect.net/archive/php-tag-cloud-tutorial/, contains a grand total of words of non-code text. Here, I’ll give them to you.

bq. Well, it’s actually so simple it’s not really a tutorial at all so much as a snippet with a bit of explanation. But I’ve had some people ask how it’s done, so here’s how I do it. I tried to go through and add some comments about what’s happening.

p. Now, if you are not interested in reading the code, there’s really no need to visit the page. However, I’m guessing most of you want the code. The rest of the blog post is a code listing for her solution for building TagClouds. It’s al procedural code but it’s a solid solution that should be pretty easy to implement. It’s also nice to see decent commenting in tutorial code.

p. If you are looking for a more verbose, (400 lines compared to Jane’s 60) OO and not necessarily better way to do it, I wrote a TagCloud class a while back. You will find code and an example of it’s use on “this page”:http://www.calevans.com/view.php/page/tagcloud.

p. =C=