This month, the Enhance Your Apps With the Integrated ASP.NET Pipeline article is finally out in MSDN Magazine. I just got several copies in the mail (thanks Howard!).
****** UPDATE: Scott Hanselman presents the demos from this article at CodeMash 2008 ******
To be honest, I am VERY excited about this article. I’ve been talking and writing about the ASP.NET Integrated pipeline in IIS 7.0 for a long time, but I feel that this is really the first in-depth look at how it can be used to add value to existing applications. I think this article really nails the two big bottom-line benefits of the platform: the ability to use ready-made ASP.NET features to improve existing apps right away, and the ability to develop custom modules with ASP.NET to enhance those apps.
This article also gave me a chance to show off my other baby, the FastCGI support in IIS 7.0. The demo app that gets spruced up is a PHP image gallery, set up to work using FastCGI and the latest php.net binaries with Windows enhancements.
But, even though the article uses a PHP application, it is really not about PHP. In fact, I don’t show or change a single line of PHP code in the whole article (for my foray into PHP development that ties into the Integrated pipeline extensibility, see my IIS authentication plugin for WordPress).
Instead, the article shows off how the ASP.NET Integrated pipeline can be used to apply the richness of the .NET Framework and ASP.NET services to any application framework technology. It really doesn’t matter what the front-end application framework technology is. You can keep your existing applications, be they written with ASP, PHP, Perl, or Ruby on Rails, and continue to leverage existing developer know-how with those technologies.
To recap without spoiling the article, here are some highlights:
· Deploy the PHP app using FastCGI. No-brainer, FastCGI is built-in in Windows Server 2008 and Windows Vista SP1.
· Secure the PHP gallery using the super-famous ASP.NET access control trio: Login controls, Forms Authentication, and Membership backend using a portable Sql Express database. The whole thing is done in just a few steps, all from the new IIS Manager console. Gotta love the integration!
· Write a custom URL rewriting module to support Search Engine Friendly (SEF) URLs for the image gallery, instead of the built-in “ugly” querystring URLs.
· Write a custom response filter to on-the-fly replace the hyperlinks to use SEF URLs. After this, the app is now using SEF urls through-and-through, without a single change in PHP code.
· Throw in a custom module that sets up a custom output caching scheme that boosts performance from 93 RPS for the stock app with FastCGI, to 1386 RPS with all the feature fixins. So, basically after adding all the features the app is 14X times faster.
Be sure to read the article and download the attached source code. Be sure to click on figure links because most code samples and performance results are not shown on the article page.
When you are done, come back to read about:
– building your own modules and handlers to enhance your applications using ASP.NET Integrated pipeline.
– breaking changes your existing ASP.NET applications may experience in Integrated mode, and how to work around them.