CSLA .NET Version 3.0 Beta 2 is now available for download.
This is the final test release of version 3.0. Any changes between now and release will be bug fixes.
If you plan to upgrade please consider helping yourself and the community at large by downloading this version and testing it before July 5. Let me know about any issues through the forum.
CSLA .NET 3.0 provides support for Microsoft .NET 2.0 and 3.0.
If you want to build CSLA .NET 3.0 without .NET 3.0, you must define the NET20 symbol in the project properties.
CSLA .NET 3.0 includes enhancements useful to all 2.1.4 users, including these highlights:
Validation rules
· PropertyFriendlyName – specify a friendly name to use when displaying broken rule text
· Format – specify a format mask to use when displaying broken rule numeric values
· StringMinLength – new validation rule method
· DecoratedRuleArgs – useful for code generation of AddBusinessRules() methods
· Fix bug with stopProcessing and rule priorities
· RegEx – rule method now supports options for dealing with null values
Authorization
· New CanExecuteMethod() functionality, similar to CanReadProperty() and CanWriteProperty()
Undo and Data binding
· If edit levels get out of sync an exception is thrown, making debugging of Windows Forms data binding much easier
Interfaces
· Cleaned up and rearranged interfaces to provide more consistency – making it easier to create UI frameworks on top of CSLA business layers
SmartDate
· Added TryParse() method
· Fix bug with CompareTo() method
SortedBindingList and FilteredBindingList
· Allow access to underlying source list
ProjectTracker\PTWin
· Reworked data binding code to address all known issues
See the change log for a complete list of changes.
Of course the primary focus of CSLA .NET 3.0 is support for Microsoft .NET 3.0. Highlights include:
· WcfProxy – a data portal channel that uses WCF. You can transparently move from any existing data portal channel to WCF by using this new proxy.
· DataContract – support for using the WCF DataContract and DataMember attributes in your business classes
· WPF
o CslaDataProvider – a data provider control that can create, fetch, save and cancel edits on a CSLA .NET business object. In some cases this can lead to code-less data entry forms!
o Validator – a control that provides Windows Forms ErrorProvider-like behavior to WPF forms that are data bound to CSLA .NET objects.
o Authorizer – a control that provides Windows Forms AuthorizeReadWrite-like behaviors to WPF forms that are data bound to CSLA .NET objects.
o ObjectStatus – a control that exposes IsValid, IsSavable and other properties from a CSLA .NET business object so they can be used by XAML data binding.
o IdentityConverter – a value converter that can be used to work around an issue with data binding and refreshing the UI.
ProjectTracker\PTWpf
· Added new WPF UI with equivalent functionality to PTWin.
ProjectTracker\PTWorkflow
· Added new Workflow UI to illustrate how a workflow can use CSLA .NET business objects
ProjectTracker\PTWcfClient and PTWcfService
· Added a WCF service illustrating how to expose CSLA .NET objects through WCF/SOA
· Added a WCF client app illustrating how to call a WCF service
ProjectTracker\WcfHost
· Added a WCF host for the data portal
Well copying and pasting from Word didn't work so well, sorry about that.
You can go to my blog to get a version that's easier to read:
http://www.lhotka.net/weblog/CSLANET30Beta2AvailableForDownload.aspx
All rule args classes like MaxLengthRuleArgs inherit from
RuleArgs, so all custom rule args (yours, mine, everyone’s) just got
PropertyFriendlyName, along with the Shared/static GetPropertyName() helper
method that can be used to get the property name (friendly first, and if it
doesn’t exist then normal property name).
Look at CommonRules for examples.
Rocky
From: claptik
[mailto:cslanet@lhotka.net]
Sent: Tuesday, June 26, 2007 12:40 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA .NET 3.0 Beta 2 available for download
Rocky,
I like how you added the PropertyFriendlyName to ruleargs. Would it also
make sense to also do this for the common rule args (MaxLengthRuleArgs, etc.)?
Thanks.
Matthew Sorvaag:
I am testing out the beta and have a question to ask...
I am skinning my controls so when there is a validation error, I am giving it a red border with rounded corners similar to the way CSLA does it.
How would I go about modifying/overriding the CSLA validator styles? I am doing this on textboxes at the moment.
This is in WPF I assume? You do this using normal styling and a trigger. The technique is exactly the same as you'd use for changing the style of a control based on an exception or other error. Paul Stovell has a good article on the concepts:
Did the combobox contain items of that same type that had a
Value property?
Or more specifically, can you provide more detail here? Or even
better some sample code or a repro?
If it is a bug I’d like to find/fix it.
Rocky
From: GlennMiller
[mailto:cslanet@lhotka.net]
Sent: Monday, July 09, 2007 12:44 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA .NET 3.0 Beta 2 available for download
We are using Beta 2 for a WPF app.
For the most part everything is working great!
We did find one issue. Don't use reserved words for property names!
We had a property called Value. We had an instance rule for Value.
What would happen is when it hit the Validator.ErrorScan() things would go very
wrong. Not only did our textbox "Value" become flagged with an error
(correctly), but all our combo boxes had a small red box directly around the
text (not the entire combo).
I don't know if I would categorize this as a bug. But maybe a developer
assumtion? Our solution was to rename the property to something else. Just
incase anyone else runs into this we thought we should post this.
Copyright (c) Marimer LLC