Tag Archives: visual studio

IIS7 Wordpress and Friendly URLs

As a developer who uses Vista as their main OS, I have always found developing php sites a little bit awkward. Php never liked to play nicely with IIS and unless you installed and used Apache, friendly URLs were even more difficult to get working. I use IIS extensively for ASP.NET development and I never liked having both Apache and IIS installed together as they seemed to lock horns at every opportunity. My answer until now was to use VS.php, which runs an instance of Apache on demand, so I only have to use Apache when I need to. This was great for the most part but last week I had the situation where I was trying to work on both an ASP.NET project and a Wordpress project at the same time. Stopping and starting web servers every few minutes was getting a little dull.

rewriteThis spurred me on to take some time to see what all the fuss about IIS7 and php was really about. I was pleasantly surprised. Since Vista SP1, it is possible to configure IIS to run php using FastCGI. I won’t go into the detail here, there are plenty of examples on how to configure php in this way. Needless to say, it was not too difficult and I had a test phpinfo(); page displaying in no time. What’s particularly great is that Microsoft has been doing some great work getting php to run as quickly and efficiently as it can on IIS. If you are happy running php version 5.3, over at Php for Windows, you can pick up a version that has been compiled in Visual Studio 2008 which means faster and more stable than before.

The next step in my investigation was to see what could be done with the new url rewrite module for IIS. Another easy thing to install. What’s more, it has the ability to import .htaccess files. I use these extensively when using Apache and I already had one for the Wordpress site I was working on. Importing rules is a pleasure because of the neat interface that shows you which rules it can convert and which it cannot. Editing the original .htaccess directives on-screen allows you to fix those rules it is having trouble with. In my case it was just the RewriteBase, which I could happily remove without worrying about it.

One click of the ‘apply’ button and I was up add running. The site was responsive and low and behold, no issues with the friendly urls. Too easy!

Is Atlas So New?

Slipping musically into my twitter stream earlier this morning came an excited remark by John Resig. He seemed all hyped about the new Atlas product from 280 North that they announced at Future of Web Apps, Miami.

Given John’s reputation in web development, I immediately followed the link and watched the introductory video on the site, expecting to be amazed. It looked all very pretty and the creation of an rss reader with just a few clicks of the mouse gave suitable wow-factor to the demonstration.

However, I could not help thinking that I had seen this idea somewhere before. I use it at work every day – Microsoft Visual Studio. The same concepts are there for web development – a drag-and-drop interface, with built-in controls that are supposed to take most of the grunt work away from you.

At first look, this idea is great – creating fully-fledged application in no time at all. However, in my experience with Visual Studio, this ends up being more of a hindrance than a help. I avoid the drag-drop functionality of VS like the plague, not because I am a glutton for punishment but because of the intrinsic limitation it places on you and because most of the time the same functionality can (and should) be achieved in a faster, more flexible and more maintainable way. The biggest gripe I have with web development in VS is the constant struggle to make it produce tidy html that is standards compliant.

Atlas might not be like that at all. I have only seen the video. However, I don’t think it is revolutionary as the buzz today would lead us into thinking and it may not be all that people hope it is. It could endup just being a Visual Studio type development environment based in a browser.