Wednesday, December 29, 2010

Getting started – ARM YOURSELF!!!

Now that we’ve decided we’re going to build ourselves an application, it’s time to get the right tools for the job.

If you’ve never used ReSharper (R#) before (SAY WHAT?!?), make sure you download it and try it out. I can go on and on about how good it is, but I’m sure the screencasts will do a much better job. There’s a 30 day free trial after which you’re gonna have to pay to keep using it (or are you? ~_^ ), but once you get used to it you know it’s worth every penny.

My next must-have tool has to be TestDriven.Net, which is also FREE! (for personal use) and lets you run and debug unit tests (I find it faster than R#’s runner), display code coverage reports and, well, execute just about any basic piece of code when you need to run something quick and dirty.

After you install it you can use it by any of the following ways:

1. Right click a file, project or the entire solution in the solution explorer and choose you’re wanted action from the context menu (Run Test(s) \ Debug \ etc.).

image

Choosing “Run Test(s)” on the entire solution for example will execute every UnitTest in the solution (you can run more than one framework, let’s say NUnit and MSTest in the same solution, but each project will only run one framework)

The results show up in the output window, with failed tests also showing in the Error List.

2. Right click anywhere in the scope of a test method or fixture and choose your wanted action from the context menu. The test run include whatever was in the scope of your mouse pointer (method, fixture or even project).

The best part about it (wait for it…) is that it works on any method, even one without a Test\TestMethod attribute! A very useful feature in my view.

3. If you’re a keyboard freak like me, you’ll probably like this option best –> Right click on the toolbar –> customize –> Keyboard. Find the command “TestDriven.Net.Client” and assign an open shortcut for it, let’s say Ctrl+Alt+/ (don’t forget to click Assign).

Now while writing your test, you can just run it without leaving the keyboard!

Last but certainly not least, the latest addition to my arsenal is NuGet, the first widely used package management system for the .Net platform. For me at least it’s a very long anticipated tool that’s long overdue (very long, if we consider the fact the maven repository has been around since 2005 in the Java world), but better late than never!

It basically allows you to add a library package reference to your project directly from the official online repository (or your own) which hosts many OSS projects (or your own), doing that will download the package with it’s dependencies to a local cache, reference it and change\add .config and code as needed if the package had configured those actions. You can start using it by right clicking the solution explorer or manually using the new Package Manager Console.

Gone are the days of finding the right binaries, diving into an OSS project (Let’s say, NHibernate?) is as easy as adding a reference from the local GAC (minus the nausea)!

You can install it using the extension galley, but I recommend downloading the msi and running it, since I run into some voodoo the other day installing it via the gallery.

Oh, don’t forget installing the Productivity Power Tools via the extension gallery.

Well, now that we’re armed for the job, let’s get started with NHibernate.

Friday, December 17, 2010

string.format(“Hello {0}", this.World.ToString());

Well, it only took me about 5 years, but better late than never:

Welcome to my blog!

I'll be posting about software architecture, development and management, mainly about .Net and Scrum.

In the next few weeks I’ll be posting about developing N-tier applications fast and easy using NHibernate, Automapper and WCF.

Boring, right?

That’s why I’ll be happy to hear from you about new open source projects that you’ve stumbled upon and didn’t get the time to dive into – I’ll do my best to give you my own review.

Oh, and make sure you subscribe with your favorite RSS aggregator!