Archive for April, 2008

14 Apr 2008

Adding DotNetKicks To FeedBurner FeedFlare

1 Comment Uncategorized

If you are using FeedBurner to manage your feed, and you love DotNetKicks as much as I do, you can now easily add a “Kick It” FeedFlare to it. This will automatically add a “Kick It” link below each post in your FeedBurner feed.

To get started you will need to do the following:

  1. Login To FeedBurner
  2. Go to FeedBurner > Optimize > FeedFlare
  3. Go down to the Personal Flare box.
  4. Copy it and paste this URL in to the box:

    http://www.coderjournal.com/uploads/2008/04/dotnetkicks-feedflare-link.xml

  5. Press “Add New Flare”.
  6. Then check the two checkboxes next to the new entry.
  7. Click “Save” at the bottom of the page.

After all the steps above are completed you should have a FeedFlare example that looks somewhat like this:

Notice the “Kick It” flare link on the left.

13 Apr 2008

Coder Journal’s MVC Toolkit

9 Comments Uncategorized

Today I decided to release a toolkit that I have been building over the past couple of months. Most of the code in the toolkit is related to MVC. Here is a list of the features:

ActionFilterAttribute’s

  • HttpPostOnlyAttribute
    Only allows POST to be made against the action.
  • CacheAttribute
    Sets the action’s response as cacheable.
  • CompressAttribute
    Compresses the action’s response using GZip or Deflate encoding.
  • ServiceAttribute
    Marks an action as able to provide the ViewData as JSON, XML, or JSONP.
  • ServiceOnlyAttribute
    Marks an action as only able to provide the ViewData as JSON, XML, or JSONP, that means no HTML.
  • ExceptionHandlerAttribute
    Handles any exceptions thrown from an action, and redirects it to another page, or another action.
  • CaptchaAttribute
    I did a whole post on providing a CAPTCHA for your MVC action.
  • AllowedHttpMethodsAttribute
    Only the HTTP methods entered in to this filter are allowed for your action. Available HTTP methods are OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, and CONNECT.

ViewEngines’s

  • ServiceViewEngine
    This view engine provides the serialization of the ViewData to JSON, XML, or JSONP. It is set when one of the following is requested from the ServiceAttribute above.

Route’s

Method Extensions

  • Redirect extends HttpResponse
    I have had a long standing discontent with the Redirect method of the ASP.NET. I have talked about good use of HTTP Status Codes before. There are at least 3 status codes that you want to consider before choosing a response status code of 302. Just to reiterate my post on the subject use 303 to redirect from a form POST, use 307 when you want to redirect to a page that is going to change with each request, use 301 if you want to permanently redirect one URL to another.I created the, Redirect, extension method on HttpResponse so that the status code could be set for the redirect.

View Source: Coder Journal MVC Toolkit Source
Download Binary: Coder Journal MVC Toolkit Binary

Read more

11 Apr 2008

WTF Apple, Show Some Common Courtesy

5 Comments Uncategorized

Common courtesy is very important for all application developers to follow especially when they are dealing with users settings. Especially for common file formats, where the user has probably already set up their preferences how they like. And most importantly to not piss off your install base.

As you might have gathered from the title Apple has screwed up in this area yet again. In their never ending battle to try and forcibly get an install base, from some of their crappiest application. The Apple developers must taken the same “Our shit doesn’t stink”-attitude as many of their users, and started taking over the preferences on the users machine with out asking.

Like any good .NET developer I had the XML file format being opened by Visual Studio, it has a nice viewing, and editing interface that is hard to beat. Today I saw their was a QuickTime update while watching the Facebook Conferences presentation in anticipation of my previous post today. So as I decided to do the update, what a nightmare that has turned out to be. First of all it was 70 MB download, because Apple also decided that iTunes and Safari needed to be downloaded with Quicktime, and bundled them all together. Then it decides to take over all my documents in my system, including HTML, XML, and a bunch of other web related documents. See below.

Then to boot their XML “Rendering” sucks.

Safari XML Rendering Sucks

Hey news flash Steve Jobs this is how a real browser renders XML, and does a damn fine job at it.

IE XML Rendering Doesn't Suck

At least if you are going to take over my system, and forcibly put your software on my computer, the very least you could do is not make it suck. Is that too much to ask.

Steve Jobs has to learn that Windows users don’t put up with the same amount of shit as Apples users do, because one we don’t bow down at the alter of Steve Jobs, and two we have other options. I am not going to let Steve Jobs take a steaming pile of shit on my PC, change all the settings, install one of the worst browsers on earth, and then forgive him. He is going to have to do something grand with Safari to get it back on my PC.

I am really pissed that I now have to uninstall a program that I never wanted installed in the first place, and then go through the registry and clean up after an Apple Developer that couldn’t find his way out of a paper bag.

Maybe they should spend less time trying to achieve an ACID3 milestone that won’t be standard for another couple of years and work on the basics that IE for the better part of a decade now.