MSDN InTrack: Microsoft Webstack and PHP
Last week I attended a one-day Microsoft event about what the Microsoft platform has to offer for PHP developers. Four topics were covered: MS Server 2008 � IIS 7, SQL Server, Presentation and the Live platform. As was explicitly mentioned, the event wasn’t about ‘learning PHP’ but about ‘what’s in store’. It seems like Microsoft takes PHP’s growth seriously . In this first post I’ll cover IIS and SQL Server 2008.
MS Server 2008 � IIS 7
The IIS 7 part was quite interesting, the most important facts mentioned being:
- Modular instead of Monolithic. The extension architecture allows for extra features to be added to IIS 7. Extensions can be ‘official Microsoft extensions’, ‘unofficial’ (third party, no MS support) or self-developed.
- FastCGI PHP. One of those extensions is FastCGI. Apparently FastCGI re-uses a proces as opposed to classic CGI. For PHP on IIS this means a great performance boost.
- Multiple PHP versions. Per folder, or even per specific script, the PHP executable can be specified so it is easy to run different PHP versions on one server or to test applications on updated PHP versions.
- Delegating access to configuration settings. It looked like it was possible to delegate configuration settings at a very detailed level. Delegation is helped by the introduction of ‘IIS users’. The configuration console can be remotely connected to using the IIS user credentials.
- Bit rate throttling. Very useful if you are hosting large media files.
- Url Rewrite Module. The most notable feature to me was that it allows you to import apache mod_rewrite settings. Very nice.
- Alternate configuration options. For those suffering from RSI (or just not liking icons) there are several other ways of accessing IIS settings: AppCMD, Powershell, .NET namespaces or the XML configuration files. IIS 7 made a good impression. It looks like some features very important for PHP development are in there. I think for sysadmins it’s very nice that all of the configuration can be done from the CLI as that is better suited for repetitive tasks, tooling and documenting.
SQL server 2008
The SQL server part covered the connecting proces from PHP and the features SQL Server 2008 offers.
For the PHP examples the Microsoft SQL Server 2005 Driver for PHP was used. This driver makes available a set of sqlsrv_ functions. In-depth coverage on that subject can be read here. The driver is only available on windows but luckily there are other options: MSSQL extension, ODBC extension, PDO_DBLIB and PDO_ODBC.
Next on was coverage on the Server product itself. The part on reports wasn’t that interesting although the reports created looked very polished. And of course there’s a certain demand for that. :). Furthermore, I think displaying the reports using an iFrame isn’t the type of ‘integration’ PHP developers will get very excited about.
Working mainly with CLI or Php(My/Post)Admin I could see the benefits tools like SQL Server Management Studio and SQL Server Profiler can offer. I think they can be of great help optimising queries.
Of further interest to me were the geography and geometry functions. It was nice to see how easy it is to combine, say, travel distance and other attributes in a single query. I’ve never had to work with geographic data yet but, as co-attendees mentioned a lot of other databases have similar features. For example PostgreSQL has the PostGIS extension and there is some spatial functionality in MySQL too.
SQl Server is probably a very good product but I doubt if it will be used much in ‘blank sheet’ PHP projects. For companies having a MS infrastructure and wanting to jump on the PHP bandwagon options are plenty…