Aug 022011
 

As a WPF developer, I often find myself trying to debug the visual structure of my applications or to find out why something doesn’t work as expected. The Visual Studio debugger can help up to a certain point, but for runtime visual debugging it lacks the necessary features. Luckily, there is an awesome free tool that you can use for this – Snoop. The tool itself is very straightforward – you select your running application press a button and you can see the whole visual tree:

Continue reading »

Feb 122011
 

 

Pentru cei care nu au reusit sa ajunga la intalnirea Ronua Sibiu din Noiembrie, puteti gasi aici slide-urile de la prezentarea pe care am tinut-o legat de dezvoltarea de aplicatii complexe Silverlight si/sau WPF folosind Microsoft Patterns & Practices PRISM. In slide-uri sunt prezentate recomandarile ce constituie PRISM, precum si elemente arhitecturale ce pot fi folosite in realizarea aplicatiilor composite.

Continue reading »

Feb 122011
 

 

In this blog post I am presenting a simple validation framework that you can reuse in your code. Also I will be putting here two code snippets that will make it easier for you to add preconditions to your code.

When Visual Studio 2010 was first realeased, one of the features that I expected the most was code contracts. Unfortunately after including them in one of my large projects, it became more clear that at this moment it is not mature enough to be used. Build time increases rapidly when having a lot of source code files and using the code contracts. Enabling static contract validation is even worse, almost doubling the build time on an average development machine.

All that being said, I really like the code contracts way of specifying preconditions. Most of the time I don’t use post-conditions, but being able to specify validation criteria means that the code will be more robust.

Continue reading »

Jul 232010
 

[Romana]

Puteti descarca de la adresele de mai jos prezentarea Moles si proiectul demo:

Cerinte minime pentru proiectul demo:

– Visual Studio 2010 Professional

– Moles plug-in (http://research.microsoft.com/en-us/projects/moles/)

Astept comentariile voastre si feedback.

Disclaimer: Nu lucrez pentru Microsoft si nici nu sunt implicat in vreun fel in dezvoltarea acestui proiect. Notele si proiectul demo reprezinta punctul meu personal de vedere.

[English]

You can download my Moles presentation and demo project from the links below. Unfortunately at this moment the presentation is only in Romanian but I will translate it and provide an English version the next few days.This is a translation of the original presentation in Romanian

Minimum requirements for running the demo:

– Visual Studio 2010 Professional

– Moles plug-in (http://research.microsoft.com/en-us/projects/moles/)

I am waiting for your comments and feedback.

Disclaimer: I am not working for Microsoft, nor am I involved in this project. The slides and demo project are strictly my point of view and I am doing this to share something that I feel can be useful.

Shout it

May 112010
 

This is the third part of a series covering code generators in Visual Studio 2008. Part I and part II of this series cover how to create the project and all the necessary steps for writing a code generator.

The series is divided into four parts:

Part I  – creating a Visual Studio Package

Part II  – creating and registering a code generator

Part III (this one) – generating code & debugging

Part IV – creating the setup project and deploying the package

Continue reading »

May 102010
 

In the first part I’ve written about creating a code generator in VS2008 to eliminate repetitive coding.

The series is divided into four parts:

Part I  – creating a Visual Studio Package

Part II (this one) – creating and registering a code generator

Part III – generating code & debugging

Part IV – creating the setup project and deploying the package

So let’s jump directly to the problem at hand:

Continue reading »

May 072010
 

I am a big fan of the DRY principle. This means that whenever I can do something that can be reused with minimal or no effort, I try to do it. Recently I’ve started developing a REST framework for our projects, which is not based on WCF (will blog about this too). One of the most problematic areas is how to create service proxies easily without having to duplicate loads of code, but at the same time maintain maximum flexibility. After going through several options, the most attractive is creating a Visual Studio custom code generator.

Since there are almost no resources (and the existing ones are very blurry) I’ve decided to create a series of blogs that will be a guide to creating custom code generators, followed by some other posts with real examples and solutions to problems.

The series is divided into four parts:

Part I (this one) – creating a Visual Studio Package

Part II – creating and registering a code generator

Part III – generating code & debugging

Part IV – creating the setup project and deploying the package

*DISCLAIMER* – Even if everybody is in the new VS2010 hype, I still think there are a lot of developers that are and will be working in VS2008 for a while.

Continue reading »