Rockford Lhotka

 Monday, January 25, 2010

codemastery It is hard to believe that in just over 2 weeks I’ll be in Boston for the exciting Code Mastery event!

On Feb 11, at the Microsoft office in Waltham there’s this FREE two track technical event covering topics like Silverlight, SharePoint development, BizTalk, TFS, CSLA .NET and coding best practices.

Time is growing short, and seats are filling up, but there’s still space left. Head over to, check out the agenda and register today!

Monday, January 25, 2010 2:33:06 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, January 22, 2010

It is no surprise (to me) that Windows 7 is enjoying rapid and early adoption, already exceeding the install base of all Mac OS versions combined:

Windows 7 is pure joy. It is fast, stable, efficient and just plain fun. I wasted no time getting all my XP and Vista machines up to Win7, and I haven’t looked back once (except with relief that I got away from Vista).

Additionally I took the opportunity to switch all my physical machine installs to Win7 x64, so I can fully exploit the 4 or 8 gigs of RAM they possess. Interestingly enough, even all the games I enjoy work fine – and they are often the apps that have the most compatibility issues. But not in Win7 – I’m enjoying all my favorite games (for the curious: Supreme Commander, Left 4 Dead (1 and 2), Deus Ex, TF2, CivIV and a few others).

But as a Microsoft go-to guy, perhaps the single biggest thing for me is that when people ask if Windows 7 is any good I can immediately, honestly and joyfully answer “absolutely yes!!”. It has been a couple years since I could do that, and it feels so good! :)

Friday, January 22, 2010 11:38:57 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, January 13, 2010

I’m often asked whether CSLA .NET supports the MVC, MVP, MVVM or other “M” patterns.

The answer is an absolute YES! Of course it does, because CSLA .NET is all about the “M”.

The “M” in all these patterns stands for Model – the business layer that is supposed to encapsulate all your business logic and the data required for that logic to work.

Since its inception 13+ years ago, CSLA has been primarily focused on helping people build a powerful business layer composed of business domain objects. This implies strong separation of concerns where UI issues are (as much as possible) kept out of the business layer, as are data access concerns.

The various “M” patterns also support separation of concerns. Their perspective is from the UI level, as they are all UI patterns. But at the core of each of them is the idea that the “M” should encapsulate all the business logic, business processing and data required to perform that processing.

Whether you want a Controller-View or a Presenter-View or a View-ViewModel to organize your UI code, in every case you need a clearly separate Model against which the UI will work.

CSLA .NET 3.8 specifically added a bunch of features to simplify the use of MVVM in Silverlight and WPF, but that’s just simplification. MVVM worked fine without those enhancements, it is just a little easier now. Of course you still need an MVVM UI framework, because CSLA isn’t about the UI, it is about the Model.

CSLA .NET 3.8.2 includes a CslaModelBinder for ASP.NET MVC. Again, this simplifies one aspect of using ASP.NET MVC for your UI framework, but it isn’t strictly necessary – it just makes life easier. The same rule applies, CSLA isn’t a UI framework and so does as little as possible at the “V” and “C” level because its focus is all about the “M”.

Wednesday, January 13, 2010 12:39:46 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, January 11, 2010

If you are doing Silverlight development and have SL unit tests, you should probably take a look at StatLight.

As CSLA .NET developers are aware, when we created CSLA .NET for Silverlight we had to create our own unit test framework, which we made as a separate open source project called UnitDriven.

Creating UnitDriven was necessary to allow us to write exactly the same test code to run on both .NET and SL. After all, CSLA .NET works the same (mostly) on both platforms, so having a unified set of tests was critical. And since SL requires a lot of async testing, we also needed a way to implement async unit tests that are exactly the same on .NET and SL.

The big drawback with UnitDriven is that it has an interactive runner – you actually run the SL test app and run the tests by clicking a button. Very nice in some ways, but not useful for continuous integration (CI). And having CI is so very nice…

StatLight works with numerous technologies, including UnitDriven, and enables CI with Silverlight. Absolutely worth checking out!

Monday, January 11, 2010 3:32:31 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, January 7, 2010

Miguel Castro has kindly compiled a chm help file from the 3.8.2 source code, and it is now available on the CSLA .NET download page – click here.

Thanks Miguel!!

Thursday, January 7, 2010 3:36:34 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

Here’s an episode of Spaghetti Podcast about the Microsoft PDC – I’m one of the people being interviewed.

Thursday, January 7, 2010 2:55:13 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

I’ve been working in the VS10 beta trying to get my unit tests converted from nunit to mstest. Overall that went very smooth and easy thanks to some great foresight on the part of the Magenic guys who put together most of the tests.

But I keep running into issues where random tests fail due to a file IO exception:

“a procedure imported by System.Transactions could not be loaded”

The same tests may fail or work seemingly at random. After chasing this far too long, I think I’m going to assume it is a .NET 4 beta bug and just live with it for now. I can’t see where it is my code, since this code is unchanged from .NET 3.5 to 4.0, and any given test will pass around 90% of the time and fail around 10% of the time – and they only fail when run in groups of tests – so I strongly suspect something is messed up in the .NET type loader or something along that line…

Frustrating though – hopefully the next release of VS10 will magically resolve the issue.

Thursday, January 7, 2010 12:05:01 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, January 5, 2010

MAG hires I am working with Magenic to organize an exciting new event – the Code Mastery events.

The first (of hopefully many) is in Boston on Feb 11.

This is a full day event, with two tracks of FREE CONTENT – deep dive technical content. We’re talking Visual Studio 2010, .NET 4.0, TFS, SharePoint, SQL Server and BizTalk Server – great stuff!!

We’ve lined up an amazing set of speakers, pulling Microsoft MVP’s and authors from Magenic’s national and New England consultants. These are people who are using the technologies day in and day out and who really know what they are talking about.

For my part, I’ll be talking about how 2010 is shaping up for developers, with VS 10, .NET 4, Silverlight 4 and other cool technologies. And I’ll be talking about CSLA .NET for Silverlight, and showing how incredibly powerful and fun it can be to build Silverlight applications when using CSLA .NET.

Space is limited, and if you live in the New England area you won’t want to miss this great educational opportunity!

Go to the site, check out the content and register today!

Tuesday, January 5, 2010 5:02:05 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, December 29, 2009

csla_net_videos For those who have purchased the CSLA .NET Core 3.8 video series, you'll be happy to know that segment 6 (Authentication and authorization) is online, along with associated sample code.

This completes the core video series. As we move into 2010 I plan to produce separate UI-specific videos covering WPF, ASP.NET MVC, etc, so watch for those.

If you haven't purchased the CSLA .NET Core 3.8 video series, there are only two days left of the special pre-release pricing. And only two days left for the holiday discount on the CSLA .NET for Silverlight video series.

So if you want to save 15% to 33% off regular pricing, buy the video series before the end of 2009!

Tuesday, December 29, 2009 12:42:01 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Sunday, December 20, 2009

Part 5 of the Core CSLA .NET 3.8 video series is now available from the download page.

This video segment covers business and validation rules in CSLA .NET. This includes discussion of the .NET DataAnnotations attributes, along with synchronous and asynchronous rule methods, rule priorities, short-circuiting and a whole lot more.

The business and validation rule subsystem is one of the most important and compelling features of CSLA .NET, and even seasoned users of the framework are likely to learn some new things by watching this video!

If you haven’t purchased the video series yet, please go to – and don’t wait, because the special 33% discount pricing only runs through the end of 2009!!

Sunday, December 20, 2009 11:49:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer