PNASoft
RSS feed

Summarize

Galleries: 68   Photos: 2224
Folders: 67   Files: 2221
Members: 34756      


Addison - Design Patterns in Ruby

Addison - Design Patterns in Ruby

Preface

A former colleague of mine used to say that thick books about design patterns were evidence of an inadequate programming language. What he meant was that, because design patterns are the common idioms of code, a good programming language should make them very easy to implement. An ideal language would so thoroughly integrate the patterns that they would almost disappear from sight.

To take an extreme example, in the late 1980s I worked on a project that produced object-oriented code in C. Yes, C, not C++. We pulled off this feat by having ach “object” (actually a C structure) point to a table of function pointers. We operated on our “objects” by chasing the pointer to the table and calling functions out of the table, thereby simulating a method call on an object. It was awkward and messy, but it worked. Had we thought of it, we might have called this technique the “object-oriented” pattern. Of course, with the advent of C++ and then Java, our object-oriented pattern disappeared, absorbed so thoroughly into the language that it vanished from sight. Today, we don’t usually think of object orientation as a pattern— it is too easy.

But many things are still not easy enough. The justly famous Gang of Four book (Design Patterns: Elements of Reusable Object-Oriented Software by amma, Helm, Johnson, and Vlissides) is required reading for every software engineer today. But actually implementing many of the patterns described in Design Patterns with the languages in widespread use today (Java and C++ and perhaps C#) looks and feels a lot like my 1980s-vintage handcrafted object system. Too painful. Too verbose. Too prone to bugs.
Google bookmark Yahoo bookmark Digg bookmark Furl bookmark Reddit bookmark Slashdot bookmark Stumbleupon bookmark Technorati bookmark Blinklist bookmark Newsvine bookmark Netvouz bookmark Wists bookmark Blogmarks bookmark Spurl bookmark Shadows bookmark Facebook bookmark
Placeholder for Google Adsense
Placeholder for Google Adsense



Comments

No Comments
PNASoft.com does not store any files on its server.
Please contact the content providers to delete copyright contents. Copyright by PNASoft.com