See Your XML Docs As You Type With CR Documentor

January 22, 2010
by Stefano Ricciardi

Introduction

Almost 10 years ago now I used to be a Java developer in Motorola. After a long hiatus in the embedded systems and a job change, I have come back to enterprise development, this time in .Net.

I remembered that in the good ol’ days it required 2 steps to see the final rendering of the XML documentation: firing javadoc (usually from within an ANT task) and the open up the content in a browser.

I was quite surprised to see that in the .Net area seeing the final output of the docs was not as straightforward as I hoped for. Yes, there was NDoc to parse the XML, but its development stopped around 2005 and it’s doesn’t support anything beyond C# 2.0. There’s also Sandcastle, but to make it work for me it has required a few downloads and a bit of tweaking here and there. And integrating it into my NAnt task had not been that easy either. But somehow in the end I have pulled that out.

Therefore I have been pleasantly surprised when I met CR Documentor, a little plug-in for visual studio that let’s you see your XML documentation as you write it. It’s almost like having a WYSIWYG editor, without having to launch Sandcastle, wait for the complete build, and open up the browser.

Installation

  • cr_documentor-logoRequirements:
    • Visual Studio 2005 or greater (I am pretty confident that you need at least a Professional version as opposed to Express). I am running it on Visual Studio Team System 2008, not sure whether it works also on 2010.
    • The DXCore plugin framework from DevExpress. Possibly the best (and only?) way to get it is to get through the excellent free CodeRush Xpress for C# and VB
  • Download the plugin: CR Documentor is hosted at Google Code at this link.
  • Copy the dll in your DX-Core plugin-folder (C:\Users\<username>\Documents\DevExpress\IDE Tools\Community\PlugIns)
  • Restart Visual Studio

Usage

  1. CR Documentor adds itself in the right click menu, close to the bottom. From the submenu, choose “Show CR_Documentor window”.CR_documentor-1
  2. A new window opens up in floating mode (I prefer to dock-it to the right side together with my solution explorer and luckily the plug-in remembers this choice every time I open the window after closing it and at startup).image
  3. Now every time your cursor is on an XML doc, you can see the preview in the Documentor window. See for example when I put the cursor on the XML doc of a class: I get a complete picture of the documentation for that class and its methods all in real time.
    image
  4. There are a few other features that I don’t use very often. All of them are accessible by the right-click content sensitive menu:

Configuration

Like all DXCore plugins, you can access to the configuration by pressing ALT+CTRL+SHIFT+O combination. I like to check all my options to Sandcastle because that’s the tool that I will be using to create the final XML documentation.

image

kick it on DotNetKicks.com

Shout it

Bookmark and Share

New Year’s Resolutions for 2010

January 8, 2010
by Stefano Ricciardi

The new year has just started and it’s time for me to share my professional life resolutions for the upcoming year.

Through books, articles, blogs, podcasts, one hears about that language, or that technology, or that process which would be great to try and learn. Unfortunately, since the spare time is not infinite, one has to make choices and concentrate on what might give the best return on investment in the short/medium term. The following are the two or three things which I have chosen to dive in this year:

Read the Blue Book

Domain-Driven Design by Eric Evans is one of the best book that I have come across on software design in a while. Not always an easy read (some say it’is “dense”), I am going through it slower than usual: every chapter is full of sound advices and deep concepts that take a while to sink in.

Luckily in my current project I will have the opportunity to apply many concepts from this approach. For this reason alone, this makes to the top of my list for 2010.

Learn Ruby

Ruby Logo2009 has been for me the year of C#. The Pragmatic Programmer suggests to both to learn a new language every year and getting familiar with one scripting language. Most experts seem to agree that learning a language with a different paradigm from the one you use everyday is a big plus. Martin Fowler (who favors Ruby) states that:

[...] programming languages do affect the way you think about programming, and learning new languages can do a lot to help you think about solving problems in different ways. (It’s important to learn languages that are quite different in order to get the benefit of this. Java and C# are too similar to count.)

I am not expecting to become proficient with Ruby in the near future (after all, I will still be using C# in my every-day at work). However from what I have seen so far it really looks like a great language to learn, so I am looking forward to it.

Play with Subversion

SubversionCrop In my previous job at Motorola I was developing in a mixed Unix and Windows environment; Rational Clearcase Multisite was the company-wide version control tool. Clearcase is a real heavy weight, and probably one of the few tools that can handle teams of hundreds of developers located anywhere word-wide.

When I landed my current job I had to switch to the much more limited (and widely hated) Microsoft Source Safe (hey… always better than no version control at all, right?) Luckily, rumors has it that we might soon migrate to Subversion.  Subversion is widely used in the open source community and I guess I’ll need it once I start playing with Ruby and downloading libraries etc…

Other Books to Read

Beside the blue book, there are a few other books that I plan to complete reading this year. I have already started Clean Code and Pragmatic Thinking and Learning. Next on my list is Working Effectively With Legacy Code and Agile Estimating and Planning. I promised myself not to buy any more book before I clean my current queue!

Stuff Left for 2011

As I mentioned, there are so many other things I would love to investigate and play with, but there is only so much time available, considering that 2010 will bring in .Net4.0 and C#4.0 that will surely be a priority.

Therefore, the following I guess will have to wait till 2011:

  • Learning a functional programming language (possibly Haskell or F#)
  • Getting familiar Domain Specific Languages (Martin Fowler is preparing a book on the topic)
  • Play with Android and/or iPhone development
  • The Next Big Thing from 2010!
Photo of the stack of books by Steve Wilhelm (http://www.flickr.com/photos/stevewilhelm/ / CC BY-NC-SA 2.0)

kick it on DotNetKicks.com

Shout it


Bookmark and Share

Best of 2009

December 18, 2009
by Stefano Ricciardi

It’s been a little more than 6 months that I have started blogging and it’s already time to look back and have a small retrospective. All in all, it’s been a lot of fun putting together post after post.

I haven’t got a strict publishing schedule, and I tend to prefer quality over quantity.
That being said, not all posts are created equal and inevitably some received greater attention than others. Here’s a little list of the posts that have ranked higher in my stats.

Visual Studio 2008

Overall, posts related to Visual Studio tend to gather a lot of audience. The post on the shortcuts is ranking number 1 in my statistics. A sign that many developers still prefer to move around using the mouse as little as possible. And so do I.

Design By Contract

During the summer I have started investigating Microsoft’s way to Design By Contract, that is Microsoft Contracts. These introductory articles have received their fair share of visitors.

WCF

Moving files around with WCF seems to be a pretty common task, yet there have been very little posts on this topic on the net. Therefore once I managed to put together a workable solution, I shared my implementation so that others may pick it from there and adjust to taste. As expected, these two posts have become a hit.

Service Locator

In one of my projects I have found myself in the need of creating a tiny service locator. I didn’t want to bring in our company’s full fledged IoC container in this case, to keep depenencies to a minimum. This series of post describing that little implementation have been fairly succesful.

Reviews

I am currently reading many technical books at the same time. One of the best of the group has been the The Pragmatic Programmer. Despite being a recent post, this one is already ranking very high, possibly because of the recent surge of interest around the sofware craftsmanship movement.

kick it on DotNetKicks.com


Shout it


Bookmark and Share

Technorati Tags: