ConfigureIIS running on systems without IIS

Posted by Jason on April 1, 2008 at 10:53 am

These days I always seem to find myself writing installers for clients using WiX. What usually happens is I get there to find they are really struggling to maintain their current installers, more often then not in InstallShield. So I go and tell them they should try WiX since it has so many advantages over certain other products. For a start it’s actually maintained by several Microsoft guys and enjoys a big support community. Also since the source code is written in XML it is much easier to check in to source control and maintain.

Anyway, to cut a long story short, my evangelising on the subject usually ends in the words ‘here you go then, write an installer for that’. And so I end up with the job yet again.

That’s not to say it doesn’t have its issues like so many other things in the world of software development, especially when you end up writing some monster installer that installs a web-client, web-services, windows-services and the odd database or two.

Today’s issue was ConfigureIIS which is a custom action executed if you are creating a <WebVirtualDir>. Unfortunately even if you are not installing the web component that needs IIS to be configured it will still attempt to execute ConfigureIIS which causes an error to appear if IIS is not installed. Just having a web component in your installer is enough to fire it off.

Looking on the WiX mailing lists it seems that it is a known issue and the only way around it currently is by modifying and recompiling the source code for WiX itself. Not a lot of fun when you just want to write an installer and it takes you away from the currently released code, which I find it is best to avoid when working for other clients.

However, in the process of modifying the source I found the property SKIPCONFIGUREIIS. Set this to true and it no longer runs the ConfigureIIS custom action. Obviously you need to make sure it’s only turned off for the relevant features of your installer. It’s just a shame they didn’t make it a little more widely known!

To be honest I could have kicked myself since I already knew of the SKIPINSTALLSQLDATA for turning off the database activity when not required. That one is a little more published though.

Financial Advice Client Management

Posted by Jason on March 13, 2008 at 11:07 am

Starting soon is a new application for accountants David Newton to assist the financial advice team in managing their client base and ensuring they are meeting all of their clients financial needs. (more…)

Mortgage Calculator

Posted by Jason on February 26, 2008 at 8:20 pm

Here’s a helpful little gadget I just knocked up.

Zenji Website v2.0

Posted by Jason on February 16, 2008 at 7:30 pm

Much like the shoe-makers children we’ve been too busy working for others to actually make much needed improvements to our own site! It has been in need of attention since, well since I can remember actually.

(more…)

Adrian Johnson Website Goes Live

Posted by Jason on February 4, 2008 at 8:19 pm

Adrian Johnson SiteWith great fanfare the new site for the artist Adrian Johnson has now gone live! With a few months delay while Adrian has been out of the country promoting his works (I think I’m in the wrong job!) the site is now ready to do business. And with Adrian’s carefully selected artworks the site certainly has come alive. The design gives a great presentation framework for the art and allows the site owner to modify the layout at will. As a result the content is always fresh and well presented. (more…)

S&J Link Jobcard Web Application

Posted by Jason on September 22, 2007 at 5:15 pm

Link Web Application

This is an application we have been working on for a couple of months for conservatory manufacturer S&J Link Ltd. The requirement was for a zero install application which could take the place of their current, paper-based job tracking system. (more…)

AdrianJohnson.org.uk

Posted by Jason on August 6, 2007 at 2:40 pm

 Drawn TogetherA new site is in the pipeline for the artist Adrian Johnson. This time we’ll be working with Ben from Radio Design who is preparing the visual design to sit on top of a fully content managed website. (more…)

Samba server connections on a Mac

Posted by Jason on July 29, 2007 at 9:21 am

Since I got the Mac a couple of months ago there is one thing that keeps bugging me; connecting to my server is not particularly reliable. Dropped connections seemed to be pretty much guaranteed half way through a job that involves anything more than a couple of Mb of data. Since I tend to use the server for automated backups of my other machines it just hasn’t been happening for the Mac. Slowly I’ve got more and more concerned about having no regular backups.

A chance comment I came across whilst Googling for something else seems to have cleared up the issue. It seems my technique of using the Network utility in the Finder was the main issue. It is certainly the simplest option and most people seem to use it for that very reason. The trouble is it doesn’t always get the protocol right. You can check this by creating a connection to your server (in the finder choose Network and then browse to your server and connect to a share), selecting the new connection and then checking the info (Apple key and I). Mine shows up as:

cifs://my_server/backup

Since my Linux server uses Samba for the network shares it’s far better to connect using the Samba protocol:

smb://my_server/backup

The easiest way to set this up is through the ‘Connect to Server’ utility in the Finder. This also stores your server connections for easy future access. You should be able to simply type the connection string in and then connect at will. Hopefully you’ll see a much more stable connection in future.

(An extra tip – once you have the connection set up you can automatically connect at login by adding it to the list in System Preferences->Accounts->Login Items)

CakePHP and clean URLs

Posted by Jason on July 28, 2007 at 11:39 am

Now don’t get me wrong – I love CakePHP and I know there’s a good reason for the controller/action format of urls. In fact I often find it helps to have a framework that forces that sort of thinking on me all the time since most of the sites I write are more application than website. It’s a bit like the good old days when I was struggling to get my head around the concept of OO after coming from a very procedural background. I could probably have done with a framework then too.

So I do think that it’s great for web applications, but not necessarily for web sites. Clean urls have many touted advantages over controller/action urls for a web site. I’m not sure how many are true (things like Google favouring them seem like a good reason, if that is actually the case) but for me it’s best simply because they are not controller actions. A ‘contact me’ page is a ‘contact me’ page. It’s not really an action on a particular controller in your application. An ‘about’ page is similar – it just seems wrong to say ‘about’ is an action on ‘pages’. Well, it does to me anyway. Whilst I usually write web applications there is almost always a web site component like this to them and I think it’s fine to seperate those two concepts even when they’re on the same site.

Now it’s true that you can write static pages directly to the webroot, but my clients almost always want some management control over those pages. As much as I’d like them to have to come back to me every time they want to change a word it just doesn’t seem particularly fair and just harms my chances of repeat business! All of the other solutions I came across just seemed rather complex and often slightly dodgy. So I came up with a simple solution of my own that works fine.

Basically you add an entry to routes.php for each of these pages:

  1. $Route->connect(‘/contact/*’, array(‘controller’ => ‘pages’, ‘action’ => ‘contact’));

This will redirect any call to ‘/contact’ to ‘/pages/contact’, but without giving that fact away to the user. It’s true that you can’t now have a controller called ‘contact’ but then you wouldn’t want one anyway (the main reason being controller names should be plural when following the Cake conventions!). You can add as many of these lines as you like. If you end up with more than 2 or 3 you might want to question whether those pages should have been part of a controller!

Using checkboxes in CakePHP

Posted by Jason on July 3, 2007 at 10:26 pm

Something that’s had me confused for a couple of hours today is using a checkbox in my CakePHP application. I’ve been using the html helper to create the relevant html and was initially confused by the fact that it not only creates the input element but also a preceding hidden input element.

  1. <input type="hidden" name="data[Item][big_rock]"  value="0" id="ItemBigRock_" />
  2. <input type="checkbox" name="data[Item][big_rock]" id="ItemBigRock"  value="1" />

So I did the best thing I could think of and ignored it, but when I came to creating the form to edit existing values I just ended up getting strange results. The checkboxes seemed to have a life of their own, checking and un-checking at will between post-backs. Google came up with several posts about the general problem most people come across with checkboxes – the fact that they post back nothing if they are not checked, but it took me far too long to actually put the strange hidden input field and this standard behaviour together. In my defence, there is very little documentation on this (that I could find) for CakePHP.
(more…)

« Previous PageNext Page »