Friday, January 25, 2008

South Florida Code Camp 2008

Yet another totally free event organized by developers for developers in South Florida will take place next Saturday, February 2nd, 2008. Dave Noderer and crew filled up the agenda with 72 sessions (That's right 72!) divided in 12 tracks. For full information go to

On this code camp I have two sessions. One topic, split in two parts. The somewhat clunky name Utilizing Visual Studio 2008 capabilities for better SharePoint Development comes as a result my work on several projects in the last months and some of the exiting new features of Visual Studio 2008. I tried to find an answer to questions such as:

  • How to use Visual Studio Web Designer to create certain types of SharePoint UI elements?
  • How to structure my projects, so that I can easily test the components outside of SharePoint?
  • How to structure my projects and what community tools to use, so that I have to think less about the process of creating SharePoint solution files?

These are all big questions when it comes to the transformation of SharePoint to an actual development platform. To answer these an other challenges of Sharepoint development I am going to demonstrate how to integrate an existing information system with SharePoint without compromising quality or scalability. The four topics I am going to address are:

Part 1

  • SharePoint infrastructure, or how to reduce the time and maintenance of SharePoint specific deployment and plumbing.
  • UI design, or how to use Visual Studio 2008 web designer and new CSS features to easily create SharePoint layouts pages and web parts.


  • Testing SharePoint solutions, or how to take most out of the newly added testing capabilities in Visual Studio 2008 Professional.
  • ASP.NET AJAX Extensions in SharePoint, or how to use it and how to automate the configuration of this ASP.NET extension.

To spice things up Apress provided several copies of Workflow in the 2007 Microsoft Office System by David Mann.

So if you are in the area come and join the geek crowd. Here is the location:

Devry University
2300 SW 145th Avenue Miramar,

FL 33027


Thursday, January 17, 2008

Using ASP.NET development server for testing with WatiN

For many ASP.NET and Sharepoint developers WatiN ( ) has become a frequently used tool to create functional tests and eliminate manual testing as much as possible. In my environment I use WatiN from within NUnit tests. To integrate all of these components in my Visual Studio setup, I also use, a plug-in that supports most of the commonly used testing frameworks and among other things makes it possible to right-click within the code of the test and execute it with or without debugging.

This is all great, but how do I make sure that (1) the tests run independently and there are no leftovers from previous test sessions and (2) that the tests ca run with minimum configuration, preferably no configuration at all - simply build and run.

The ASP.NET development server (Cassini) comes to the rescue. This great application is always available and there is no configuration required to run any ASP.NET site at all. If only I can start Cassini in the beginning of each test run and then in my test open a new browser session for each individual test and close it after the test is completed!

Jesus Jimenez has a great article on Code Project (, but the way he structured the SetUp() starts and stops the dev server for each test. Since I prefer to have more small tests rather than only couple of big, stopping and starting the ASP server seems unnecessary and not efficient.

The key here is that in the test run setup [SetUp] I prefer to detect if Cassini runs on the predefined port used for testing. If it is, we just keep going. If it is not we start a new instance of the development web server.

Other than that the test structure remains the same. For each test we open a new IE session and close it in the test tear down. Here is some code:

public class TestTemplate
private const string devServerPort = "12345";
private const string homePage = "default.aspx";
private IE ie;
private string rootUrl;
private string homePageUrl;

public void SetUp()

bool IsWebStarted;
rootUrl = string.Format("http://localhost:{0}", devServerPort);
homePageUrl = string.Format("{0}/{1}", rootUrl, homePage);
// Check if Dev WebServer runs
ie = new IE(rootUrl);
IsWebStarted = ie.ContainsText("Directory Listing -- /");
IsWebStarted = false;

if (!IsWebStarted)
// If not start it
string command = Path.Combine(

string rootPath = Environment.CurrentDirectory.Substring(0, Environment.CurrentDirectory.LastIndexOf('\'));
string commandArgs = string.Format(" /path:"{0}" /port:{1} /vapth:/", rootPath, devServerPort);

Process cmdProcess = new Process();
cmdProcess.StartInfo.Arguments = commandArgs.ToString();
cmdProcess.StartInfo.CreateNoWindow = true;
cmdProcess.StartInfo.FileName = command;
cmdProcess.StartInfo.UseShellExecute = false;
cmdProcess.StartInfo.WorkingDirectory = command.Substring(0, command.LastIndexOf('\'));

// .. and try one more time to see if the server is up
Assert.IsTrue(ie.ContainsText("Directory Listing -- /"));

// Give some time to crank up


public void TearDown()

public void TestInstantiate()
// insert test logic here


This shaves some time from the testing process, which for longer test sequences might be a significant gain.


Joe Healy and Visual Studio 2008 come to Melbourne

If you are a software developer or IT Pro don't miss the opportunity to learn about the latest improvements in Visual Studio 2008 from the source. Joe Healy is the regional Microsoft Evangelist developer and editor of the regional MSDN newsletter.

When: January, 22nd @ 6:30PM

Where: Charlie and Jake's on Whickham Road in Melbourne

To register visit

If you are interested to put the announcement on a bulletin board in your company, university or college you can download the form from here

We'll be raffling couple of new books and you can also get your copy of Code magazine while they last.

See y'all next Tuesday.


Wednesday, January 09, 2008

Impressions from Visual Studio 2008

Last week I was able to finally use VS 2008 in a real project. I was working on some web parts and ASP.NET controls and it is great to be able to use some of the improvements in the web development environment.

#1 on my list is the CSS management and the improved design time support. Now we have the split view, so you can actually see code and design at the same time. The design view also has a notably faster rendering speed, which is just great.

On the CSS side...How many times have you tried to create a fully CSS compliant page using style sheet for positioning instead of tables in VS 2005? It was a real pain. The editor would not update the style for the object, but insert a style attribute defying the whole purpose of using CSS. Positioning objects using relative or absolute positioning required a lot of switching and tweaking.

Not anymore! Once you assign the class or the CssClass attribute respectively to a HTML or ASP.NET control the editor will automatically apply style changes even if they are in a separate file. It is also very easy to apply multiple styles or track down the order, in which they are applied.

Now this is an environment that really encourages developers to finally drop the archaic table positioning and easily create CSS compliant controls and pages.


Thursday, January 03, 2008

Microsoft MVP Award

A day ago I received an E-mail from Microsoft that I have received the 2008 MVP Award for Microsoft Office SharePoint Server. What a great start of the new year! This award is a great recognition for my SharePoint sessions on several code camps in Florida, my blog and other work I have done in the developer community. It is also a great motivation for what I have in mind for the upcoming 2008.

I would like to thank Ken Tucker, Joe Healy and the Florida developer community for organizing many great events and ultimately giving an opportunity to local developers like me to grow professionally and have fun doing it.

In the next couple of months I plan to build upon my experience in 2007 and attend several code camps as attendee and speaker. In addition I'll be looking into opportunities to write more extensively as a book reviewer, technical editor or author. Apress and other publishers have great user group programs, which I hope will bring me closer to this goal. I also plan to work on the much needed makeover of my site. I was postponing this for a while, but finally I am going to take Verio's generous web hosting offer for Microsoft developers and create a site that better meets the needs of my work.

Looks like a lot of fun, doesn't it!

For more information about the MVP Award visit: