Rockford Lhotka

 Wednesday, April 25, 2012

I think this is interesting:

It is particularly interesting to me, because I’ve been publishing my ebooks and videos DRM-free for several years now, and have recently been thinking about rethinking my stance on DRM.

Specifically because there really is a lot of piracy. This does include being able to find my content on criminal warez sites, but that’s actually not my concern. My primary issue with piracy is that it is too easy for companies that use CSLA .NET to buy one copy (technically a content license for one person) of my books/videos and to then share that content with their entire development team.

Although that is technically a criminal act, I don’t think most development team managers intend to be criminals. I think they intend to be frugal. I can hear the discussions in my head: “If he really meant for us to buy a copy for each developer he’d have made it harder to copy.” Or variations on that theme.

(yes, I’ve worked in business too – for around 25 years – and I know exactly how these conversations unfold)

The reality is this: I believe most people are basically decent. I also know for a fact that DRM punishes honest consumers, and does little or nothing to stop true criminals.

So I’ve chosen for years to be DRM-free. This way an honest consumer who buys my content is able to get a PDF or WMV file that they can easily read/watch on nearly any device, as they choose. No worries about licenses expiring or losing keys or passwords.

And the fact is, that if I did use DRM, the really bad guys would crack the DRM in a matter of hours or days, and the content would still be on criminal warez sites.

I’ve been rethinking my stance on DRM, because it would encourage otherwise basically decent people to actually buy the required number of copies of the content.

And yet I really don’t want to cause pain to honest consumers by using DRM. So I’m torn.

I tweeted the other day that I am considering releasing some future “ebook” content as a Windows 8 Metro style app. Not as a PDF, but literally as an app. It is an interesting idea, because it would basically force each developer to purchase their own copy of the content (or share their Microsoft Live ID passwords with each other), and yet wouldn’t technically be DRM. The app would just work – no keys or passwords to lose or expire – because once you buy a Windows 8 app from the Microsoft Store, you own the app and there’s no muss or fuss.

There are drawbacks to this. As someone pointed out, not all CSLA users are on Windows (especially now that we support mono for Android, Linux, and OS X). And I’d have to write an app in addition to creating the content – not as simple as writing the content as a Word document obviously.

So I’ll be very interested to see what Tor Books finds out as they release all their books DRM-free. Will they dodge the DOJ/Apple/Amazon legal/distribution traps as they are trying to do? Will their content be pirated more than it already is? In short, it will be interesting to see if this turns out to be a win, loss, or draw for them over time.

In the meantime, I’ll keep working on CSLA version 4.5 and thinking about whether to remain DRM-free, go with DRM, or perhaps build a “book as an app”.

Wednesday, April 25, 2012 4:27:19 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, January 25, 2012

I am pleased to announce that the Using CSLA 4: Windows Phone ebook is now available for purchase.

If you purchased the Using CSLA 4 ebook series you already own the book, and can download it now.

This ebook (in PDF format) demonstrates how to create a Windows Phone 7 (WP7) application that uses a business layer created using CSLA 4. This ebook also demonstrates the use of the MVVM (Model-View-ViewModel) design pattern in a way that is very complementary to the capabilities provided by CSLA .NET business objects, resulting in an application that is easy to build and maintain with clear separation of concerns between the XAML-based view, the interface control code in the viewmodel and the model composed of CSLA-based business objects. This ebook also makes use of the open-source Bxf MVVM UI framework.

The ebook includes a sample application demonstrating the concepts and techniques discussed in the book.

Here’s the high level content outline:

  1. Introduction
  2. Windows Phone
    1. About Silverlight
    2. Windows Phone Application Model
    3. Silverlight Navigation
    4. ApplicationBar Control
    5. Overview of XAML
  3. MVVM Design Pattern and CSLA 4
    1. MVVM Design Pattern overview
    2. Bxf MVVM Framework
    3. Main Shell Implementation
    4. CSLA .NET Windows Phone features
  4. Business and Data Access Layers
    1. Responsibility-driven design
    2. Domain overview and implementation
  5. Application Implementation
    1. Windows Phone project setup
    2. Main shell implementation
    3. User scenarios
Books | CSLA .NET | WP7
Wednesday, January 25, 2012 5:35:03 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, June 7, 2011

The final draft of the Using CSLA 4: ASP.NET MVC ebook is now online, and available for purchase.

If you own the Using CSLA 4 ebook series, you already own this new ebook and can download it from

If you are buying the ebooks individually, the new book is now available for purchase from

This ebook also includes a code download, containing the latest ProjectTracker codebase. This includes the Mvc3UI project: an ASP.NET MVC 3 application built using the CSLA .NET business layer.

Books | CSLA .NET | Web
Tuesday, June 7, 2011 3:50:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, March 11, 2011

The full draft of the Using CSLA 4: Data Access ebook is now online and available for individual purchase.

If you purchase, or have purchased, the Using CSLA 4 ebook series, you can also download this new ebook, because it is part of the series.

This 214 page ebook (in PDF format) covers the four data access models supported by CSLA .NET, focusing on the two models that provide the best maintainability and flexibility without incurring undo complexity.

The book walks through each business object stereotype, demonstrating how to implement the encapsulated invoke and factory implementation data portal models. It also demonstrates the use of ADO.NET, ADO.NET Entity Framework, and mock database access technologies.

The book includes several sample applications that provide complete implementations of persistence to accompany the concepts and techniques discussed in the book.

Friday, March 11, 2011 3:19:12 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, January 4, 2011

The completed first draft of the Using CSLA 4: Creating Business Objects ebook is now online and available for purchase. UsingCsla4-02-120

If you’ve purchased (or now purchase) the Using CSLA 4 ebook series you’ll also have access to this new ebook.

This is book 2 of the series. The next book will be Using CSLA 4: Data Access, followed by Using CSLA 4: Security. These first four ebooks cover all the core concepts around using CSLA 4 to build your business layer, along with various options for building a data access layer and implementing authentication.

After these four are complete I’ll move on to ebooks covering how to use a CSLA .NET business layer to create applications with different types of UI, including Silverlight, WPF, ASP.NET MVC and Windows Phone 7 (WP7).

Here’s the top-level outline of the Creating Business Objects book’s contents:

  1. Introduction

  2. Key Object Concepts

    1. Stereotypes

    2. Serialization

    3. Object Lifetime

    4. Object Relationships

    5. Object Identity and Equality

    6. Platform Differences in .NET and Silverlight

    7. Property Declarations

    8. Method Declarations

    9. Metastate

  3. Solution Structure

    1. Project Types and Assembly References

    2. Combining Project to Create Solutions

  4. Object Stereotypes

    1. Editable Objects

    2. Read-Only Objects

    3. Execution Objects

    4. Criteria Objects

    5. LINQ Types

    6. Windows Forms Types

  5. Business Rules

    1. Business and Validation Rules

    2. Authorization Rules

For those who are wondering, the first ebook is almost through the editing process and the “draft” designation will then be removed.

Tuesday, January 4, 2011 5:41:03 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, December 10, 2010

I just put CSLA 4 version 4.1 beta 2 online for download. This is probably the last beta release of version 4.1, so please download and try it – I appreciate any help I can get in testing these releases.

The primary changes in beta 2 include:

  1. Added a new Csla.Xaml.PropertyInfo control for WP7, WPF and Silverlight that is like PropertyStatus but totally non-visual. See the Samples\NET\cs\SimpleNTier solution’s WP7 UI project for an example of how this works
  2. Created a copy of the DataAnnotations functionality for WP7; this is a nice concept that Microsoft didn’t put into WP7, so I ported the parts of System.ComponentModel.DataAnnotations required by CSLA .NET, so if you have classes using DataAnnotations attributes in .NET or Silverlight, that code will now work in WP7 as well
  3. Laying the groundwork for a NuGet installer when 4.1 is released, so people will be able to download and install CSLA 4 via NuGet (thanks Jaans!)
  4. Laying the groundwork for a vsix installer for Visual Studio templates, so when 4.1 is released we can add this to the Visual Studio gallery (thanks Jonny!)

I’ve also put an updated draft of Using CSLA 4: Creating Business Objects online at

This ebook is incomplete, but I’m providing work-in-progress drops of the book as I work on it. People who’ve purchased the entire Using CSLA 4 ebook series (from can download this pre-draft content. This new drop includes a lot more content than the previous drop – including the entire sections on declaring and implementing properties and methods, and a good start on the metastate fields/methods available from BusinessBase and other base classes.

Finally, I also put a top level type diagram online that is available to anyone who has purchased either the Using CSLA 4: CSLA .NET Overview ebook or the entire ebook series. It is available from the same web page.

Books | CSLA .NET | WP7
Friday, December 10, 2010 3:25:51 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, November 22, 2010

The first ebook in the Using CSLA 4 ebook series is now available.

Using CSLA 4: CSLA Overview

This ebook (in PDF format) is an introduction to CSLA 4, and will provide you with an overview of the framework, its goals and its most basic usage scenarios. All other ebooks in the Using CSLA 4 ebook series assume you have read this first ebook and understand the overall architecture and philosophy of the CSLA .NET framework.

You should also be aware that the Using CSLA 4 ebook series is also available for purchase, and it will be cheaper to buy the series than every individual ebook. Obviously right now purchasing the series only gets you access to the first book, but you'll gain immediate access to all subsequent books in the series as they come online.

Monday, November 22, 2010 2:02:49 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

This is the proposed outline for the Using CSLA 4 ebook series. This is subject to change, but it is the outline I’m working against at the moment as I set up packaging and pricing for the ebooks and the ebook series.

The plan is to publish seven ebooks, and each will be released in PDF format for reading on the PC or any other PDF reader.

As a special note: I have not yet found a practical way to publish in native format for the Kindle because the Kindle can’t support different fonts or tables. And believe me, I really want this on the Kindle because I love, love, love my Kindle!! But I can’t delay publishing the content while I continue to try and find a cost-effective way to create a specific Kindle version.

You will be able to purchase each ebook individually, or purchase the entire ebook series. Purchasing the series will be cheaper than buying each book individually.

Individual books will be available for purchase as they enter the draft/review phase, and will be updated as corrections are made. I am doing this to get the content out as quickly as possible. If you don’t want a draft, wait until the DRAFT designation is removed from the description of the item on the store (

If you purchase the series, you will automatically gain access to each book as it enters the draft/review phase. In other words, you are buying future access to the entire series ebooks as they come out.

Here’s the current proposed outline for the series:

  1. Using CSLA 4: CSLA .NET Overview
    1. Introduction and Installation
    2. Architecture and Philosophy
    3. CSLA .NET framework design overview
  2. Using CSLA 4: Creating Business Objects
    1. Stereotypes
      1. Editable root/child
      2. Editable root/child list
      3. Dynamic list/root
      4. Read-only
      5. Read-only list
      6. NameValueList
      7. Command
      8. Unit of Work
    2. Object metastate
      1. IsNew, IsDirty, IsValid, etc.
    3. Property declarations
      1. PropertyInfo metastate field
      2. Managed backing fields
      3. Private backing fields
      4. Child object references
      5. Lazy loading of child objects
    4. Business rules
      1. Business rules
      2. Validation rules
      3. Authorization rules
      4. Sync/async rules
      5. DataAnnotations attributes
  3. Using CSLA 4: Data access
    1. Data access models
      1. DP_XYZ invoking DAL
      2. Factory objects as DAL
      3. DP_XYZ as DAL
      4. Factory objects invoking DAL
    2. Data access technologies
      1. ADO.NET
      2. ADO.NET Entity Framework
      3. OData services
    3. Data portal
      1. N-Tier
        1. 1-, 2-tier
        2. 3-tier
        3. 4-tier (Silverlight, WP7)
          1. MobileFactory
    4. Configuring the client
    5. Configuring the server
      1. IIS
      2. Windows Server AppFabric
      3. Windows Azure
    6. Using compression in Silverlight
  4. Using CSLA 4: Security
    1. MembershipProvider authentication
    2. Windows authentication
    3. Custom authentication
    4. IAuthorizeDataPortal
  5. Using CSLA 4: Silverlight 4 and WPF
    1. Development basics
      1. WPF
      2. Silverlight
    2. MVVM design pattern
      1. Basic XAML Framework (Bxf)
      2. TriggerAction
    3. Data binding
    4. ViewModelBase/ViewModel
    5. PropertyInfo/PropertyStatus
    6. Platform specifics
      1. WPF
      2. Silverlight
  6. Using CSLA 4: ASP.NET MVC 3
    1. ASP.NET MVC development basics
    2. Controller (Csla.Web.Mvc)
    3. CslaModelBinder
    4. Html authorization helpers
  7. Using CSLA 4: Windows Phone 7
    1. WP7 development basics
    2. MVVM design pattern
      1. Basic XAML Framework (Bxf)
      2. TriggerAction
    3. Data binding
    4. ViewModelBase/ViewModel
    5. PropertyInfo
Monday, November 22, 2010 11:01:22 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, November 8, 2010

This is a bit of a teaser, but I want to keep people posted on my progress.

I’m getting very close to finishing the first, and in some ways hardest, book in the CSLA 4 ebook series.

Overview Cover

It is arguably the hardest of the ebooks to write, because this is around 125 pages explaining the architecture, goals and basic design parameters of CSLA .NET. Lots of concepts, not so much code. While I’m still working on this, and will be for a few more days, here’s the rough outline:

  1. Introduction
    1. About this ebook and the ebook series
    2. Downloading, installing and building CSLA 4 and its samples
  2. Architecture and Philosophy
    1. Logical and Physical architecture
      1. 5 layer architecture
      2. N-tier vs service-oriented
      3. Applying the layers to real scenarios
    2. Managing business logic
      1. Defining a home for business logic
      2. Behavioral object design
      3. Mobile objects
    3. Architectures and frameworks
  3. CSLA .NET Framework
    1. Basic design goals
    2. Framework design
      1. Base classes and stereotypes
      2. Data binding
      3. N-level undo
      4. Business, validation and authorization rules
      5. Data portal
      6. Authentication
      7. Data access helpers
    3. Assembly and namespace organization

The next ebook will be easier and faster to write. Its title? Using CSLA 4: Creating Business Objects.

This current book should be online, in draft form at least, by November 19.

Monday, November 8, 2010 5:10:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, April 26, 2010

I’m looking at how to provide information around .NET 4, Silverlight 4 and CSLA 4.

It is a challenging consideration. Many people like books, and I do to. I could create an Expert 2010 Business Objects book, which would take around 6 months. That means it would be out just about in time for Silverlight 5 to ship. Given the rate of Silverlight releases, conventional books (at least of the ~750 page variety) are too slow.

A lot of people have found my PDF ebooks to be very useful. Each one was around ~140 pages, and there’s no print/shipping/production time. This means they come out much faster – but they are still essentially static content once published, just like a conventional book.

The Silverlight and Core 3.8 video series have also been very popular. Not everyone likes to read, and there’s some real value in watching how things are done in a more dynamic manner. Also, videos take less time to produce than either an ebook or conventional book, so they are potentially more responsive. On the other hand, some people really dislike video content and prefer books.

I think it is safe to say that I’ll continue to produce video content, as that addresses an important set of users and is relatively fast to produce.

But I also think text content is important. It has a different price point, and offers advantages around consumption that just aren’t there with videos.

So the question is how to make text content timely, and at least a little less static – while still recognizing the realities of the amount of work involved.

Most conventional publishers now offer a “beta program” of some sort for their books. Basically you buy the book before it exists, and you get access to draft copies of chapters as they arrive. Once the chapters go through the edit process, you then get access to the final versions.

I’m thinking about doing something along that line for CSLA 4. Create ebook content, perhaps with each chapter as a separate PDF. Put this content on like I do with the videos, and then refresh the PDF files as they go through the revision process.

To be clear, this would be the “How to Use CSLA 4” book, not the “How to Build a .NET Framework” book. The focus would be on using the various features of CSLA to construct a reusable business layer, and how to use the data portal to achieve flexible n-tier deployment and scalability. Nor would it dive into specific UI technologies – I’d do separate ebooks for those.

Basically it will be like the Core 3.8 video series, but in ebook form, and targeting CSLA 4 of course.


Monday, April 26, 2010 12:36:35 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, December 17, 2008



I have released version 3.6 of CSLA .NET for Windows and CSLA .NET for Silverlight.

This is a major update to CSLA .NET, because it supports Silverlight, but also because there are substantial enhancements to the Windows/.NET version.

To my knowledge, this is also the first release of a major development framework targeting the Silverlight platform.

Here are some highlights:

  • Share more than 90% of your business object code between Windows and Silverlight
  • Powerful new UI controls for WPF, Silverlight and Windows Forms
  • Asynchronous data portal, to enable object persistence on a background thread (required in Silverlight, optional in Windows)
  • Asynchronous validation rules
  • Enhanced indexing in LINQ to CSLA
  • Numerous performance enhancements

This version of CSLA .NET for Windows is covered in my new Expert C# 2008 Business Objects book (Expert VB 2008 Business Objects is planned for February 2009).

At this time there is no book covering CSLA .NET for Silverlight. However, most business object code (other than data access) is the same for Windows and Silverlight, so you will find the Expert C# 2008 Business Objects book very valuable for Silverlight as well. I am in the process of creating a series of training videos around CSLA .NET for Silverlight, watch for those in early 2009.

Version 3.6 marks the first time major development was done by a team of people. My employer, Magenic, has been a patron of CSLA .NET since the year 2000, but with this version they provided me with a development team and that is what enabled such a major version to be created in such a relatively short period of time. You can see a full list of contributors, but I specifically want to thank Sergey Barskiy, Justin Chase and Nermin Dibek because they are the primary contributors to 3.6. I seriously couldn't have asked for a better team!

This is also the first version where the framework code is only in C#. The framework can be used from any .NET language, including VB, C# and others, but the actual framework code is in C#.

There is a community effort underway to bring the VB codebase in sync with version 3.6, but at this time that code will not build. In any case, the official version of the framework is C#, and that is the version I recommend using for any production work.

In some ways version 3.6 is one of the largest release of the CSLA .NET framework ever. If you are a Windows/.NET developer this is a natural progression from previous versions of the framework, providing better features and capabilities. If you are a Silverlight developer the value of CSLA .NET is even greater, because it provides an incredible array of features and productivity you won't find anywhere else today.

As always, if you are a new or existing CSLA .NET user, please join in the discussion on the CSLA .NET online forum.

Wednesday, December 17, 2008 4:13:21 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, December 5, 2008

CSLA .NET for Windows and CSLA .NET for Silverlight version 3.6 RC1 are now available for download.

The Expert C# 2008 Business Objects book went to the printer on November 24 and should be available very soon.

I'm working to have a final release of 3.6 as quickly as possible. The RC1 release includes a small number of bug fixes based on issues reported through the CSLA .NET forum. Barring any show-stopping bug reports over the next few days, I expect to release version 3.6 on December 15.

If you intend to use version 3.6, please download this release candidate and let me know if you encounter any issues. Thank you!

Friday, December 5, 2008 10:30:44 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, November 19, 2008

As the Expert C# 2008 Business Objects book becomes available (now in alpha ebook form, and in paper by the end of this year), I'm getting more questions about what book to buy for different versions of CSLA .NET, and for different .NET technologies.

(Expert VB 2008 Business Objects should be out in February 2009. The one unknown with this effort is how quickly the team of volunteers can get the VB port of CSLA .NET 3.6 complete, as I don't think we can release the book until the code is also available for download.)

I do have a summary of book editions that is often helpful in understanding what book(s) cover which version of CSLA .NET. But I thought I'd slice and dice the information a little differently to help answer some of the current questions.

First, by version of CSLA .NET:

CSLA .NET Version Book(s)
3.6 Expert 2008 Business Objects
3.5 <no book>
3.0 Expert 2005 Business Objects &
CSLA .NET Version 2.1 Handbook &
Using CSLA .NET 3.0
2.1 Expert 2005 Business Objects &
CSLA .NET Version 2.1 Handbook
2.0 Expert 2005 Business Objects


Next, by .NET technology:

.NET Technology Book(s)
WPF Expert 2008 Business Objects
WCF Expert 2008 Business Objects
Silverlight <no book yet>
Expert 2008 Business Objects gets you 80% there though
WF Expert 2008 Business Objects &
Using CSLA .NET 3.0 (for WF example)
ASP.NET MVC <no book yet>
ASP.NET Web Forms Expert 2008 Business Objects
Windows Forms Expert 2008 Business Objects &
Using CSLA .NET 3.0 (for important data binding info)
LINQ to CSLA Expert 2008 Business Objects
LINQ to SQL Expert 2008 Business Objects
ADO.NET Entity Framework Expert 2008 Business Objects (limited coverage)
.NET Remoting Expert 2005 Business Objects
asmx Web Services Expert 2005 Business Objects


As always, here are the locations to download CSLA .NET for Windows and to download CSLA .NET for Silverlight.

Wednesday, November 19, 2008 9:17:58 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, November 12, 2008

Expert C# 2008 Business Objects book coverYou can now purchase the "alpha" of Expert C# 2008 Business Objects online as an ebook directly from the Apress web site. This gets you early access to the content, and access to the final ebook content when it is complete.

While their website indicates you can provide feedback during the writing process, the reality with this book is that I'm only three chapters from being completely done with the final review, so it is terribly close to being final already :)

Wednesday, November 12, 2008 8:12:05 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, October 21, 2008

I have released Beta 2 of CSLA .NET 3.6, with support for Windows (download) and Silverlight 2.0 (download).

This is an incremental release. Very few issues have been reported or found with Beta 1a, which gives me hope that we're still on track for a final release in the very near future. A lot of hard work by Sergey, Justin, Nermin and other Magenic colleagues have really paid off in the early stability of this version.

CSLA .NET for Silverlight does include one feature change. The Navigator control is now capable of handling a "cold start" scenario, where the user navigates directly to the Silverlight app, specifying a bookmark on the URL. The Navigator control will now immediately help your app navigate to the correct state so the user effectively returns to the page/control/view they'd bookmarked in the first place.

CSLA .NET for Windows also includes one feature change. Nermin is working hard on integrated Visual Studio file and project templates, and an installer project for the templates (and possibly all of CSLA .NET). This work is not yet complete, but Beta 2 has a much more complete set of behaviors than Beta 1.

We believe that this Beta 2 release is very stable. Please download and use it - on either Windows or Silverlight. If you have questions/comments or find issues, please post in the forum.

Also, check out my DotNet Rocks interview about CSLA .NET for Silverlight.

Finally, for those wondering about the status of the Expert C# 2008 Business Objects book, it is still on track for a December release. Watch, as they tell me that they'll be offering an "alpha release" program where you can pre-purchase the book and get early access to chapters in PDF form, and get the paper book when it comes out.

We are also on track for Expert VB 2008 Business Objects, probably in the February or March timeframe. This is dependent on the 3.6 VB conversion project, which has four volunteers and is moving along pretty well. I feel pretty confident that this will all come together so the framework and book will both be available to the VB community.

Code well, have fun!

Tuesday, October 21, 2008 7:29:29 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, September 11, 2008

A few weeks ago I posted what was basically a request for input on one aspect of the future of CSLA .NET. I got a lot of really thoughtful and useful feedback and input from that post (and a related thread in the forum). I've also been discussing this with Apress and other colleagues, and I've come to a decision.

Starting with version 3.6, CSLA .NET for Windows and CSLA .NET for Silverlight will be maintained in C# only. This will allow me to focus more of my energies on improving the framework, and on providing resources and materials on how to use the framework (in both C# and VB).

In the short term this means continuing to finalize version 3.6 and to finish Expert C# 2008 Business Objects (current availability target is December).

However, I am willing to take some people up on their offer to help maintain the VB version of the framework, if those offers still stand. The idea would be to have the community keep the VB code base in sync with the C# code base as it evolves - at least for CSLA .NET for Windows.

And here's a possible incentive. If the VB code can be brought up to sync by mid-December or so, I will work with Apress to create Expert VB 2008 Business Objects following the C# edition of the book. I really can't do that book in VB unless the framework exists in VB, but if that can happen then I'm pretty sure we can make the book happen shortly thereafter.

Contributors will need to sign a contributor agreement, to keep everything clear and legal. And they'll use the current subversion repository and issue tracking database, so I think it should be a pretty smooth arrangement. And obviously contributors will have the undying gratitude of the community :)

If you are interested in making this happen, please email me - rocky (at) lhotka dot net - and we'll go from there.

I think this should be a good overall solution, hopefully making everyone happy in both the short and long term.

Thursday, September 11, 2008 3:56:23 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, August 20, 2008

I've been thinking a lot about the future of CSLA and of .NET, and I'd like thoughtful input.

The .NET platform is, for lack of a better word, fragmenting. We have .NET, the .NET client-only framework, .NET Compact Framework, Silverlight and probably others. All of these are ".NET", but they are all different.

CSLA will soon support .NET and Silverlight. It sort of supports the Client-Only Framework now, but it was just pointed out to me that while it works, there are compiler warnings in this scenario.

For the past 6 or so years, I've been maintaining all my code twice, once in VB and once in C#. This has never been fun, and wouldn't have been possible at all without help from my colleague Brant Estes and from the Instant VB and Instant C# tools. Even with this, the reality is that I have to do everything twice, and test everything twice.

(yes, I have a unified set of unit tests, but there's a ton of manual testing around data binding in Web Forms, Windows Forms, WPF and now Silverlight that can't be automated)

But now I'm faced with a truly horrific future scenario. CSLA .NET, CSLA Light, possibly CSLA CF and CSLA Client-Only. Four versions of the framework. Two languages for each version. Fixing a single bug requiring changing and testing 8 implementations.

Clearly that's not realistic. Not only would it eliminate any fun, but it just isn't practical. I doubt it would be practical even if I made CSLA a commercial product...

Of course I can cut the complexity in half by maintaining the framework in only one programming language.

This is a touchy thing of course. I was thinking Modula II, but I can't find a good compiler for .NET... :)

Seriously though, the clear choice would be to maintain the framework in C#, at which point I run the risk of alienating the VB community. You might argue I should maintain the framework in VB, but (for better or worse) that would almost certainly alienate a much bigger constituency.

The really important thing is that the framework would support both VB and C#. Regardless of what I do or don't do inside the framework, it can be used by either language (and other languages for that matter) equally well. After all, most of the .NET framework is written in just one language, yet it is used by everyone equally.

Right now CSLA Light is only in C#, though I'm testing in both VB and C# to make sure it supports both equally. I haven't tried, but I imagine you can use it from Ruby or Python too, since both of those languages work in Silverlight too.

Another alternative would be to solicit help from the community. For example, perhaps one or more people would be willing to help keep the VB version of the framework in sync over time. That has its own complications, but might be a worthy solution.

This also ties into my book projects. I'm working on Chapter 16 of 21 for Expert C# 2008 Business Objects right now. As with the previous editions, most of the book is focused on the design and creation of the framework itself, with less focus on how to use the framework.

I think a lot of people would actually prefer a book on how to use the framework, not caring so much how and why I implemented things internally. And I'd enjoy writing that book (in VB and C# editions). But as it is, I'm looking at 2-3 months of work to get CSLA .NET 3.6 working in VB (which will have to wait until the current book is done), then a couple months to get the Expert VB 2008 Business Objects book done. That's 4-5 months where I could write a book on how to use the framework. Or perhaps a series of highly focused ebooks. Or something along that line.

I haven't reached a decision, I'm just thinking long and hard. Thoughtful input is welcome, thanks!

Wednesday, August 20, 2008 3:15:50 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, July 15, 2008

I get a lot of questions about Expert 2008 Business Objects as to what it will and won't cover, so I thought I'd try and answer at least some of them in a blog post.

The book will cover CSLA .NET 3.6. Version 3.6 is the same as 3.5, but with support for CSLA Light and some .NET 3.5 SP1 features (such as the Entity Framework). And along with CSLA Light comes some interesting support for things like an async data portal and async validation rules. But please note that this book will not cover CSLA Light - that's a book by itself, believe me!

Here's the tentative table of contents for the book:

1.     Architecture

2.     Design

3.     Object-oriented design

4.     Supported stereotypes

5.     Stereotype templates

6.     Framework Implementation

7.     Editable Objects and Collections

8.     Data Binding

9.     Business and Validation Rules

10.   Authorization Rules

11.   N-level Undo

12.   LINQ to CSLA

13.   Persistence and the Data Portal

14.   Other Framework Features

15.   Example Business Library

16.   WPF Application

17.   Web Forms Application

18.   WCF Service Application

The items in green are complete - first draft anyway - and so you can get an idea where I am in the process.

Due to space and time constraints, this book will have three UI chapters just like the previous books. So I had to choose which interface technologies to cover - out of the myriad options available:

  • WPF
  • Windows Forms
  • asmx services
  • WCF services
  • WF workflows and activities
  • ASP.NET Web Forms
  • Office/VSTO (Word, Excel, etc)
  • Console

I want to make sure to cover smart clients, web development and services. While WCF and Web Forms were easy choices (though I do like ASP.NET MVC a lot, it isn't mainstream yet), the choice between Windows Forms and WPF was difficult. But I have to give WPF the nod, because it is a really nice technology, and it really shows off the power of CSLA .NET business objects very nicely.

My current plan is to release ebooks that specifically focus on each of the interface technologies not covered in Expert 2008 Business Objects, and some sort of book (ebook or traditional) covering CSLA Light.

Tuesday, July 15, 2008 9:17:28 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, June 23, 2008

A couple people have suggested that I might be abandoning VB. Not so!

My first love was Pascal - VAX Pascal actually, which was more like Modula II in many ways. What an awesome language!

My next love was VAX Basic. Now that VB has structured exception handling in .NET, it has finally caught up to where VAX Basic was in the early 90's. No kidding.

Of course after VAX Basic came VB.

And after VB came .NET. I love .NET. I love .NET with VB and C#. C# is just VB with semi-colons, but VB is just C# without semi-colons too. I gave up on the silly language war thing a couple years ago, and am happy to let either or both language live or die by the hand of its users. The language thing was distracting me from truly enjoying .NET.

When it comes to writing books, it is really important to remember that they fund CSLA .NET. As much as I love what I do, I've got kids that will go to college in the (scarily near) future, so I can't work for free. So when I write a book, I can't ignore that C# books outsell VB books around 3:1 (it used to be 2:1, but the market has continued to shift). I still think it is worth writing a VB edition to get that 25% of the market, but you must admit that it makes a lot of sense to go for the 75% first!

It takes several weeks to port a book from one language to the other. The current plan for Expert 2008 Business Objects in C# is October (though I fear that may slip), and with the conversion time and publication schedule constraints, that pushes the VB edition into early 2009. Apress just hasn't put the VB book on their public release list yet, but that doesn't mean I don't plan to do that edition.

When it comes to CSLA Light, I'm doing it in C# because of the 3:1 split, and so again am focusing on C# first.

Whether I do a VB version of the framework or not depends on whether I decide to write a book on the creation and design of CSLA Light. I may or may not. If I don't write a book on the design of the actual framework, I won't port (and then maintain) the framework into a second language.

It is a ridiculous amount of work to maintain CSLA .NET twice, and I really don't like the idea of maintaining CSLA Light twice too. You have no idea how much writing, testing and debugging everything twice slows down progress (and eliminates fun). As wonderful as Instant C# and Instant VB are, the dual effort is a continually increasing barrier to progress.

I might write an ebook on using CSLA Light, in which case I'd leave the framework in C#, but create reference apps in both VB and C# so I can do both editions of the ebook. I think this is the most likely scenario. Certainly VB-compatibility has shaped a couple CSLA Light design decisions already - I won't allow a design that precludes the use of VB to build a CSLA Light app.

(The lack of multi-line lambdas and/or anonymous delegates in VB is a real barrier though... Worse even, than the poor way C# handles implementation of interfaces...)

In the end though, like all of us, I need to be where the market is vibrant. Where I can make money from my hard work. Just now, there's more money to be had from C# content and so that takes priority. But there are a lot of people using VB, and (assuming the sales ratio doesn't slip further) in my view it is worth producing content in the VB space as well.

Monday, June 23, 2008 9:18:31 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, October 17, 2007


Now available in both VB and C# editions!

CSLA .NET version 3.0 adds support for Microsoft .NET 3.0 features. This ~120 page ebook covers how to use these new capabilities:

  • Windows Presentation Foundation (WPF)
    • Creating WPF forms using business objects
    • Using the new controls in the Csla.Wpf namespace
      • CslaDataProvider
      • Validator
      • Authorizer
      • ObjectStatus
      • IdentityConverter
    • Maximizing XAML and minimizing C#/VB code
  • Windows Communication Foundation (WCF)
    • Using the new WCF data portal channel to seamlessly upgrade from Remoting, Web services or Enterprise Services
    • Building WCF services using business objects
    • Applying WCF security to encrypt data on the wire
    • Sending username/password credentials to a WCF service
      • Including use of the new Csla.Security.PrincipalCache class
    • Using the DataContract attribute instead of the Serializable attribute
  • Windows Workflow Foundation (WF)
    • Creating activities using business objects
    • Invoking a workflow from a business object
    • Using the WorkflowManager class in the Csla.Workflow namespace

Version 3.0 is an additive update, meaning that you only need to use the .NET 3.0 features if you are using .NET 3.0. CSLA .NET 3.0 is useful for people using .NET 2.0!! These features include:

  • Enhancements to the validation subsystem
    • Friendly names for properties
    • Better null handling in the RegExMatch rule method
    • New StringMinLength rule method
    • Help for code generation through the DecoratedRuleArgs class
  • Data binding issues
    • Fixed numerous bugs in BusinessListBase to improve data binding behavior
    • Throw exception when edit levels get out of sync, making debugging easier
    • N-level undo changed to provide parity with Windows Forms data binding requirements
  • AutoCloneOnUpdate
    • Automatically clone objects when Save() is called, but only when data portal is local
  • Enhancements to the authorization subsystem
    • CanExecuteMethod() allows authorization for arbitrary methods

CSLA .NET 3.0 includes numerous bug fixes and some feature enhancements that benefit everyone. If you are using version 2.0 or 2.1, you should consider upgrading to 3.0 to gain these benefits, even if you aren't using .NET 3.0.

See the change logs for version 3.0, version 3.0.1 and version 3.0.2 for a more detailed list of changes.

Using CSLA .NET 3.0 is completely focused on how to use the new features in version 3.0. The book does not detail the internal changes to CSLA .NET itself, so all ~120 pages help you use the enhancements added since version 2.1.

Get the book at

Download the 3.0.2 code from the CSLA .NET download page.

Wednesday, October 17, 2007 5:10:06 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, September 28, 2007

CSLA .NET version 3.0 adds support for Microsoft .NET 3.0 features. This ~120 page ebook covers how to use these new capabilities:

  • Windows Presentation Foundation (WPF)
    • Creating WPF forms using business objects
    • Using the new controls in the Csla.Wpf namespace
      • CslaDataProvider
      • Validator
      • Authorizer
      • ObjectStatus
      • IdentityConverter
    • Maximizing XAML and minimizing C#/VB code
  • Windows Communication Foundation (WCF)
    • Using the new WCF data portal channel to seamlessly upgrade from Remoting, Web services or Enterprise Services
    • Building WCF services using business objects
    • Applying WCF security to encrypt data on the wire
    • Sending username/password credentials to a WCF service
      • Including use of the new Csla.Security.PrincipalCache class
    • Using the DataContract attribute instead of the Serializable attribute
  • Windows Workflow Foundation (WF)
    • Creating activities using business objects
    • Invoking a workflow from a business object
    • Using the WorkflowManager class in the Csla.Workflow namespace

Version 3.0 is an additive update, meaning that you only need to use the .NET 3.0 features if you are using .NET 3.0. CSLA .NET 3.0 is useful for people using .NET 2.0!! These features include:

  • Enhancements to the validation subsystem
    • Friendly names for properties
    • Better null handling in the RegExMatch rule method
    • New StringMinLength rule method
    • Help for code generation through the DecoratedRuleArgs class
  • Data binding issues
    • Fixed numerous bugs in BusinessListBase to improve data binding behavior
    • Throw exception when edit levels get out of sync, making debugging easier
    • N-level undo changed to provide parity with Windows Forms data binding requirements
  • AutoCloneOnUpdate
    • Automatically clone objects when Save() is called, but only when data portal is local
  • Enhancements to the authorization subsystem
    • CanExecuteMethod() allows authorization for arbitrary methods

CSLA .NET 3.0 includes numerous bug fixes and some feature enhancements that benefit everyone. If you are using version 2.0 or 2.1, you should consider upgrading to 3.0 to gain these benefits, even if you aren't using .NET 3.0.

See the change logs for version 3.0, version 3.0.1 and version 3.0.2 for a more detailed list of changes.

Using CSLA .NET 3.0 is completely focused on how to use the new features in version 3.0. The book does not detail the internal changes to CSLA .NET itself, so all ~120 pages help you use the enhancements added since version 2.1.

Get the book at
(C# available now, VB available in early October)

Download the 3.0.2 code from the CSLA .NET download page.

Books | CSLA .NET | WCF | Workflow | WPF
Friday, September 28, 2007 3:21:26 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, January 30, 2007

The CSLA .NET Version 2.1 Handbook is available NOW at for both C# and VB.

Additionally, version 2.1.3 of CSLA .NET is now available for download from this location.

Version 2.1.3 includes some bug fixes and minor enhancements. The enhancements are primarily around the CslaDataSource web control, which now provides more integrated support for paging and sorting.

Most importantly, version 2.1.3 is the specific version described in my CSLA .NET Version 2.1 Handbook. I am releasing this as a ~160 page ebook, available in editions for both C# and VB, for purchase directly from my web site.

This new book is best thought of as a sequel to my my Expert C# 2005 Business Objects and Expert VB 2005 Business Objects books. It covers the changes made since CSLA .NET 2.0 was released: how the framework has changed, and how to use the new features and capabilities. Please note that this is not a replacement for those books: it expands on them.

I hope you enjoy CSLA .NET 2.1.3, and the new book. Thank you, code well, have fun!

Tuesday, January 30, 2007 10:14:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, January 25, 2007

Version 2.1.2 of CSLA .NET is now available for download from this location.

Version 2.1.2 includes some bug fixes and minor enhancements. The enhancements are primarily around the CslaDataSource web control, which now provides more integrated support for paging and sorting.

Most importantly, version 2.1.2 is the specific version described in my CSLA .NET Version 2.1 Handbook. I am releasing this as a ~160 page ebook, available in editions for both C# and VB, for purchase directly from my web site.

The VB CSLA .NET Version 2.1 Handbook is available NOW at

Look for the C# edition in the very near future (it is in the final review stage).

This new book is best thought of as a sequel to my Expert C# 2005 Business Objects and Expert VB 2005 Business Objects books. It covers the changes made since CSLA .NET 2.0 was released: how the framework has changed, and how to use the new features and capabilities. Please note that this is not a replacement for those books: it expands on them.

Releasing this as an ebook in PDF format is a risk on my part. I put just as much time and effort into writing this book as I have any other book I've written, but I want to provide a more cost-effective way for you to purchase this material than through normal publishing channels. It is my sincere hope that you will purchase this book if you read it (even after a few people have purchased it and they start sharing it for free).

I'm not giving up on traditional publishing channels necessarily. I'll most likely use a traditional publishing approach when I reach a point that CSLA .NET and/or my thinking changes to such a degree that there'd be value for you, as a reader, in me rewriting my books in a major way. But when I'm writing about extra functionality that rests on the existing work, it seems like I'm providing better value to you by selling a lower-cost sequel than forcing you to repurchase much of the same material to get at the new parts.

But all this hinges on people's honesty. On your honesty.

I hope you enjoy CSLA .NET 2.1.2, and the new book. Thank you, code well, have fun!

Thursday, January 25, 2007 6:20:05 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, January 2, 2007

I you had a good holiday season and enjoyed the end of 2006!


For my part, I want to thank everyone who contributed to the CSLA .NET forums, and to the CSLAcontrib project. The time and energy you have all put in over the past few months has been a great help to the CSLA .NET community, and I know there are many people out there who are grateful for your efforts!


Most importantly though, I want to thank all the users of CSLA .NET and everyone who has purchased copies of my books. At the end of the year I received numerous emails thanking me for creating the framework (and I appreciate that), but I seriously want to thank all of you for making this a vibrant community. CSLA .NET is one of the most widely used development frameworks for .NET, and that is because each of you have taken the time to learn and use the framework. Thank you!


For me 2006 was a year of change. Starting with CSLA .NET 2.0 I've been viewing CSLA .NET as not just an offshoot of my books, but as a framework in its own right. Of course many people have been treating it that way for years now, but I hope it has been helpful to have me treat point releases a bit more formally over the past number of months.


This extends to version 2.1, which represents an even larger change for me. With version 2.1 I'm releasing my first self-published ebook to cover the changes. This ebook is not a standalone book, rather it is best thought of as a "sequel" to the 2005 book. However, it is well over 150 pages and covers both the changes to the framework itself, as well as how to use the changes in your application development. The ebook is undergoing technical review. That and the editing process should take 2-3 weeks, so the ebook will be available later this month.


Looking at the rest of 2007 it is clear that I'll be spending a lot of time around .NET 3.0 and 3.5.


I'll be merging the WcfChannel into CSLA .NET itself, as well as implementing support for the DataContract/DataMember concepts. This, possibly coupled with one WPF interface implementation for collections, will comprise CSLA .NET 3.0.


It is not yet clear to me what changes will occur due to .NET 3.5, but I expect them to be more extensive. Some of the new C#/VB language features, such as extension methods and lambda expressions, have the potential to radically change the way we think about interacting with objects and fields. When you can add arbitrary methods to any type (even sealed types like String) many interesting options become available.


Then there's the impact of LINQ itself, and integration with the ADO.NET Entity Framework in one manner or another.


ADO EF appears, at least on the surface, to be YAORM (yet another ORM). If that continues to be true, then it is a great way to get table data into data entities, but it doesn't really address mapping the data into objects designed around use cases and responsibility. If you search this forum for discussions on nHibernate you'll quickly see how ADO EF might fit into the CSLA .NET worldview just like nHibernate does today: as a powerful replacement for basic ADO.NET and/or the DAAB.


LINQ is potentially more interesting, yet more challenging. It allows you to run select queries across collections. At first glance you might think this eliminates the need for things like SortedBindingList or FilteredBindingList. I’m not sure that’s true though, because the result of any LINQ query is an IEnumerable<T>. This is the most basic type of list in .NET; so basic that the result must often be converted to a more capable list type.


Certainly when you start thinking about n-level undo this becomes problematic. BusinessBase (BB) and BusinessListBase (BLB) work together to implement the undo capabilities provided by CSLA .NET. Running a LINQ query across a BLB results in an IEnumerable<T>, where T is your BB-derived child type. At this point you’ve lost all n-level undo support, and data binding (Windows Forms, and any WPF grid) won’t work right either.


So at the moment, I’m looking at LINQ being most useful in the Data Access Layer, along with ADO EF, but time will tell.


The point of all this rambling is this: I didn’t rush CSLA .NET 1.0 or 2.0. They came out when I felt I had good understanding of the issues I wanted to address in .NET 1.0 and .20 respectively. And when I felt I had meaningful solutions or answers to those issues. I’m treating .NET 3.5 (and presumably CSLA .NET 3.5) the same way. I won’t rush CSLA .NET to meet an arbitrary deadline, and certainly not to match Microsoft’s release of .NET 3.5 itself. There’s no point coming out with version of CSLA .NET that misses the mark, or that provides poor solutions to key issues.


So in 2007 I’ll most certainly be releasing the version 2.1 ebook and CSLA .NET 3.0 (probably with another small ebook). Given that Microsoft’s vague plans are to have .NET 3.5 out near the end of 2007, I don’t expect CSLA .NET 3.5 to be done until sometime in 2008; but you can expect to see beta versions and/or my experiments around .NET 3.5 as the year goes on.


Of course I’ll be doing other things beyond CSLA .NET in 2007. I’m lined up to speak at the SD West and VS Live San Francisco conferences in March. I’m speaking in Denver and Boulder later in January, and I’ll be doing other speaking around the country and/or world as the year goes on. Click here for the page where I maintain a list of my current speaking engagements.


To close, thank you all for your support of the CSLA .NET community, and for your kind words over the past many months. I wish you all the best in 2007.


Code well, have fun!



Tuesday, January 2, 2007 9:52:48 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, December 13, 2006

I thought it would be a good idea to give a quick update on the progress/status of the CSLA .NET version 2.1 ebook. Version 2.1 includes some substantial new features and changes as compared to version 2.0, and I am working on an ebook (about 150 pages) that I'll be selling through my web site in the near future. This ebook covers those changes to the framework, both from the framework development perspective and from the perspective of someone who just wants to use the new or changed features.

My original intent was for the ebook to be done in November. Obviously that hasn't happened, though I am very near completion of the book at this point - in the middle of December. There are many reasons for the delay, most notably some serious family health issues (which, unfortunately, are ongoing) and unexpected activities at work (I have a real job in addition to writing ebooks :) ). Those pushed things far enough into November that a number of other, planned, things impacted the schedule as well.

I really didn't expect this project to be this big - I was thinking 75 pages, but it is more like 150. And self-publishing turns out to be more work than I'd thought. Fortunately, a colleague at Magenic is helping to do the technical review and my very talented wife is doing all the non-technical editing. Another Magenic colleague is kindly setting up the online store. And I found out from my tax guy that I need to get a sales tax ID from Minnesota because I have to actually collect sales tax on the ebook - much to my surprise.

Regardless, what this means is that I now expect the ebook to be available for purchase within the first two weeks of 2007. I'm wrapping up the VB version this week, doing technical revisions and final editing and creating the C# version (swapping in different code bits) over the next couple weeks. This should mean the project is done by the end of the year so I can put it online very early in 2007.

Wednesday, December 13, 2006 9:35:06 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, August 10, 2006
Yesterday I recorded two more DNR TV shows on CSLA .NET with Carl Franklin, so watch for those to go online in the next few weeks. Carl does a nice job of editing the recordings and cleaning up the audio, so it takes some time between recording and "airing", but it is well worth it!

Thursday, August 10, 2006 1:57:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, July 26, 2006

Some exciting news! Dunn Training is building a formal training class around CLSA .NET, with plans for the class to be ready in September. I often get requests for CSLA .NET training, and now there'll be a great answer.

Of course Magenic remains the premier source for consulting and mentoring around CSLA .NET. Training is important, but you can't underestimate the value of longer term mentoring!

Given the combination of my books, a formal CSLA .NET class and longer term mentoring and consulting from Magenic, a full array of CSLA .NET resources is coming into being.

And while I'm plugging Dunn Training, I should mention that they have an excellent BizTalk Server 2006 class - just tell them that Rocky sent you :)

Update: Here is a link to the information page on the CSLA .NET class.

Wednesday, July 26, 2006 11:56:44 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, July 19, 2006

Yesterday I posted about Paul Sheriff’s new subscription-based online venture. It is an experiment on Paul’s part, and it is something he’s put a huge amount of time and effort into building.


Interestingly, there’s been a bit of pushback – at least in the comments on my blog – to Paul charging for his site. Of course this is an experiment, and so only time will tell if Paul’s investment in time and money putting it together, and his ongoing investment in building content will actually pay off.


But I hope it does work, and this is why.


It has been clear for a while now that the world is undergoing some major changes. While the Internet didn't transform the world like all the dot-com nuts thought it would, it really is having a non-trivial (if ponderous) impact as time goes by.


(for a thought-provoking view of a possible future, check out Epic 2014).


A few of us, Paul and myself included, are trying to figure out how to adapt to this new world. With book sales radically down and magazine subscriptions failing and technical conferences struggling, it is becoming less and less practical for a professional author/speaker to make a living.


Now it might be the case that free content will have the same quality as professionally created, reviewed and edited content. But I doubt it. Some people can generate quality content without reviewers and editors, but most can’t. And in any case there’s no substitute for experience. As with anything, experience has tremendous value. If you look at any professional author’s work you’ll see a progression as they get better and better at explaining their ideas over time.


Not that there isn't some great free content out there, but wading through all the random content to find it is very expensive. There’s no doubt that some people invest their time and effort in improving their writing skills for free, but over time it is hard to commit to that level of focus without some level of compensation.


I specifically avoided saying that some people do this as a hobby. Because I think that is very rare. People write to get compensation. In many cases it is financial – either directly, because they get paid to write, or indirectly, because they expect to get a raise, or to more easily job-hop into a raise.


Coming back to that sifting through the web thing though… Time isn't free. In fact I'm of the opinion that time is far more valuable than money for most of the people in our profession. Wasting hours sifting through random outdated, or just plain poor, content to find that one gem on someone's blog is really costly.


For some people it is worth that time, for others it is not. There's no way to pass a global value judgment on this, because different people have different jobs and priorities. If I can spend a couple hours writing code, I'm much happier than if I spent a couple hours reading random web content. Other people love reading and sifting through random web content and don't begrudge that time in the slightest.


One thing that I always keep in mind though, is that we (in the US and Europe anyway) cost 4-7 times more than people in India or China. That means we need to be 4-7 times more productive to justify our existence. So that time spent sifting through the web needs to result in some pretty impressive productivity or it was just a very high cost.


I sift through the web at least as much as the next guy, don’t get me wrong. But not really by choice. If some web-sifter out there started a subscription-based index into content that is actually up to date and valid I’d pay for it. Google is great, but just think if there was a Google that only searched meaningful content!?! I don’t care about the vast majority of what people put on the web, there are just a few gems I’m looking for.


Unfortunately, thus far the idea of a paid index for content hasn’t proven to be a viable business model. And the web is undermining traditional forms of providing content. So the world is changing.


But I don’t believe for a minute that the value of professional content is lower than in the past, I just think the delivery of that content is in flux.


So the question then, is how to deliver professional content in this new world? And in a way where the producers, reviewers and editors of the content are compensated for their effort. Time isn’t free, not for you as the reader, nor for those of us engaged in professionally producing that content.


We’ll all find out whether Paul’s experiment works or not over time. But he’s not alone in looking for ways to adapt to this new world, and you can expect to see some experiments from other people as well – including me – in the relatively near future.

Wednesday, July 19, 2006 5:31:00 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, July 14, 2006

CSLA .NET version 2.0.3 is now available for download at This is a bug fix update to address various errata and issues that readers have found since version 2.0.2.

Most notably, this version (hopefully) fixes the issues with CslaDataSource, where it would sometimes fail to find the business assembly. Please note that the type name is case-sensitive and typos are now the primary reason the type/assembly can't be found.

To give you some idea what's going on with CslaDataSource, here's the short story:

In CSLA .NET 2.0 (and in the books), I implemented CslaDataSource so it loaded the business assembly at design time (in VS 2005) to get the assembly's metadata. The metadata is needed for the web forms designer so the GridView and DetailsView controls can show the right columns/rows. And that worked, but had the problem that changes to the business assembly during development weren't picked up by CslaDataSource.

In 2.0.1 I altered CslaDataSource to load the business assembly in a temporary AppDomain. That allows me to unload the AppDomain and thus unload the assembly - so CslaDataSource can always reflect against the latest assembly. Which is a great idea, except that there's no supported (or even unsupported really) way to find the current business assembly. It turns out that VS 2005 puts the assemblies into a shadow directory, creating a new shadow directory each time you build your project or update an external assembly. To work around this, I am doing a sort of hack by inferring the shadow directory location and then finding the most recently created shadow directory (by date/time).

Now, in 2.0.3 I altered CslaDataSource yet again, to better infer the shadow directory location. My previous approach didn't handle having Csla.dll in the GAC, and failed at other (seemingly random) times as well. The new approach infers the shadow directory inside the primary VS 2005 AppDomain, and using the business assembly/type as the source location (rather than Csla.dll). This change appears to have fixed the random failures and should allow Csla.dll to be in the GAC. I doubt it allows the business assembly to be in the GAC, but (imo) that's not a good idea anyway.

Friday, July 14, 2006 8:02:57 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Saturday, June 17, 2006

CSLA .NET version 2.0.2 is now available for download at This is a bug fix update to address various errata and issues that readers have found since version 2.0.1.

This version also introduces one change, which allows you to call DataPortal.Fetch with no criteria.

Saturday, June 17, 2006 9:53:34 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, May 31, 2006

CSLA .NET version 2.0.1 is now available for download at This is primarily a bug fix update to address various errata and issues that readers have found since the release of the original code. It does include a couple changes primarily geared toward simplification of code generation templates. You can see the change log here.

At a high level the changes (other than bug fixes) include:

  • A new Initialize() method for use by code generation templates
  • A new IEditableBusinessObject interface to allow polymorphic child objects in BusinessListBase-derived collections
  • Better support for lazy loading of child collections (EditLevel property now visible from BusinessListBase, and null child object references now restored in UndoChanges)


Wednesday, May 31, 2006 9:37:06 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, May 25, 2006

According to Bookscan (a service which tracks book sales for all sorts of books), Expert C# 2005 Business Objects is number 365 and Expert VB 2005 Business Objects is number 385 among all computer books out there. This includes consumer-oriented computer books too, so these numbers are incredibly good. Programming books have a hard time competing with consumer books for sales volume after all.

What I find most interesting is that the VB sales are comparable to the C# sales. Obviously there really is a market for higher end VB programming books, which I think validates a view I've held for a long time, that the VB community was waiting for .NET to mature before moving forward. Clearly VS 2005 is triggering a non-trivial movement of VB developers into .NET, and these are hard-core professional developers who are looking for something beyond the reference-style and tutorial style books out there.

Like I said a few months ago, in .NET 1.1 the C# book outsold the VB book rather substantially. These numbers appear to show that the dynamic is changing, and I find that quite exciting!

Thursday, May 25, 2006 2:09:19 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

I have two updates for CSLA .NET for those who are interested.

CSLA .NET version 1.53 is now available from This is a minor bug fix update to 1.52.

A beta of CSLA .NET version 2.0.1 is now available from This includes fixes for a number of bugs and errata (which you can find at, as well as some minor enhancements due to unforseen limitations around areas like threading and polymorphic child objects. If you get a chance to try 2.0.1 I would appreciate it. Barring any negative feedback from the community I expect to finalize it in about a week.

Thursday, May 25, 2006 2:01:38 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, May 5, 2006

There's a new online CSLA .NET forum, hosted by Magenic Technologies, with the Community Server software provided by Telligent.

As always, the home site for CSLA .NET is, where you can find news, answers to frequently asked questions and downloads of the framework and related resources.

This forum is a replacement for - which has served the community for a number of years. Unfortunately turns out to be rather unreliable and slow, so the forum had to be moved. If you are looking for older discussions you may want to check there. Associated with that forum is, which allows you to search the archive of that older forum.

But now we've got this new forum, which will hopefully overcome some of the limitations and reliability issues of MSN - so please make good use of the forum and enjoy!

Friday, May 5, 2006 10:01:52 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, May 3, 2006

My author copies of Expert VB 2005 Business Objects arrived on my doorstep today, meaning that the book is in print and is being delivered to booksellers right now. This means it should be available on bookshelves and from online sellers very, very soon.

Wednesday, May 3, 2006 7:37:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, May 1, 2006

One of the most important "features" of CSLA .NET is the vibrant community that surrounds it. I am humbled by, and very appreciative of, the amount of time and effort people put into this community - helping other people more effectively learn and use the concepts from my books.

The most recent examples? Updates to several of the major community contributions for CSLA .NET 2.0:

Permanent links to these contributions are, along with general errata and other information, at the CSLA .NET 2.0 home page:

Monday, May 1, 2006 7:21:14 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Friday, April 7, 2006

Most people are aware of DotNetRocks. But fewer people are aware that the talent behind DotNetRocks has started a new venture: DNR TV. It is kind of like DotNetRocks, only with live video of the computer screen during the conversation. I recently recorded two episodes on CSLA .NET 2.0 for DNR TV:

Look for more DNR TV episodes on CSLA .NET 2.0 in the future.

Friday, April 7, 2006 9:48:59 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, April 4, 2006

Apress has made the beta ebook of my VB book available at

Tuesday, April 4, 2006 8:22:45 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, March 30, 2006

That was fast! Just this past weekend I was in New London, CT and did a live-in-the-studio interview for dotnetrocks on CSLA .NET 2.0. Somehow I thought it would air in a week or two, but just like that it is online and ready to hear!

While I was there I also recorded two episodes for DNR TV - the new dotnetrocks initiative that includes video of the computer screen. In those programs I walked through the basic structure of an editable root object and discussed how to bind it to a Windows Forms interface. If you want a quick intro into the use of CSLA .NET these should be well worth watching when they become available.

Thursday, March 30, 2006 3:37:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer

Yea! I have completed the final proof/review of all 12 chapters of the VB book. The Apress schedule calls for the book to go to print next week, which means it should be available in the 2-3 week timeframe (given time for printing, binding, shipping and all that stuff). It is so nice to be done, done, done!! :)

Thursday, March 30, 2006 7:02:20 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, March 22, 2006

I have sent off the final code for the book to Apress, which officially means that I have RTM code at this point. You can go here to download the release code for VB or C#.

As a bonus, I also put a test release of a WCF data portal channel up for download - you can get if from this page.

Update: Today (March 22) I recieved my author's copies of the Expert C# 2005 Business Objects book - so it is most certainly in print. What a joy it is to actually see the results of the past several months of work!!

Wednesday, March 22, 2006 12:38:56 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Sunday, March 19, 2006

A number of people have asked why the C# edition of my new Business Objects book is coming out before the VB edition. And yes, that is the case. The C# book should be out around the end of March, and the VB book about 2-3 weeks later.

As I've said before, I wrote the books "concurrently". Which really means I wrote one edition, knowing full well that I'd be coming through later to swap out all the code bits and change a few of the figures. It really didn't matter to me which one I did first, because I was going to have to go through every chapter to do this swapping process either way.

I did write the actual framework and sample app in VB first. The initial port to C# was handled by a fellow Magenicon, Brant Estes. Believe it or not, he had the initial compilable code done in about three days! I am thinking he didn't do a whole lot of sleeping (because he did the port by hand, not with a tool - which is awesome, because it means the code style and quality is far higher).

I could give you a fluffy (if somewhat true) answer, that the reason I did the C# book first was to ensure that the C# code was fully tested and brought entirely into line with the VB code. And there really is some truth to that. By doing the C# edition first, I was able to go through every line and recheck, tweak and enhance that code. Several large chunks of functionality were actually added or altered in C# first (during the writing process) and I back-ported them into the VB version of the code.

But the real reason is what a few people have speculated: dollars. For better or worse, the fact is that the .NET 1.0 C# book is outselling the VB book by quite a lot. Nearly 2:1 actually. Due to this, my publisher really wanted to get the C# edition out first. I initially pushed back, but I personally have no rational reason to do one before the other. I do love VB very much, but that's an irrational and emotional argument that simply doesn't hold a lot of sway...

(That said, if there was more than a couple week difference in release dates, I would have insisted on VB first, and I would have won that argument. But you must pick your battles, and it made no sense to me to have a fight with my publisher over which book came out 3 weeks before the other...)

For what its worth, porting the book is far, far easier than porting (and maintaining) the code. I've said it before, and I'm sure I'll say it again, maintaining the same code in two languages is just a pain. Converting the book was a relatively rote process of copy-paste, copy-paste, copy-paste. But converting the code means retesting, double-checking and almost certainly still missing a thing or two...

Anyway, I thought I'd blog this just to make the order of release totally clear. For better or worse, it was simply a business decision on the part of my publisher.

Sunday, March 19, 2006 9:36:08 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Saturday, March 4, 2006

Here's another status update on the books.

I am done with the C# book, and it is still on schedule to be available at the end of March.

I am in the final revision stages with the VB book, so it is still on schedule to be available mid-April.

Since posting the beta code, people have pointed out a couple bugs (which I've fixed), one bug which can't be fixed without breaking the book (so it will be fixed later - and it isn't a show-stopper anyway) and a few feature requests (which will obviously come later).

I expect to be able to put the final version 2.0 code for both books online around March 13.

I'm also working with Magenic to have them host a new online forum. The plan is to use Community Server 2.0, hosted on a server at Magenic and most likely available through (though that's not for sure at this point).

So the next few weeks look to be exciting (anticipated):

March 13

CSLA .NET 2.0 code available

End of March

Expert C# 2005 Business Objects available

End of March

New CSLA .NET forums available


Expert VB 2005 Business Objects available

Saturday, March 4, 2006 11:51:10 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Sunday, February 12, 2006

Every now and then someone asks what tools I use to write books and articles.


I write in Word. Typically the publisher provides a specific template with styles that are to be used, so when they get to the last stage and need to do layout they can easily change the styles to get the proper appearance on the printed page.


Graphics, figures and screen-shots are, I find, the most frustrating part of the process in many ways. I use Snagit for capturing screen images into TIFF files, which isn’t too bad. But for creating other graphics I use a combination of Visio, PowerPoint, Corel Draw, MS Paint, screen shots and Snagit – along with Acrobat and (more recently) PDF Converter to generate PDF docs containing the figures. Not being graphically oriented, I find the whole process arcane and frustrating – especially as I’ve often had to redo figures a couple times because they are “blurry” or something – typically due to various resolution issues.


As an aside, this is what scares me about WPF (Avalon), since all of us programmers are going to be forced to learn all this arcane graphics stuff just to be competent at even basic application development. Personally I think that this could derail WPF adoption overall – at least until a large set of stock, good-looking, controls come into being from either Microsoft or third parties.


Microsoft seems to have this deluded idea that business sponsors are going to pay for graphic designers to build the UI – which I think is highly unlikely, given that they typically won’t even pay for decent testing… Who’d pay to make it pretty when they won’t even pay to make sure it actually works?!?


But back to the tools.


All the writing is done in Word. The final stage of reviewing however, occurs in PDF form. The publisher does the final layout, resulting in a PDF which will ultimately be sent to the printer. But I have to go through each chapter in PDF form to catch any final issues (typos, graphics issues, etc). I annotate the PDF files and send them back, so the layout people can make the changes and recreate the PDF.


I also use Microsoft Project. Not for the writing itself, but to schedule the process. Before committing to a writing schedule I create a project of my life. I put fixed-date tasks for all my travel, client commitments, vacations and anything else that I know will consume time during the writing process. Then I put in floating tasks for every chapter and have Project level my life (so to speak). This gives me at least a reasonable projection of how many calendar days it will take to do each chapter.


That’s pretty much it :)

Sunday, February 12, 2006 9:09:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, February 7, 2006

A few people have asked how the book is coming along, so here’s an update.


I touch each chapter a minimum of four times: to write it (AU), to revise it based on tech review comments (TR), to revise it based on copyedit questions (CE) and to do a final review after layout/typesetting (TS).


I am writing both the VB and C# books “concurrently”. What this really means is that I’m writing the book with one language, then skimming back through to change all language keywords, code blocks and diagrams to match the other language.


To practice what I preach (which is that you should be competent, if not fluent, in at least two languages) I am doing the book in C# and then converting to VB. It takes around 8 hours per chapter to do that conversion, 12 if there are a lot of diagrams to convert (code is easy – the damn graphics are the hard part…).


So, here’s the status as of this evening:






AU done


Front matter

AU done



TS done

TR done


TS done



TS done






CE done



CE done



CE done



CE done



CE done



CE done



TR done



TR done



People have also asked how much I expect the CSLA .NET 2.0 public beta code to change between now and the book’s release at the end of March. Chapters 2-5 cover the framework, and as you can see those chapters are into the final editing stages. As such, I certainly don’t anticipate much change.


While I’ve made every effort to keep the VB and C# code in sync, there may be minor tweaks to the code as I roll through the VB chapters 2-5. But I’ve used both in projects and at conferences like VS Live last week, and both pass my unit tests, so those changes should be cosmetic, not functional.


In other words, the beta is pretty darn close to the final code that’ll be provided for download with the book.

Tuesday, February 7, 2006 9:05:15 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, January 30, 2006

A public beta of CSLA .NET 2.0 is now available at

The Expert C# 2005 Business Objects and Expert VB 2005 Business Objects books are still due out around the end of March. That is also the point at which the framework with "RTM".

The public beta should be reasonable stable. I am nearly done with technical reviews of the chapters, and so am basically done with the framework updates. The ProjectTracker sample application is still under review at this point.

Monday, January 30, 2006 2:44:08 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, January 24, 2006

Next week at VS Live in San Francisco I’ll release a public beta of CSLA .NET 2.0.


This will include both VB 2005 and C# 2005 editions of the framework code, along with a sample application in both languages, showing how the framework can be used to create Windows, Web and Web service interfaces on top of a common set of business objects.


Those business objects are substantially more powerful than their CSLA .NET 1.x counterparts, while preserving the same architectural concepts and benefits. These objects leverage new .NET 2.0 features such as generics. They also bring forward features from CSLA .NET 1.5, but in a more integrated and elegant manner. There are additional features as well, including support for authorization rules, a more flexible data portal implementation and more.


Watch for the release of the beta next week.


Click here to see Jim Fawcette's blog entry about the upcoming beta release.

Tuesday, January 24, 2006 1:43:25 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, December 28, 2005

I apologize for the shameless plug, but I thought this was rather cool:


I see that my Expert C# Business Objects book has been nominated for the .NET Developer's Journal (.NETDJ) Magazine 2005 Readers Choice Award in the

category of Best .NET Book/Training Software.


I would appreciate your vote so that the book can win this highly prestigious award.  You can also cast a vote for various other favorites you might have in other categories. As part of the voting process, you can also get a free subscription to the Digital Edition of .NETDJ.


Cast your vote at: 

To begin voting, click on the "Click Here to Vote Now!" link.


Voting Ends Midnight, December 31, 2005


Thank you!

Wednesday, December 28, 2005 10:56:47 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, November 2, 2005

Quite a few people have asked me about the effort that will be required to move an application from CSLA .NET 1.0 to CSLA .NET 2.0. The list of changes in the change log can look daunting after all…


Fortunately most of the changes in the change log are internal – they don’t directly impact your code in a business class all that much, at least for code written using more recent versions of the framework (1.3 or higher).


In fact, the closer your code is to version 1.51 (the current version) the easier the port will be. The closer to the original 1.0 version in the books the harder.


The three big change areas are generics, BrokenRules and the DataPortal.


Generics mean there are new and different base classes from which you inherit. In most cases changing to the new base class means removing some now unneeded code from your business class. The following table lists the base classes:





BusinessBase(Of T)


T = your business object type


BusinessListBase(Of T, C)

BusinessListBase<T, C>

T = your collection type

C = child object type


NameValueListBase(Of K, V)

NameValueListBase<K, V>

K = type of the key or name

V = type of the value


ReadOnlyBase(Of T)


T = your business object type


ReadOnlyListBase(Of T)


T = child object type


The only place where you need to add code is BusinessBase(Of T), where there’s a new GetIdValue method you must implement (typically with one line of code). In all cases you will remove code such as the System.Objects overrides region and tons of code in collections.


A much bigger changes is that BrokenRules has been replaced by ValidationRules and now only supports the idea of rule methods. The BrokenRules.Assert() concept is gone. This will be the biggest change for most people, as all Assert calls must be converted to rule methods. Fortunately that's not terribly hard, but it is work.


DataPortal used to call DataPortal_Update, forcing you to write a nested If..Then statement inside DataPortal_Update. It now calls DataPortal_Insert, DataPortal_Update or DataPortal_DeleteSelf as appropriate. So now you write 3 methods instead of 1, but each method is very focused and requires no conditionals. Also, DataPortal now calls MarkNew and MarkOld automatically so you don't need to make those calls (or forget to make them like I typically did...).


The end result is that all properties in a BusinessBase(Of T) business object will now look like this:


private string _name = string.Empty;


public string Name




    if (CanReadProperty())

      return _name;


      throw new System.Security.SecurityException(

        "Property get not allowed");




    if (CanWriteProperty())

      if (_name != value)


        _name = value;




      throw new System.Security.SecurityException(

        "Property set not allowed");






Private mName As String = ""


Public Property Name() As String


    If CanReadProperty() Then

      Return mName


      Throw New System.Security.SecurityException( _

        "Property get not allowed")

    End If

  End Get

  Set(ByVal value As String)

    If CanWriteProperty() Then

      If mName <> value Then

        mName = value


      End If


      Throw New System.Security.SecurityException( _

        "Property set not allowed")

    End If

  End Set

End Property



The new Expert VB/C# 2005 Business Objects books and thus the CSLA .NET 2.0 framework are slated for public release in Mar/Apr 2006.

Wednesday, November 2, 2005 10:08:19 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Monday, August 29, 2005

I just got back from a week’s vacation/holiday in Great Britain and I feel very refreshed.


And that’s good, given that just before going to the UK I wrapped up the first draft of Chapter 1 in the new book Billy Hollis and I are writing. As you have probably gathered by now, this book uses DataSet objects rather than my preferred use of business objects.


I wanted to write a book using the DataSet because I put a lot of time and energy into lobbying Microsoft to make certain enhancements to the way the objects work and how Visual Studio works with them. Specifically I wanted a way to use DataSet objects as a business layer – both in 2-tier and n-tier scenarios.


Also, I wanted to write a book using Windows Forms rather than the web. This reflects my bias of course, but also reflects the reality that intelligent/smart client development is making a serious comeback as businesses realize that deployment is no longer the issue it was with COM and that development of a business application in Windows Forms is a lot less expensive than with the web.


The book is geared toward professional developers, so we assume the reader has a clue. The expectation is that if you are a professional business developer (a Mort) that uses VB6, Java, VB.NET, C# or whatever – that you’ll be able to jump in and be productive without us explaining the trivial stuff.


So Chapter 1 jumps in and creates the sample app to be used throughout the book. The chapter leverages all the features Microsoft has built into the new DataSet and its Windows Forms integration – thus showing the good, the bad and the ugly all at once.


Using partial classes you really can embed most of your validation and other logic into the DataTable objects. When data is changed at a column or row level you can act on that changed data. As you validate the data you can provide text indicating why a value is invalid.


The bad part at the moment is that there are bugs that prevent your error text from properly flowing back to the UI (through the ErrorProvider control or DataGridView) in all cases. In talking to the product team I believe that my issues with the ErrorProvider will be resolved, but that some of my DataGridView issues won’t be fixed (the problems may be a “feature” rather than a bug…). Fortunately I was able to figure out a (somewhat ugly) workaround to make the DataGridView actually work like it should.


The end result is that Chapter 1 shows how you can create a DataSet from a database, then write your business logic in each DataTable. Then you can create a basic Windows Forms UI with virtually no code. It is really impressive!!


But then there’s another issue. Each DataTable comes with a strongly-typed TableAdapter. The TableAdapter is a very nice object that handles all the I/O for the DataTable – understanding how to get the data, fill the DataTable and then update the DataTable into the database. Better still, it includes atomic methods to insert, update and delete rows of data directly – without the need for a DataTable at all. Very cool!


Unfortunately there are no hooks in the TableAdapter by which you can apply business logic when the Insert/Update/Delete methods are called. The end result is that any validation or other business logic is pushed into the UI. That’s terrible!! And yet that’s the way my Chapter 1 works at the moment…


This functionality obviously isn’t going to change in .NET or Visual Studio at this stage of the game, meaning that the TableAdapter is pretty useless as-is.


(to make it worse, the TableAdapter code is in the same physical file as the DataTable code, which makes n-tier implementations seriously hard)


Being a framework kind of guy, my answer to these issues is a framework. Basically, the DataTable is OK, but the TableAdapter needs to be hidden behind a more workable layer of code. What I’m working through at the moment is how much of that code is a framework and how much is created via code-generation (or by hand – ugh).


But what’s really frustrating is that Microsoft could have solved the entire issue by simply declaring and raising three events from their TableAdapter code so it was possible to apply business logic during the insert/update/delete operations… Grumble…


The major bright point out of all this is that I know business objects solve all these issues in a superior manner. Digging into the DataSet world merely broadens my understanding of how business objects make life better.


Though to be fair, the flip side is that creating simple forms to edit basic data in a grid is almost infinitely easier with a DataTable than with an object. Microsoft really nailed the trivial case with the new features - and that has its own value. While frustrating when trying to build interesting forms, the DataTable functionality does mean you can whip out the boring maintenance screens with just a few minutes work each.


Objects on the other hand, make it comparatively easy to build interesting forms, but require more work than I'd like for building the boring maintenance screens...

Monday, August 29, 2005 9:37:15 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Thursday, August 11, 2005

Like any author who writes practical, pragmatic content I am constantly torn. Torn between showing how to write maintainable code vs fast code. Between distilling the essence of an idea vs showing a complete solution that might obscure that essence.

Just at the moment I'm building a demo application, including its database. Do I create the best database I can, hopefully showing good database design techniques and subsequently showing how to write an app against an "ideal" database? Or do I create the database to look more like the ones I see when I go to clients - so it will have good parts and some parts that are obviously ill-designed. This latter approach allows me to show how to write an app against what I believe to be a more realistic database.

I'm opting for the latter approach. Yet sitting here right now, I know that I'll get lots of emails (some angry) berating me for creating and/or using such a poor database in a demo. "Demos should show the right approach" and so forth. Of course if I were to use a more ideal database design I'd get comments at conferences (some angry) because my demo app "isn't realistic" and only works in "a perfect world".

See, authors can't win. All we can do is choose the sub-group from which we're going to get nasty emails...

But that's OK. The wide diversity of viewpoints in our industry is one of our collective strengths. Pragmatists vie against idealists, performance-hounds vie against those focused on maintainability. Somewhere in the middle is reality – the cold, hard reality that none of us have the time to write performant, maintainable code using perfect implementations of all best practices and known design patterns. Somewhere in the middle are those hard choices each of us makes to balance the cost of development vs the cost of licensing vs the cost of hardware vs the cost of maintenance vs the cost of performance.

I think ultimately that this is why computer books don’t sell in the numbers you’d expect. If there are 7+ million developers, why does a good selling computer book sell around 20,000 copies?

(The exceptions being end-user books and theory books. End-user books because end users just want the answers, and theory books because they often rise above the petty bickering of the real world. Every faction can interpret theory books to say what they like to hear, so everyone likes that kind of book. Theory books virtually always “reinforce” everyone’s different world views.)

I think the reason “good selling” books do so poorly though. Only a subset or faction within the computer industry will agree with any given book. That faction tends to buy the book. Other factions might be a few copies, but they get a bad taste in their mouths when reading it, so they don’t recommend or propagate the book. Instead they find other books that do agree with their world view.

Note that I’m not complaining. Not at all!

I’m merely observing that C# people won’t (as a general rule) buy a VB book, and Java people won’t buy a C# book. OO people won’t buy a book on DataSet usage, and people who love DataSets won’t waste money on an OO book. People who love the super-complex demos from Microsoft really hate books that use highly distilled examples, while people who just want the essence of a solution really hate highly complex examples (and thus the books that use them).

As I write the 2nd editions of my Business Objects books I’m simultaneously writing both VB and C# editions. Several people have asked whether it wouldn’t be better to interleave code samples, have both languages in the book or something so that I don’t produce two books. But publishers have tried this. And the reality is that C# people don’t like to buy books that contain any VB code (and visa versa). Mixed language books simply don’t sell as well as single-language books. And like it or not, the idea behind publishing books is to sell them – so we do what sells.

But that solution doesn’t work for realistic vs idealistic database designs – which is my current dilemma. You can’t really write a book twice – once with an ideal database and once with a more realistic one. Nor can you really double the size (and thus cost) of a book to fit both ideas into it at once.

So I’m settling for the only compromise I can find. Parts of my database are pretty well designed. Other tables are obviously very poor. Thus some of my forms are trivial to create because they come almost directly from the “ivory tower”, while other forms rely on more complex and less ideal techniques because they come from the ugly world of reality.

Maybe this way I can get nasty emails from every group :)

Thursday, August 11, 2005 1:54:09 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, December 1, 2004

I just finished reading through Ted Neward’s Effective Enterprise Java book (ISBN 780321130006) and it is a must read for any enterprise .NET developer.


I hear it now. “What?! A Java book for .NET developers? Rocky, you’ve gone over the edge!”


No, I haven’t gone over the edge, and YES, absolutely a Java book for .NET developers.


It would be extremely foolish for any enterprise developer to read only .NET or Java information. It isn’t like either technology as a monopoly on smart, eloquent technical experts. On top of that, the two platforms are so similar at an architecture and software design level that the same guidelines and best practices apply equally to both.


So yes, go out and read Ted’s book. Every single item in the book has direct applicability to .NET. Sure you’ll need to translate some terminology to the .NET world, but that’s a minor thing. The important thing is that you’ll learn a whole lot about the good, the bad and the ugly when it comes to creating enterprise applications.


The truisms for minimizing network costs (latency, bandwidth, etc.) are universal. The tradeoffs when dealing with shared state and mapping state between objects, databases and XML are universal. The need to reduce locking and blocking are universal. The OO design patterns that address these issues in Java are exactly the patterns that apply in the .NET space as well.


And since this is a book about enterprise issues, there’s relatively little code and you can safely ignore virtually all of it. No offense to Ted, but this book doesn’t need any of the Java code. I’m sure he put it in there to make it actually feel like a Java book. No, the value is in the sometimes irreverent yet thorough discussion of the issues and the tradeoffs involved in addressing those issues.


Honestly, if this book used more universal terminology and skipped the few code examples it has, it would be a universal must-have resource for any modern enterprise platform – Java, .NET or whatever. I contend that it still fills this role, albeit with the need for .NET readers to mentally translate some terminology into our world. And that’s a small price to pay.


Wednesday, December 1, 2004 4:05:20 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Saturday, October 2, 2004

A couple people appreciated me mentioning Vernor Vinge's books in a previous post, so I thought I'd toss out another author I've been enjoying quite a lot lately: Alastair Reynolds.

His books are reasonably hard science-fiction, meaning that he sticks (mostly) to hard science. The exceptions are granted based on extrapolations from today's knowledge of nanotechnology and various theories of physics floating around out there.

The books are also relatively dark, painting a very cool but not entirely comfortable picture of the future. Somewhat like cyberpunk meets hard SF in outer space.

The books are:

Three of the books form a trilogy. Chasm City is a related book in the same universe, but isn't part of the trilogy. However, it is probably best to read them in the order listed above, since Chasm City tends to make some of Redemption Ark more meaningful.

Unlike Vinge's books, I wouldn't say that these provide any great insight into SOA :)  They are however, a very good read.

I'm also nearly done with Neal Stephenson's Quicksilver, the first book in his new trilogy. The other two are out as well. These are prequels to Cryptonomicon, which I still think is the best book I've ever read.

If you have any interest in the history and origins of modern scientific thought, the conflict between Catholicism, early Protestant churches, Islam and all the related politics of kings then Quicksilver is your cup of tea. How can you beat a book that uses Isaac Newton and his contemporaries as major characters?

My one warning – Cryptonomicon and its prequels are dense. Stephenson makes wonderful, even masterful use of the English language in his writing. But the density of information means that I haven’t whipped through any of these books like I do with most other books. There’s no skimming over paragraphs of description to get to the action, since Stephenson’s descriptions are as meaningful and interesting as any conflict or dialog.

You should also be aware that, from a literary perspective, these are cyberpunk books. While none of them have cyber, and precious little punk, the literary form of the books follows the typical cyberpunk approach of telling multiple, vaguely interrelated tales that all collapse together into a single thread in the last few pages. Not everyone likes this style, but I personally love it.

Saturday, October 2, 2004 8:59:19 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Sunday, September 26, 2004

As I noted in a previous entry, I rarely read computer books. However, there are exceptions.


People often ask me to suggest good books on object-oriented design. I struggle with this. I have a whole shelf of what I consider to be pretty crappy OO design books. Sure, each of them has a tidbit here and there, but on the whole I wasted a lot of money building a collection of books that sits there gathering dust.


The one book I’ve consistently recommended is David Taylor’s “Object Technology: A Manager’s Guide”. This is an absolute must-read for anyone hoping for success with OO design or programming. Yes, I know it has the dread word “manager” in the title, but don’t let that scare you off. Go buy and read the book. It is not only a delightful read (which is saying a lot for a computer book), but it is full of great ideas and information and ways of thinking.


I just got a new book that I expect will be a favorite. I’m only a bit into it, but I’m so enthused that I’m blogging now rather than waiting for the (sure to be climactic) end of the book.


The book is Object Thinking by David West. Many years ago Mr. West taught college here in Minnesota, and we brought him in to do a multi-day OO design class at the consulting company where I worked. While all of us in the class agreed that his ideas were a bit flakey, the class was absolutely full of great ideas, concepts and approaches.


This book promises to be the same as that class. Mr. West doesn’t pull any punches. He really believes in what he’s presenting, and presents it in a clear and easy to read manner. Sure, the ideas push the limits of what most people consider practical, but they are truly great ideas and deserve serious consideration.


The book reflects a lot of what I talk about in my speaking around the world. This isn’t surprising, since that class years ago certainly influenced my thinking in some very fundamental ways.


This includes ideas like anthropomorphism – where you endow objects with human-like qualities. I do this all the time in my work, and those that have heard me speak know that I do it all the time with objects, computers, networks and all sorts of things. There is tremendous value in giving inanimate entities a voice of their own, as long as you listen to what they say!


And this is the thing. My last statement there sounds flakey. Heck, it is flakey. Mr. West is full of this sort of thing. Don’t let it put you off. I mean it. I’m not much for flakey stuff, but it turns out that some of the flakey-sounding ideas he puts forward are directly useful – at least of you want to do actual object-oriented design.


On a bit of a tangent, Mr. West also tends to use the English language well. This includes using complex words and expressing complex concepts. I love this stuff. My absolute favorite author is Neal Stephenson, mostly because of his absolute mastery of language and imagery. Most computer books (including mine) get edited so they’ll be easier to translate to various other human languages – thus gaining a larger market. While that makes economic sense, it is a truly unfortunate thing, because it guts our ability to use deep language constructs and vocabulary to accurately and viscerally express the concepts we’re discussing.


I am always saying that objects are about behavior, not data. Mr. West has written a book that’s all about understanding that fundamental truth. Get this idea, internalize it, become one with it and you’ll be well on your way to really doing OO design.

Sunday, September 26, 2004 7:55:26 PM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Tuesday, September 21, 2004

I read a lot of science fiction. I travel a lot (which you can tell from my list of speaking engagements) and I find it very hard to work on a plane. You might think I’d read computer books, but I regard computer books as reference material, so I very rarely actually read a computer book, as much as skim it or use the index to find answers to specific questions… Besides, they are all so darn big, and it gets heavy carrying them around airports :)


So what’s the point of this post? I recently read a very excellent book that I believe has a great deal of meaning for the computer industry. Sure, it is science fiction, but it is also paints a picture of what computing could look like if today’s service-oriented concepts come to true fruition.


The book is Vernor Vinge’s A Deepness in the Sky, which is a prequel to A Fire Upon the Deep. Fire is an excellent novel, and was written first. I highly recommend it. However, Deepness is the book to which I’m referring when I talk about the links to the computer industry.


I doubt the links are accidental. Vernor Vinge is a retired professor of Computer Science in San Diego, and obviously has some pretty serious understanding of computer science and related issues.


I should point out that what follows could give away key points in the story. The story is awesome, so if you are worried about having it lose some of its impact then STOP READING NOW. Seriously. Take my word for it, go buy and read the book, then come back.


The technology used by the Qeng Ho (the protagonist race, pronounced “cheng ho”) in the book is based on two core concepts: aggregate systems and the wrapping/abstraction of older subsystems.


First is the idea that all the systems are aggregates of smaller systems, which are aggregates of smaller systems and so forth. This is service-orientation incarnate. If you know the protocol/interface to a system, you can incorporate it into another system, thus creating a new system that is an aggregate of both. Extending this into something as complex as a starship or a fleet of starships gives you the effect Vinge describes in the book.


And this is a compelling vision. I have been in a bit of a funk over the past few months. It seems like our industry is lost in the same kind of rabid fanaticism that dominates the US political scene, and that is very depressing. You are either Java or .NET. You are either VB or C#. That gets very old, very fast.


But Vinge has reminded me why I got into computers in the first place. My original vision – way back when – was to actually link two Asteroids arcade games together so multiple people could play together. It may sound corny, but I have been all about distributed systems since before such things existed.


And Vinge’s vision of a future where massively complex systems are constructed by enabling communication between autonomous distributed systems is exactly what gets me excited! It is like object-oriented design meets distributed architecture in a truly productive and awesome manner. If this really is the future of service-orientation then sign me up!


The second main theme is the idea that most systems wrap older sub-systems. Rather than rewriting or enhancing a subsystem, it is just wrapped by a newer and more useful system. Often the new system is more abstract, leaving hidden functionality available to those who know how to tap directly into the older subsystem directly.


This second theme enables the first. Unless systems (and subsystems) are viewed as autonomous entities, it is impossible to envision a scenario where service-oriented architecture is a dominant idea. For better or worse, this includes dealing with the fact that you may not like the way a system works. You just deal with it, because it is autonomous.


To digress a bit, what we’ve been trying to do for decades now is get computers to model real life. We tried with procedures, then objects, then components. They all miss the boat, because the real world is full of unpredictable behavior that we all just deal with.


We deal with the jerks that use the shoulder as an illegal turn lane. We deal with the fact that our federal tax cuts just get redirected so we can pay local taxes and school levies. We deal with the fact that some lady is so busy on the cell phone that she rear-ends you at 40 mph when you are stopped at a red light. We deal with the fact that the networks run R rated movie commercials during primetime when our kids are watching TV.


The point is that people and all our real world systems and devices and machines are autonomous. All our interactions in the real world are done through a set of protocols and we just hope to high heaven that the other autonomous entities around us react appropriately.


Service-oriented architecture/design/programming is the same thing. It has the potential to be the most accurate model of real life yet. But this won’t be painless, because any software we write must be ready to deal with the autonomous nature of all the other entities in the virtual setting. Those other autonomous entities are likely to do the direct equivalent of using the shoulder as a turn lane – they’ll break the law for personal advantage and from time to time they’ll cause an accident and every now and then they’ll kill someone. This is true in the real world, and it is the future of software in the service-oriented universe.


To bring this back to Vinge’s Deepness, the various combatants in the book make full use of both the distributed autonomous nature of their computer systems, and of the fact that the systems are wrapping old – even ancient – subsystems with hidden features. It isn't understanding a computer language that counts, it is understanding of ancient, lost features of deeply buried subsystems that gives you power.


We are given a vision of a future where systems and subsystems are swapped and tweaked and changed and the overall big system just keeps on working. At most, there’s adaptation to some new protocol or interface, but thanks to autonomy and abstraction the overall system keeps working.


It is perfect? Absolutely not. In fact I never saw the big twist coming – nor did the protagonists or antagonists in the book. The overall system was too complex, too autonomous. There was no way they could have anticipated or monitored what eventually occurred. Very cool (if a bit scary). But I don’t want to spoil it entirely, so I’ll leave it there.


Go read the book, hopefully it will inspire some of the same excitement I got by reading it. It certainly gave me an appreciation for the cool (and scary) aspects of a truly service-oriented world-view!


Tuesday, September 21, 2004 7:59:04 AM (Central Standard Time, UTC-06:00)  #    Disclaimer
 Wednesday, July 7, 2004

I just got my author copies of the book, so it has been printed and is in distribution! This should mean that, any day now, bookstores will get copies and Amazon should start shipping them.

CSLA .NET">Click here for more information on both the VB .NET and C# editions of the book, as well as links to the code, the online discussion forum and other related information.


Books | News
Wednesday, July 7, 2004 11:57:40 AM (Central Standard Time, UTC-06:00)  #    Disclaimer