CSLA 4 release

CSLA 4 release

Old forum URL: forums.lhotka.net/forums/t/9260.aspx

RockfordLhotka posted on Friday, July 23, 2010

I am very happy to announce the release of CSLA 4, with support for .NET 4, Silverlight 4 and Visual Studio 2010.

Download CSLA 4 here

This is a major release of the CSLA .NET framework, not only because of the support for the Visual Studio 2010 wave of technologies from Microsoft, but also because of significant changes to CSLA itself based on feedback and input from the vibrant CSLA community.

As always, CSLA .NET couldn’t exist as it does without the strong support I receive from Magenic. Thank you!

CSLA 4 is the result of a lot of effort on the part of a global development team:

CSLA 4 includes significant new features. See the change log for a complete history of the changes from 3.8 to 4. Here are some important highlights:

Since this is a major version change (from 3 to 4), there are numerous breaking changes, which are highlighted in the change log.

In terms of future activities:

I hope you enjoy CSLA 4 and find it useful in your development efforts. I know the CSLA 4 development team has put a lot of work into this release, and we’re all excited to see how people make use of it to create cool applications.

Code well, have fun!

lukky replied on Friday, July 23, 2010

Congrats to all the team !!!

bniemyjski replied on Tuesday, July 27, 2010


Also we worked hard on getting the CSLA CodeSmith templates in sync with CSLA4 and Silverlight 4. Which worked out nicely as it allowed us to QA CSLA4, quite a bit (maybe push an extra RC in hehe)!


-Blake Niemyjski

chethantr replied on Wednesday, July 11, 2012


Hi All,

CSLA has ben a wounderful o work around with and thanks for such a great framework. I have a project(developed by vendor) which is already using CSLA 3.8.2, now i(who dont have depth knowledge of CSLA) have to upgrade it into CSLA 4.3.12. The main issue here is time constraint. I have to complete this task in 6 weeks, and this solution file consists of 17 projects. So is there any link where in there is a direct comparision of these two versions of CSLA framework? Your early response would be appriciated.

Thanks in advance Embarrassed


JonnyBee replied on Wednesday, July 11, 2012


The release notes is best place to start. See link in Rockys post. Note the Breaking Changes.

#1: The new Rule system will require rewrite of rules and updated skills. 

#2: Create your own base classes (if ot already present). List classes is default ObservableCollection. For WindowsForms make sure that your base classes use XYZBindingList classes.

#3: PropertyChangedMode in 4.x is Xaml. Make sure to set to Windows if your client is WIndowsForms.

#4: Indexed LINQ (IQueryable) is removed from list classes.  Use Linq2Object and ToSyncList instead. 

#5: CommandBase is now Cloneable and the DataPortal will make a clone before sending/calling DataPortal_XYZ. 

chethantr replied on Friday, July 13, 2012

Hi JonnyBee,

Thanks a lot, you have been very helpful for me. I was able to convert most of the methods to higher version from the links provided by you.

If you can remember, there was a class called RuleArgs under Csla.Validation in 3.8.2 version. But I could not find equivalent Class in 4.3.12 version?

JonnyBee replied on Friday, July 13, 2012

That´s correct.

The entire ValidationRules namespace (including RuleArgs)  belongs to the old RuleEngine and is not part of the new RuleEngine.

It is possible to enable MOST of the old validation rules (at least for the migration period) but this is not included with CSLA. this possible by adding a few classes from the old rule engine and use rule extensions to add old style rules as LambdaRules in the new rule engine.

All Authorization rules and async business rules from the old rule engine must be rewritten to classes.

chethantr replied on Friday, July 13, 2012



JonnyBee replied on Friday, July 13, 2012

Rewrite the code in EventIsNotOverDelayLimit (static method) to a class that inherits from Csla.Rule.CommonRules.CommonBusinessRule. Ratherr the relying on RuleArgs you us the RuleContext parameter to the Execute metod in the rule. Remeber - 1 instance of the rule is used for ALL instances of a given class - and you should regard each rule instance as a singelton class (ie: NEVER store instance related properties in a rule instance).

The USING CSLA 4 - Creating Business Objects ebook is a good documentation of the new rule engine. You can also look at the Samples/Net/cs/RuleTutorial sample.

chethantr replied on Wednesday, July 18, 2012


I was able to re-strucutre the into class based on your input. Now its that, if you can remember that there was a class called "DecoratedRuleArgs" in Csla.Validation which was inheriting Csla.Validation.RuleArgs. Now in 4.X version, what would be the equivalent class, any input on this?

chethantr replied on Wednesday, July 18, 2012

to be more specific, here is my piece of code for 3.X version


        public class SyntaxRuleArgs<T> : DecoratedRuleArgs


            public T Syntax

            { get { return (T)this[SyntaxName]; } }


Also in some post i read that BusinessRule have some properties as an alternative for "public object this[string key] { get; set; }", but couldn't find it. 

JonnyBee replied on Wednesday, July 18, 2012

Read Rockys post, sectio InputProperties and InputPropertyValues:


BusinessRule also offers the ReadProperty/LoadProperty methods for access to properties in context.Target (similar to ObjectFactory).

chethantr replied on Wednesday, July 18, 2012

and how about the BrokenRulesCollection.CreateCollection() method in Csla.Rules.BrokenRulesCollection class? is CreateCollection ruled out?

JonnyBee replied on Thursday, July 19, 2012

BrokenRulesCollection has a public contructor now.

Please create new threads rather than postaing on this CSLA 4 Release annoncement thread.
These questions is not connected to the relese announcement of CSLA 4 - rather a theread on how to migrate rules from 3.x to 4.x.

Copyright (c) Marimer LLC