Extreme 05

I’m at Extreme Markup Languages all this week.
Elliot Rusty Harold and Simon St Laurent have been blogging the conference in full. Here’s the presentations that grabbed me so far.

ERH showed us a tool, written in Java, for ofuscating an instance of XML so you can send it to someone as a test case without [...]

Followups: Namespaces in JavaScript

Following up on my post about Namespaces in JavaScript, Ward Willats writes:

If you can change the anonymous functions in the array at run-time, you can implement various proxy, facade, envelope/letter patterns and so on.

Ah, so that’s what it’s good for.

Dating Design Patterns: The Suppressed Research

[ via rc3.org ] First there was The Rules, now there are Dating Design Patterns.
It’s just so wrong, but funny to see blatant artifice en-codified.
Don’t follow these, and if you’re using them unconsiously, then you’re doing something wrong.
Meta: for bonus points, identify the pattern used in the paragraph above.

Resign Patterns: Ailments of Unsuitable Project-Disoriented Software

From the internal humor list: Resign Patterns
2.6 Flypaper
The Flypaper Pattern is written by one designer and maintained by another. The designer maintaining the Flypaper Pattern finds herself stuck, and will likely perish before getting loose.

The Parameter Envelope Pattern

Suppose your XSLT transform requires run-time parameters, however, you don’t have access to those arguments when you call it. For example, you’re fetching the XML to transform through HTTP GET, or the XPath document () function, all you have is a URL, and that URL doesn’t decompose into the parameters you need.
Then the source document [...]

Implementing the Factory Pattern in PHP

Factory Patterns allow you to write code that creates an instance of a class without knowing, in advance, the class you need to instantiate. Chuck Hagenbuch demonstrates how to implement Abstract Factories in PHP.

Abstract Classes for PHP

Designing and using abstract classes in PHP: is this overkill?

Two Step View for Data to HTML

[ via the Silicon Valley Patterns Mailing List ] Martin Fowler discusses design patterns for going from data to HTML. He does it in two steps, data to logical page (that is the components of the page such as shopping cart, weblog entry, etc.) and then logical page to presentation. This two step method makes [...]

Does your code have the wiff of decay?

[ via mac.scripting.com ] From the original Wiki, a code smell hints that something is wrong in your code.

Do not break search engine links when you change your site

Site redesigns and platform changes may break valuable links to your site from search engines. An article in ClickZ discusses the problem. I also suggest using mod_rewrite to fix the problem.

Web Design Patterns

[ via Camworld ] A collection of design patterns for the web. The site’s content is written in XML, and uses the old MS version of XSL to display content as HTML. So be warned if you’ve updated to MSXML 3.0 or 4.0.

XML Sitemaps using ASP

I think the sitemap is an emerging design pattern. It provides an elegant solution to the site design problem.
The map itself usualy looks like:

URL {

Source Data

Transform 1

Transform N

Serializer }

where the source data is XML from a file, a service of some sort, or another URL; the transforms correspond to XSL and XSLT transforms; and the [...]

Design Patterns and DHTML

I found a nice article on CNET.com describing how to use OO and Design Pattern techniques to build device-independent DHTML in JavaScript.

Design Patterns: The Gathering

[ via Silicon Valley Patterns Group ] Industrial Logic is offering a pack of Design Patterns playing cards. They suggest several games you can play using them. Here are some others:

Paternmon
Head to head Extreme Programming challenge against Team Rocket. I choose you, ModelViewController!
Design Patterns Drinking Game
Draw card from deck, if it’s a GoF pattern, take [...]

Christopher Alexander on Generative Sequences for Entrance Transitions

Christopher Alexander, the inventor of pattern languages, is presenting at the Stanford Comp Sci Lab Coloquium this Wednesday the 29th. He’ll be talking about sequences, the extension of patterns for designing systems. He has an example of this on his site.