Server-side Mashups with PHP & ASP.NET at MIX
I've been getting ready for MIX and this is one demo I'm excited to give. Tomorrow I fly out to Las Vegas, where I'll present at two sessions:
IIS7 for Developers - Monday, April 30, 1:30pm - 2:45PM:
I just picked this talk up on Thursday, as a previously scheduled session fell through, so I'm still trying to figure out what to demo. There is so much to show off with IIS7, I could easily spend several hours just doing demos with no slides. The new beta 3 features themselves could take three or four sessions to demo, but I only have an hour. I think I'll focus on two areas: 1) IIS7's awesome public extensibility model used by the product team to build the IIS7 product itself, and 2) the new and improved support for PHP and how easy it is to take advantage of IIS7 features with PHP. I'd like to show off some of the benefits of running PHP on Windows, including the ability to use powerful features like IIS7's dynamic output cache for blazing performance and I may also show a server-side mashup application which takes advantage of IIS7's integrated pipeline to password protect a PHP application with ASP.NET forms authentication. (read below for a video preview)
This second demo sets me up well for the second session:
ASP.NET vs. PHP Panel Discussion - Wednesday, May 2, 11:30am-12:45pm
I'm really excited to be a part of this panel with distinguished community members like Wez Furlong - core PHP developer - aka Dr. Evil, Jesse Liberty, and Joe Stagner. Brian Goldfarb will be moderating, which should be fun. I hope all you out there reading this who are at MIX 1) show up to this session the last day and 2) bring with you some great questions!
There are tons of great PHP applications out there, from WordPress to MediaWiki, and Drupal to phpBB. I want them all to run great on Windows. That may cause PHP developers to ask: why would I want to run on Windows? I get great perf and reliability on Linux, and I don't have to worry about security. Well, my answer is this:
1) if you're worried about IIS security vs. Apache, you're concerns are outdated. Check out http://secunia.com and compare IIS5 and IIS6's track record for the last 4-5 years and compare it to Apache. Having been on the IIS team during Code Red and Nimda I can tell you it was a very painful experience and one I don't ever hope to re-live, nor do I wish it on my worst enemy. The IIS team learned hard lessons in 2001, and the results speak for themselves.
2) if you're worried about IIS performance and reliability when running PHP vs. Apache, you're concerns are definitely valid. Up until recently there were only two ways to run PHP: the slow way (CGI), and the unreliable way (ISAPI). :) This is primarily a result of the lack of thread-safety in some PHP extensions - they were originally written for the pre-fork Linux/Apache environment which is not multi-threaded. Running them on IIS with the PHP ISAPI causes them to crash, and take out the IIS process serving your application.
Fortunately, the Microsoft / Zend partnership has brought about fixes to these issues with many performance and compatibility fixes by Zend, and a FastCGI feature for IIS which enables fast, reliable PHP hosting.
3) once these fundamental concerns are taken care of, there are a lot of great features to take advantage of on IIS and Windows. Joe Stagner has given a few PHP on Windows talks, and I'd recommend you read up on some of the reasons here:
MSDN Webcast: Comparing PHP with ASP.NET
MSDN Webcast: Building and Running PHP Applications on Windows
MSDN Webcast: Extending PHP Applications Using Microsoft Technologies
Beyond these reasons, IIS7 also brings some pretty compelling features to PHP developers, including distributed configuration (like .htaccess, only more powerful), a rich admin tool, cmd-line tool, and programmatic APIs (all these make it simple and easy manage the server), dynamic output caching (for blazing fast kernel mode caching support for PHP applications), integrated pipeline (a new .NET extensibility model for building out new web server features), and much much more. To demonstrate how this works, I'm hoping to show off a server-side mashup in my IIS7 for developers session to lay the groundwork for the ASP.NET vs. PHP panel.
Ok, I thought this was a funny phrase when I first said it, but I'm not the first one to use it. After thinking about what to demo in my first talk, I decided to show off how IIS7 can make it easy to use both PHP and ASP.NET in the same application. I recorded a few videos for those who can't make MIX (warning: SPOILERS included in the video)
Getting PHP running on FAST on IIS7 Beta 3 - 11mins 5sec (Apple Quicktime, Windows Video)
Server-side Mashup: Using ASP.NET Forms authentication with PHP - 7mins - 10sec (Apple Quicktime, Windows Video)
(Can't wait to use SilverLight!)
These demos show off what may be the start of a great partnership. :) I would love to see more server-side mashups in the future, as PHP developers take advantage of IIS and Windows!
I hope to see you at MIX! Have a great week!