RSS ? Recent Blog Posts

Blogs » Archive for January, 2008

The Best Web Design Comics

by Matthew Magain

Many web designers are also closet comic-book nerds.

Andy Clarke came out of the closet at Web Directions South earlier this year when he spoke about finding inspiration for web design in comic book art.

I’ve noticed that a lot of other geeks have not only been embracing their love for comics, but writing their own. In fact, when a web designer or developer with a creative streak turns his or her hand to drawing comics, it can produce very interesting results. More than just a lunchtime distraction, comic strips about our profession can lead to insights about how and why we do what we do. Plus, keeping oneself abreast of what is happening in our industry includes not only knowing what people are talking about, but what they’re laughing about.

Seeing as a Google search for the terms “web design comic” or “tech comic” either throws up nothing or just a bunch of rubbish, I thought I’d post my favourite comics about web design. I don’t pretend it’s an exhaustive list — I’m hoping you’ll help me out by listing your own favourite geeky comics in the comments.

First up, and my hands-down favourite, is Kopozky (http://kopozky.net). This is really the only comic …

 

Sun Buys MySQL For $1 Billion

by Matthew Magain

Reprinted from the Tech Times #182.

Open source enthusiasts were reeling this week when Sun Microsystems announced that it will be purchasing MySQL AB, the company behind the development of the popular MySQL database software, for US $1 billion.

The spin from both camps was positive, but what does the deal mean for web developers? And what impact is it likely to have on other open source projects?

To attempt to answer these questions, we need to look at a number of factors, including Sun’s history with open source technologies, its competitors, and the success of other open source technologies that have been commercialized.

While it’s not without its detractors, there’s no denying that Sun has a pretty solid history when it comes to involvement in the open source world. The company claims to be the biggest contributor to the open source community, a claim that, based upon its release of the Solaris source code in 2005, and the Java programming language in 2006, is difficult to refute.

But there is other evidence of Sun understanding the value of keeping software open source and free: projects like OpenOffice.org and NetBeans have healthy communities and promising road maps. In fact, if you examine …

 

Tokenization using regular expression sub patterns

by Harry Fuecks

A while back was writing some stuff on this blog about regular expressoins. While that remains unfinished, a mini regex example - nothing earth shattering but a useful technique if you hadn’t already seen it.

Prompted by a real world example, one often-overlooked feature of most regular expressions engines is how subpatterns can useful to whip up tokenizers relatively easily. The problem? I needed to match the word any of the words “Canton”, “Region” or “Group” in a string and perform a follow up action depending on which matched.

Dealing with four main languages in Switzerland ( German, French, Italian and English), it get’s a bit more interesting; “Canton” translates to “Kanton” in German and “Cantone” in Italian, while “Region” is “Regione” in Italian. and Group is “Gruppe”, “Groupe” and “Gruppo” in German, French and Italian respectively. Composing those into three straightforward regular expressions I have;

  • Canton: /cantone?|kanton/i
  • Region: /regione?/i
  • Group: /groupe?|grupp(?:o|e)/i

Now on examining some input string, I could try testing each of those regexes individually against the string but that’s a) inefficient and b) likely to lead to lengthier code. Instead I make a single regular expression using sub patterns: /(cantone?|kanton)|(regione?)|(groupe?|grupp(?:o|e))/i …then figure out which sub pattern matched after a match is made.

Note that …

 

In the Lab: Doing strange things to CSS Backgrounds

by Alex Walker

So, last year you might remember me running through some experiments with using percentages to position your background-image in CSS. The short version: Percentages are slightly counter-intuitive but quite powerful — if it wasn’t for IE6-7 sucking by always minutely miscalculating them.

In the original post we stuck mostly to the more predictable and commonly-used percentages — from 0-100%. Today I thought we might look at some of the interesting things that happen if start to crank those numbers.

Now to be clear, this is mostly ‘theoretical CSS’ in a Stu Nicholls kind of way and probably isn’t stuff you’ll be finding a use for every day. Hopefully it will, at least, be handy for helping you to get a good grip on the subtleties of how percentages interact with images. With luck it might even come in handy at some point in the future.

Let’s look at a starting example, taking a background-image positioned 150% 0%. The zero is a no-brainer, and will obviously place the graphic on the top edge of the box.

For the horizontal position the browser will first locate a spot 50% to the right side of your DIV. It will then find a spot 50% to …

 

Help Create the Acid3 Test for JavaScript Compliance

by Matthew Magain

acid3.pngWith the announcement late last year that IE8 passes the Acid2 test for CSS rendering (or will pass, when it’s released), the Web Standards Project have their sights set on the next phase of their mission to encourage browser-makers to provide a consistent experience for web users.

While the Acid2 test focussed on the static rendering of HTML and CSS, the Acid3 test (which is still under development) will put browsers through their paces in terms of how well they implement the Document Object Model and ECMAScript specifications. If you’ve ever spent any time trying to work out why even the simplest script doesn’t behave consistently across multiple browsers, then this is bound to be good news.

What’s even more exciting is that you can contribute the test!

Ian Hickson is the primary driving force behind Acid3, and to date has compiled 84 scripting tests. In order for there to be an even round number of 100 tests, Ian has asked for the public to contribute an additional 16 tests. He’s even created a simple test development console, which you can use to verify that your test returns the value that it should. You’ve still got a few days …

 

The week in ColdFusion: 9–15 Jan 08: Survey Mania

by Kay Smoljak

Big news this week: Obviously well into planning mode for ColdFusion 9, Adobe is seeking end user feedback through a series of surveys. From Adobe “Director of Engineering” Damon Cooper’s blog, there’s firstly the ColdFusion IDE survey:

The Adobe ColdFusion team would like to understand more about how you develop CFML code, what tools you currently use, what features you look for, use and would like in a IDE.

Next, there’s two surveys that ask what you think the ColdFusion team should focus on for ColdFusion 9 (codenamed “Centaur”): the Adobe ColdFusion Features Survey and the Adobe ColdFusion Platform and Vendor Support Survey.

On the ColdFusion frameworks front, things were busy in the Model-Glue world with new releases of Model-Glue 2.0 for ColdFusion and for Model-Glue for Flex.

Still on frameworks, Instalment 6.2 of Adrian Moreno’s Mach II Primer was released: Processing Data with Beans and DAOs using Event Filters. You can follow the Mach-II primer from the beginning with Moving From Procedural to Object Oriented Programming with Mach-II for ColdFusion. Adrian’s primers are a in-depth but still easy to follow - a really good read if you’re new to object-oriented ColdFusion, …

 

The Accessible Dungeon of Doom

by James Edwards

Today sees the official launch of The Art & Science of JavaScript, our awesome new JavaScript book, to which I contributed a chapter all about the technique I developed for building a first-person perspective maze with CSS and JavaScript. A demo of the game is available online (make your way through the maze to win a discount on the sale price!). And the chapter itself has been republished for free as a feature article here on sitepoint.com.

You might recognise it as an offshoot of a script I originally published back in August 2006. But the new version for the book is a big improvement, most notably (as far as I’m concerned) because of the addition of generated text descriptions for the maze, which makes the game playable for users who can’t see the images. Here’s an example:

The corridor stretches 20 meters in front of you, then turns left. On the left wall there's a passage after 4 meters. On the right wall there's a passage after 4 meters.

I have actually played the game in JAWS 7, and it’s totally possible — it’s harder, for sure, because the visual reference cues aren’t there, so you have to remember …

 

Howto: Write a plug-in

by Myles Eftos

In my previous post, I listed 6 things that you should try in Rails. I also promised some example code to get you started. Since I have already covered installing and upgrading rails, the next cab off the rank is writing a plug-in.

Plug-ins are fantastic - they allow you to abstract away common code into nice little bundles that you can re-use on other projects. Rails even has a built-in system for downloading other peoples plug-ins straight from their SVN repository. With the change over to Rails 2.0, some used-to-be-core functionality has been moved into plug-ins, to clean up the core tree and to allow other developers to release new versions of the plug-ins outside of the regular Rails release cycles.

In this (very brief) tutorial, we will create a plug-in called acts_as_blabbermouth that will print out random quotes . Obviously this plug-in is of little use in the real world, but it should act as a nice demonstration of how plug-ins work.

It’s really easy to generate the boilerplate code thanks to the generate script. To start your plug-in, run the following command in the root of your Rails app:

script/generate plugin acts_as_blabbermouth

You should see an output similar to this:

create vendor/plugins/acts_as_blabbermouth/lib
create …

 

Cross-site Ajax in Firefox 3

by Matthew Magain

John Resig has posted a good summary (including demo code) for how one might implement cross-site XMLHttpRequest calls, a feature currently implemented by the beta 2 release of Firefox 3.

In a nutshell, there are two techniques that you can use to achieve your desired cross-site-request result: specifying a special access-control header for your content, or including an access-control processing instruction in your XML.

What’s particularly exciting is the code that is required to take advantage of this feature. For example, to request an HTML file from a remote domain, you might do the following (you’ll need to download Firefox 3 first, of course):

var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if ( xhr.readyState == 4 ) {
if ( xhr.status == 200 ) {
document.body.innerHTML = “And the winner is… ” + xhr.responseText;
} else {
document.body.innerHTML = “ERROR”;
}
}
};
xhr.open(”GET”, “http://sitepoint.com/example.php”, true);
xhr.send(null);

Look familiar? Aside from the inclusion of the domain in the URL parameter of the open function, this code is identical to the standard Ajax calls that you are probably already making.

Of course, whether cross-site Ajax requests are …

 

Design Contests Needs An Identity

by Matthew Magain

If you’ve been following the SitePoint development blog, you’ll know that the SitePoint’s design contests is in the process of being relaunched as 99designs.

Given the nature of this community, it seems only fitting that the logo design for the new site be opened up as a contest to the members of the community that use the site.

From the brief:

99designs is the upcoming evolution of the SitePoint Design Contests, and as is only fitting we are holding a design contest for our new logo. The logo must fit in with the designs for the new site. We are looking for a fresh, simple logo and are offering a prize of $1,000, and we are guaranteeing that a winner will be selected and paid.

The contest went live today and will run for the next four days. There are already a handful of promising submissions, but if you think you can do better, get designing!

Currently experiencing some weird behaviour with Wordpress tags. Apologies to any readers who received this post multiple times in their feed reader. We’re working to get it fixed so it doesn’t happen again!
Fixed!

 

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.