Skip to content.

Manageability

Sections
Personal tools
You are here: Home » blog » archive » Refactoring To Patterns

Refactoring To Patterns

20030516071513

Joshua Kerievsky has put together an interesting compilation of "Refactoring To Patterns". At first glance, I had thought that the piece was more buzzword compliant than of practical value.  However, after reading his "Stop Over-Engineering" article, I was prompted to take a more indepth look.  He writes:

Once my design skills had improved, I found myself using patterns in a different way: I began refactoring to patterns, instead of using them for up-front design or introducing them too early into my code. My new way of working with patterns emerged from my adoption of Extreme Programming design practices, which helped me avoid both over- and under-engineering.

I've been living and breathing design patterns ever since I was introduced to it in the C++ framework called ET++.   If you've never heard of it, and I believe most people haven't, its one of Erich Gamma's earlier works in framework design.  It precedes his work at Taligent, Eclipse* and even the GOF book!  Even by today's standards it was a pretty massive and awe inspiring design.  At that time the patterns were not as well documented, however it was clear from the code that this was beyond anything the world had ever seen.  So you could imagine my excitement when the GOF was published, finally enlightenment! 

Fast forward into the 21st century, patterns are in the vocabulary of any self-respecting programmer.  Unfortunately, all too often it's used like name dropping, that is as a mechanism to impress.  Even worse its been used to disguise faulty designs as in the case of J2EE patterns.  However, Joshua hits the nail on the head, its a design smell to use design patterns prematurely.  It's just like premature optimization which is a bad thing.

Ah! I've run of time today. I was going to talk about "Refactoring to Aspects", stay tuned!

*Incidentally, there was a product called Sniff++ that used the ET++ framework, it was at its the time a kick ass IDE with unbelievable search and browsing capabilities, much like Eclipse is today for Java.  In fact, Eclipse is at least Gamma's third iteraton at building an IDE.

Created by admin
Last modified 2003-07-31 07:07 AM
 

Powered by Plone

This site conforms to the following standards: