The CSLA Framework V2; what is in it for
me?
BarryMossman<is_at>primos.com.au
This is version 2 of this article. A new version was required
because we now have new major version of CSLA. I have rewritten my
demonstration program, and the new version is not only smaller, but
it is also more functional. This is due to the fact that the quick
answer to the “CSLA; what is in it for me” question was
“lots”, and now the answer is “lots
more”.
Version!! This article relates
to CSLA version 2 which runs with .NET version 2. There is an older
version of this article covering CSLA version 1 available here.
Source!!
The source (C#) for my demonstration program is available
as a download from this site, as a number of people wrote asking for
it last time.
Printing!!
If you wish to print this article see the Printing Tips page within
the Articles section of this site.here.
If you already know what CSLA
can do for you, and are looking for Chris
Denslow's CSLA Desktop Reference site (C# and VB) it is here.
Aim of this article
In 2005 I set myself the task of examining Rockford Lhotka’s
CSLA (Component based, scalable, logical architecture) framework
The things I already knew about CSLA were:
it is aimed at facilitating the use of business objects
(BO's), built along OO principles, which can be optionally deployed
in a distributed-application environment
it is built upon .NET (v1.1, now with a new version for .NET
V2)
it is documented by Rocky's books (see links section)
it comes in C# and VB.Net flavours (both the book and the
framework source)
it's source is distributed for free, with a generous right to
use license
it is a real-world framework, with a large and active user
community
I bought the book, and got started. I found that it is not a small
task coming to grips with what CSLA is, what it delivers, and whether
it was going to be worth the effort anyway.
The deliverables are of course laid out in the book, and I am not
meaning to suggest that Rocky writes unclearly. It is just that the
CSLA framework is a large body of work. Rocky has built, and
extended, the techniques over a long period of time. He started in
1997 with his first book on the subject using COM through COM+. He
then completely re-developed for .NET starting in 2002. The .Net
version of the framework is now at it’s 7th release
level (2.0). It is a large book, the C# version weighs in at nearly 2
and a half pounds and 690 pages in depth.
If you are new to .Net the challenge is compounded. It is quite a
steep learning curve, even if you are familiar with OOP concepts,
.NET and ADO.NET basics. It employs reasonably advanced use of
.NET facilities such as:
The CSLA framework is an open source style effort, rather than a
commercial product, and as such comes without extensive install,
on-line help or quick start facilities.
For all of the above reasons I found the exercise a challenge. A
very worthwhile challenge, enjoyable even, but definitely more of an
expedition than a quick and easy yes|no answer.
The aim of this document is to quickly focus upon the deliverables
as I see them. Mostly ignore any “how to” material.
Instead try and answer the “What’s in it for me?”,
or the “Why bother?” questions. There are links at the
bottom of the article pointing to existing how to material, Rocky,
and the books themselves.
List of CSLA deliverables
Firstly let me open by saying that this is not a complete list of
CSLA's deliverables. It may not even be a list of all the
deliverables that could be important to you. It is just a list
of those deliverables that are apparent to me, and that I have spent
some time examining.
Also you will see that I have used a Windows Forms desktop
application to demonstrate CSLA's utility. The BOs could equally be
deployed by a Web Forms application, or used via Web Services. I am
using C#. The framework and the underlying book, also come in a
VB.Net flavour. My demonstration application is based upon version
2.0 of the CSLA framework.
Smart and mobile Business Objects
Minimise, and simplify, the code in the UI
Full support of complex data binding
Object relational mapping
Business rules
N-level undo
Security
Scalability
Localisation
Best practice
Community
Licence to use
|