Savor the Hack
They've got a bad name, but hacks are an important part of creating the next wave of developer tools.
By Jonathan Goodyear
Have you ever wondered how magazines determine which article ideas to pursue for publication? To be honest, the process is largely unscientific. Elden Nelson (editor-in-chief of asp.netPRO) receives dozens of article proposals on a daily basis. Elden makes the final decisions, but he passes many of the article proposals by an editorial advisory board. As a contributing editor for asp.netPRO, I sit on that board, along with several well-known authors, developers, and a couple of people at Microsoft. If the board and Elden both agree that an article has merit, and the article's topic falls in line with the direction in which the magazine is going, the author gets commissioned to write the article.
The other day, Elden presented an article proposal to the board. The content of the proposal isn't that relevant to this discussion, but suffice it to say that it outlined a way to allow an ASP.NET developer to do something that isn't in the existing feature set of ASP.NET. A couple of the board members dismissed the proposal as a hack. I, for one, took exception to the term "hack" being used as a criterion for immediately dismissing an article proposal.
An important part of a technical magazine like asp.netPRO is presenting "hacks" to get .NET to bend to the will of the developer. A quality article will present the pros, cons, trade-offs, and alternatives of executing such a hack, and will only explore hacks that can be relied upon as (at least somewhat) stable. I was a pioneer in ASP.NET page templates, which is arguably the biggest hack in ASP.NET to date, when you consider the multiple versions I've created along with versions subsequently introduced by others. It filled an obvious need, though, and I still get reader feedback on my original page template articles, which were published more than two years ago. As another example, one of the most popular articles ever published by asp.netPRO was by Paul Wilson, who described how to enable multiple Web forms on a single ASP.NET page (see Many From One). Besides enabling the functionality using a hack, Paul's article offered a lot of insight on how ASP.NET processes each page request.
There are two reasons why I think articles describing hacks are useful. First, they answer a question that many developers have. It's better to have an expert teach readers how to best implement it than to allow the spread of hacks that are unsafe or not scalable. Magazine authors also typically have contacts at Microsoft and exercise due diligence in researching and testing hacks before unleashing them on the masses.
Second (and most importantly), the hacks of today's versions of .NET become features of tomorrow's .NET. For instance, the next version of ASP.NET has a complete page template infrastructure built in. Another feature of ASP.NET v2.0 that started as a hack is database expiration of cache items. Support for multiple Web forms on a single ASP.NET page won't be implemented, but instead the ASP.NET team eliminated all of the known issues that made multiple Web forms necessary. Microsoft is really innovative in coming up with great features, but they are even better at responding to the call of the developer community. When Microsoft bakes features into the platform, everybody wins.
As the ASP.NET platform matures, hacks will become less and less necessary. There are still a lot of features that just aren't there yet, though. Microsoft knows about a lot of them, but as the saying goes, "Sooner or later, you've gotta ship." Microsoft is relying on the developer community to help them prioritize their feature to-do list. And what better way to do that than to hack those features now? Rest assured, asp.netPRO will only serve up the best of them.
Jonathan Goodyear is president of ASPSoft (http://www.aspsoft.com), an Internet consulting firm based in Orlando, Fla. He's a Microsoft Certified Solution Developer (MCSD) and author of Debugging ASP.NET (New Riders). Jonathan also is a contributing editor for asp.netPRO. E-mail him at mailto:[email protected] or through his angryCoder eZine at http://www.angryCoder.com.
Tell us what you think! Please send any comments about this article to [email protected]. Please include the article title and author.