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”.

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.

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.

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:

Introduction

Key Object Concepts

Stereotypes

Serialization

Object Lifetime

Object Relationships

Object Identity and Equality

Platform Differences in .NET and Silverlight

Property Declarations

Method Declarations

Metastate

Solution Structure

Project Types and Assembly References

Combining Project to Create Solutions

Object Stereotypes

Editable Objects

Read-Only Objects

Execution Objects

Criteria Objects

LINQ Types

Windows Forms Types

Business Rules

Business and Validation Rules

Authorization Rules

>

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

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.

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

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

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!)

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!)

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 http://store.lhotka.net/) 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 download.lhotka.net web
page.

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.

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

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:

Introduction

About this ebook and the ebook series

Downloading, installing and building CSLA 4 and its samples

Architecture and Philosophy

Logical and Physical architecture

5 layer architecture

N-tier vs service-oriented

Applying the layers to real scenarios

Managing business logic

Defining a home for business logic

Behavioral object design

Mobile objects

Architectures and frameworks

>

CSLA .NET Framework

Basic design goals

Framework design

Base classes and stereotypes

Data binding

N-level undo

Business, validation and authorization rules

Data portal

Authentication

Data access helpers

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.

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 http://download.lhotka.net 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.

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.
[...]

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!

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
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
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
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.
[...]

(image) You
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 :)

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.

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 www.apress.com,
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.

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.

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[...]

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
WPF/XBAP
Windows Forms
asmx services
WCF services
WF workflows and activities
ASP.NET Web Forms
ASP.NET MVC
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.
[...]

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.
[...]

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 store.lhotka.net.
Download the 3.0.2 code from the CSLA
.NET download page.
[...]

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 store.lhotka.net.
(C# available now, VB available in early October)
Download the 3.0.2 code from the CSLA
.NET download page.
[...]

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!

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.

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!

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 Filtere[...]

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.

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!

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 :)

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[...]

CSLA .NET version 2.0.3 is now available for download at www.lhotka.net/cslanet/download.aspx.
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.

CSLA .NET version 2.0.2 is now available for download at www.lhotka.net/cslanet/download.aspx.
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.

CSLA .NET version 2.0.1 is now available for download at www.lhotka.net/cslanet/download.aspx.
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)

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!

A beta of CSLA .NET version 2.0.1 is now available from www.lhotka.net/cslanet/download.aspx.
This includes fixes for a number of bugs and errata (which you can find at www.lhotka.net/cslanet),
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.

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

This forum is a replacement for http://groups.msn.com/CSLANET -
which has served the community for a number of years. Unfortunately groups.msn.com
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 www.searchcsla.com, 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!

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.

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:

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:

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.

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!! :)

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!!

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.
[...]

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 forums.lhotka.net (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
Mid-April
Expert VB 2005
Business Objects available
[...]

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 :)
[...]

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:
Chapter
C#
VB
Cover
AU done
-
Front matter
AU done
-
1
TS done
TR done
2
TS done
AU
3
TS done
AU
4
TS
-
5
CE done
-
6
CE done
-
7
CE done
-
8
CE done
-
9
CE done
-
10
CE done
-
11
TR done
-
12
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.
[...]

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.

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.

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: http://dndj.sys-con.com/general/readerschoice.htm
To begin voting, click
on the "Click Here to Vote Now!" link.
Voting Ends Midnight, December 31,
2005
Thank you!
[...]

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:
Old
New
BusinessBase
BusinessBase(Of T)
BusinessBase
T = your business object type
BusinessCollectionBase
BusinessListBase(Of T, C)
BusinessListBase
T = your collection type
C = child object type
NameValueCollectionBase
NameValueListBase(Of K, V)
NameValueListBase
K = type of the key or name
V = type of the value
ReadOnlyBase
ReadOnlyBase(Of T)
ReadOnlyBase
T = your business object type
ReadOnlyCollectionBase
ReadOnlyListBase(Of T)
ReadOnlyListBase
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 lik[...]

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!!
[...]