Anders Fjeldstad

Feb 3, 2012

If you're a web developer, you want your web apps to load fast and be easy on your visitors/users data plan or bandwidth. A utility like YSlow will tell you that you should minimize the number of requests required to load a page, in addition to keeping the responses as small as possible. A common way to accomplish this is to combine, minify and/or compress non-dynamic content like stylesheets, external Javascripts and background images.

In the .NET part of the world there are many solutions to this problem - libraries that plug into you app and help you define bundles of files that can be combined and minified, helpers for spriting background images and so on - but none that I've found so far is anywhere near as simple to use as the awesome RequestReduce by Matt Wrock.

RequestReduce is a single NuGet package (two if you want SASS, LESS and CoffeeScript support, three if you need to deploy your app to a web farm) that hooks into the application, magically determines which style and script files can be combined into bundles, minifies these bundles, creates sprites for background images and finally replaces the original file references with the optimized versions in the HTML output. Pure genius.

A tip though: it won't update the cached optimized files unless the original content url changes. Therefore you should use some kind of versioning strategy for your static content, like including a revision number in the filename or appending a timestamp to the querystring of the content url (see this snippet for a sample UrlHelper extension that makes this dead simple).

Feb 3, 2012

Yesterday, my favorite cloud app host AppHarbor announced their new pricing model, with a couple of premium options in addition to the free one. This is great news, since it indicates that AppHarbor is indeed a service that can be used for production applications and that it will probably be around for some time (after all, at least I know that I tend to trust a service which I've paid for more than a free one).

One change that is a bit unfortunate for me is that the free plan no longer includes the possibility to use a custom domain name - instead that feature is available as an addon for $10/month. While I agree that it's reasonable to pay something for production applications, I have a couple of non-commercial, experimental apps on AppHarbor with custom domain names for which I wouldn't want to pay hundreds of dollars per year to have running.

I guess it's time to either shut them down or move them to my shared hosting account (which is about $10 monthly for unlimited apps and domains). For me, this new pricing model means that I will use AppHarbor for apps that either are in an early development stage (which is a joy thanks to the awesome integration with Github) or that are in production and make enough money to at least cover their own costs.