CSLA .NET version 3.0 is now available for download.
See this blog post for the full announcement and details.
Also, catch the official release announcement on .NET Rocks!
Something is wrong then, because there’s no such thing as
AuthorizationPanel anymore – it is now Authorizer.cs.
I just checked the zip file and it is correct – is it
possibly you have some old code in your directory or something?
Rocky
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Tuesday, July 10, 2007 11:01 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA .NET 3.0 Available
Great, this is before my next release!
I found a "bug" though; the C# solution doesn't compile if NET20 is
defined.
Error 1 The type or namespace name
'VisibilityMode' could not be found (are you missing a using directive or an
assembly reference?)
C:\source\Csla\Csla\Wpf\AuthorizationPanel.cs 49
12 Csla
I'll comment that class myself for now though.
Andy
Rocky,
I'm sitting here listening to your show on .NET Rocks! and trying to compile the VB version of CSLA 3.0 on a machine with the .NET Framework 2.0 (but not 3.0) and I'm getting five "The referenced component could not be found" warning messages. Looking at Csla.vbproj, I see references to version 3.0.0.0 for PresentationCore, PresentationFramework, System.Runtime.Serialization, System.ServiceModel, and WindowsBase.
Can you tell me what I need to do to compile without installing version 3.0 of the Framework? Thanks!
Yes, you will get the warnings. There’s no way I know of
to prevent them, because (I don’t believe) you can put compilation
conditionals in a vbproj file.
If I’m wrong, and you can put conditional symbol checks in
a vbproj file then I’m happy to do so.
Otherwise, these are just warnings and you can ignore them. Or
you can go into the project’s references and remove the references to the
missing assemblies.
Rocky
Thanks, the new DLL works great in my initial testing.
You may want to put a note about these warnings on http://www.lhotka.net/Article.aspx?id=ac20fe4c-6afc-4176-bcb4-d74b5a370356 because I'm sure I'm not the only one who will ask.
Stephen
Stephen Richards:Thanks, the new DLL works great in my initial testing.
You may want to put a note about these warnings on http://www.lhotka.net/Article.aspx?id=ac20fe4c-6afc-4176-bcb4-d74b5a370356 because I'm sure I'm not the only one who will ask.
Stephen
Excellent point - I've added a note to that effect, thanks!
I had two NUnit failures in the C# tests:
Error expected 4 and returned 5, either are correct mine returned 5
public void AscendingSort()
{
int[] intArr = { 45, 23, 56, 56, 11, 87, 94, 44 };
. . .
Assert.AreEqual(true, sortedList.Contains(56));
// as there are two values both 4 or 5 are correct indices
//Assert.IsTrue(4, sortedList.IndexOf(56)); <- mine retured 5
// changed the test to:
Assert.IsTrue(sortedList.IndexOf(56) == 4 || sortedList.IndexOf(56) == 5,
"Expected either 4 or 5 for an index value, returned:"+sortedList.IndexOf(56).ToString());
Error Expected 1 returned 0
[TestMethod()] This test is ok but it creates the per type rules before the next test
public void StringRequired()
{
ApplicationContext.GlobalContext.Clear();
ApplicationContext.GlobalContext["Shared"] = 0;
HasPerTypeRules root = new HasPerTypeRules();(); ß--Sets per type rules in this test and sets shared to 1
. . .
}
[TestMethod()]
public void NoDoubleInit()
{
ApplicationContext.GlobalContext.Clear();
ApplicationContext.GlobalContext["Shared"] = 0;
HasPerTypeRules root = new HasPerTypeRules root = new HasPerTypeRules();
// this test fails as the per type rules were set in the previous test.
Assert.AreEqual(1, (int)ApplicationContext.GlobalContext["Shared"], "Rules should init just once");
}
Reversing the order of the methods fixes the test.
>> The later only happens when running the tests using TestDriven.Net
>> The former with both TestDriven.Net and NUnit v2.4.1
Thanks for sharing all your great work.
Jay
Solutrian:I had two NUnit failures in the C# tests:
That's odd. I just rechecked and the tests run fine for me.
Well, except for a missing reference to WindowsBase - so I did fix that and update the download.
I plan to write an ebook showing how to use the new features and enhancements in CSLA .NET 3.0. This ebook should be available in the third quarter of 2007 (probably September).
Should we wait to september to use CSLA .Net 3.0 ?
Thanks
Richard
That is entirely up to you.
3.0 is complete and released at this point, but obviously there
is scant documentation – just the change log, ProjectTracker and some of
the samples in svn. The 3.0 ebook will provide more documentation on how to use
the new features, and I hope that it proves to be very valuable to people.
There are some important bug fixes in 3.0 however,
especially in BusinessListBase and a couple other places – and with
n-level undo in general. So if you are trying to do data binding in Windows
Forms I suggest that you do want 3.0 as soon as you can get it.
The thing is this: other than some bug fixes, you can treat 3.0
just like 2.1.4. You can ignore the new features, and just use it as you’ve
been using 2.1.4. Then when the ebook comes out you can choose to start using
the new features based on that documentation.
It is also the case that many of the really interesting new
features center around WCF and WPF. While there are some really nice
enhancements elsewhere, they are largely optional (unless you really wanted “feature
X” – in which case you probably know what it does already).
Rocky
From: RichardETVS
[mailto:cslanet@lhotka.net]
Sent: Thursday, July 12, 2007 8:36 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA .NET 3.0 Available
I plan to write an ebook showing how to use the new features and enhancements in CSLA .NET 3.0. This ebook should be available in the third quarter of 2007 (probably September).
Should we wait to september to use CSLA .Net 3.0 ?
Thanks
Richard
Ok, thanks
Richard
I don't think anything changed from beta 2 to release - at least in regards to any n-level undo behaviors.
The only meaningful change to the core framework was to implement INotifyCollectionChanged (a CollectionChanged event) on BusinessListBase. That should not impact Windows Forms at all, because the event and interface are WPF concepts.
RockfordLhotka:The only meaningful change to the core framework was to implement INotifyCollectionChanged (a CollectionChanged event) on BusinessListBase. That should not impact Windows Forms at all, because the event and interface are WPF concepts.
Rocky,
On that note... We decided to implement a custom BusinessListBase class as well as a custom BusinessBase class when we started using CSLA. Our application does property level authentication based off of role user levels and a database defined data-dictionary (basically allowing the user to define what each role can see/edit). We figured the best implementation was to override the CanReadProperty and CanWriteProperty in our own implementation of the business base classes. Anyways, I took a copy of our solution (currently using the latest CSLA 2 version) off line to test it with the new CSLA 3.0 framework and I am getting an error with our BusinessListBase.
This is currently what the class declaration looks like...
public
abstract class XEBusinessListBase<T, C> : BusinessListBase<T, C> where T : XEBusinessListBase<T, C> where C : IEditableBusinessObjectEvery one of our XEBusinessListBase objects now is throwing an error regarding 'INotifyCollectionChanged'.
Error 58 The type 'System.Collections.Specialized.INotifyCollectionChanged' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
So I guess I have 2 options? Make a reference to the .NET 3.0 WindowsBase assembly in all my Business Object assemblies or change something around with my custom BusinessListBase class. Can you give me some suggestions?
I briefly looked at your new BusinessListBase declaration and I noticed...
#if
!NET20,
INotifyCollectionChanged#endif
Is there a quick fix so I can get back to testing CSLA 3.0 with our application? Thanks!
You either need to reference the .NET 3.0 assemblies, or you
need to build CSLA .NET without .NET 3.0 support
http://www.lhotka.net/Article.aspx?area=4&id=ac20fe4c-6afc-4176-bcb4-d74b5a370356
Rocky
From: Patrick.Roeper
[mailto:cslanet@lhotka.net]
Sent: Thursday, July 19, 2007 3:41 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] RE: CSLA .NET 3.0 Available
RockfordLhotka:
The only meaningful change to the core framework was to implement INotifyCollectionChanged (a CollectionChanged event) on BusinessListBase. That should not impact Windows Forms at all, because the event and interface are WPF concepts.
Rocky,
On that note... We decided to implement a custom BusinessListBase class as
well as a custom BusinessBase class when we started using CSLA.
Our application does property level authentication based off of role
user levels and a database defined data-dictionary (basically allowing the
user to define what each role can see/edit). We figured the best
implementation was to override the CanReadProperty
and CanWriteProperty in our own implementation of the business base
classes. Anyways, I took a copy of our solution (currently using the
latest CSLA 2 version) off line to test it with the new CSLA 3.0 framework
and I am getting an error with our BusinessListBase.
This is currently what the class declaration looks like...
public abstract class XEBusinessListBase<T,
C> : BusinessListBase<T, C> where T : XEBusinessListBase<T,
C>
where C : IEditableBusinessObject
Every one of our XEBusinessListBase objects now is throwing an error
regarding 'INotifyCollectionChanged'.
Error 58 The type
'System.Collections.Specialized.INotifyCollectionChanged' is defined in an
assembly that is not referenced. You must add a reference to assembly
'WindowsBase, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.
So I guess I have 2 options? Make a reference to the .NET 3.0 WindowsBase
assembly in all my Business Object assemblies or change something around with
my custom BusinessListBase class. Can you give me some suggestions?
I briefly looked at your new BusinessListBase declaration and I noticed...
#if !NET20
, INotifyCollectionChanged
#endif
Is there a quick fix so I can get back to testing CSLA 3.0 with our
application? Thanks!
Annnddddd it builds again. Thanks Rocky.
Rocky,
One BusinessBase I have contains a child BusinessListBase similar to the Project/Resources (ProjectEdit Form) you have in ProjectTracker. I am not pulling the data for the child from a DB but just creating each child as a new object. I am binding to a TreeList instead of a grid. I dont know what I am doing wrong but the child never shows as being dirty.
ADDED: I tested this as well with the DataGrid with not difference. I also examined the ChildList on form load and verified the data in each Child in the collection (16). I then changed the value of the only editable property (a boolean Checked value) in the child, confirmed that it indeed was changed at the beginning of the Save procedure but the IsDirty flag on this child, even though changed, was still False. I am sure it is something simple I am doing wrong.
Also, when editing a Project in ProjectTracker (new 3.0) and clicking Apply the form just reloads empty. This is the code I am using in my project; I wonder if there is a problem with this code.
Thank You,
Rob
One other quick question: I notice that we went from EndEdit() on the BindingSource to ApplyEdit() and BeginEdit() on the CSLA object, would you mind explaining this change? Also, we have a lot of code like 2.1 code where we are firing the EndEdit() function and then rebinding by setting DataSource to nothing and then back to the BO; is this method still okay? It seems to work okay even with the 3.0 CSLA.
Thank You,
Rob
Read through this thread regarding data binding
http://forums.lhotka.net/forums/1/16971/ShowThread.aspx
The only correct code out there now is found in 3.0.2, at least for parent-child data in the same form, where you want a form-level Cancel button. That is the code I'll be discussing in the 3.0 ebook.
Things are a little simpler if you don't have parent-child data, but the same pattern is still required.
Things are much simpler if you don't have a form-level Cancel button, because then there's never a need to call any n-level undo methods directly on the business object. In that case you only call the methods on the bindingsource.
Rocky,
I think I found why the ProjectEdit form did not reload after clicking the Apply button. (I am using the VB version) The "rebind" If statement was inside the Else side of the If SaveObject statement. I put it in the finally section and it seems to work okay.
Rob
Sorry to query so much but I noticed another slight difference when editing now compared to before. Now if you do not move the focus away from the edited control (ie - Checkbox) it does not see this as a change. I think this may be because now we are not performing EndEdit on the bindingsource. Do you have an alternative way we can commit any changes to the currently focused control without leaving that control?
Thank You,
Rob
I don’t follow you? You _must_ call EndEdit() on
the bindingsource, then unbind it, then call ApplyEdit() on the business
object.
The UnbindBindingSource() method calls EndEdit() or CancelEdit()
as appropriate.
Rocky
From: culprit
[mailto:cslanet@lhotka.net]
Sent: Wednesday, September 05, 2007 2:18 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] RE: CSLA .NET 3.0 Available
Sorry to query so much but I noticed another slight difference when editing
now compared to before. Now if you do not move the focus away from the edited
control (ie - Checkbox) it does not see this as a change. I think this may be
because now we are not performing EndEdit on the bindingsource. Do you have an
alternative way we can commit any changes to the currently focused control
without leaving that control?
Thank You,
Rob
You have to call PropertyHasChanged() in your set blocks, or no
one will know that the property has changed.
Rocky
From: Rob Standridge
[mailto:cslanet@lhotka.net]
Sent: Thursday, September 06, 2007 11:45 AM
To: rocky@lhotka.net
Subject: RE: [CSLA .NET] RE: CSLA .NET 3.0 Available
Rocky,
I am sorry to email you directly to ask you this but this is driving me crazy.
We are implementing CSLA in a very large project and I just have one issue that
I cant seem to get around.
I am creating a ChildCollection and Child objects manually by parsing a string
and then bind the parent to a form and the child to a grid. I change the value
on the child's Checked property and when I analyze the Child's properties
before saving it does show the new value but the IsDirty flag on the child collection
is still False. I am not sure what to do to make this flag change or what I can
do to force the object to save itself when the child collection has changed.
Below I have included the relevant code in the parent object and the full code
for the ChildCollection and Child:
Parent:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Private _claimFields As
InsuranceFields = ScriptAssist.InsuranceFields.NewInsuranceFields()
Public ReadOnly
Property ClaimFields() As
ScriptAssist.InsuranceFields
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Get
CanReadProperty("Claimfields",
True)
Return _claimFields
End Get
End Property
Public Overrides
ReadOnly Property
IsValid() As Boolean
Get
Return MyBase.IsValid AndAlso _claimFields.IsValid
End Get
End Property
Public Overrides ReadOnly Property IsDirty() As Boolean
Get
Return MyBase.IsDirty OrElse _claimFields.IsDirty
End Get
End Property
_claimFields =
InsuranceFields.GetInsuranceFields(_claimFieldsText)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Child Collection
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Csla
Imports Csla.Data
<Serializable()> _
Public Class InsuranceFields
Inherits BusinessListBase(Of InsuranceFields, InsuranceField)
#Region " BindingList Overrides "
Protected Overrides Function AddNewCore() As
Object
Dim item As InsuranceField = InsuranceField.NewInsuranceField
Me.Add(item)
Return item
End Function
#End Region ' BindingList Overrides
#Region "
Factory Methods "
Friend Shared Function NewInsuranceFields() As
InsuranceFields
Return New InsuranceFields()
End Function
Friend Shared Function GetInsuranceFields(ByVal ClaimFields As String) As
InsuranceFields
Return New InsuranceFields(ClaimFields)
End Function
Private Sub New()
MarkAsChild()
End Sub
Private Sub New(ByVal ClaimFields As String)
MarkAsChild()
Fetch(ClaimFields)
End Sub
#End Region ' Factory Methods
#Region "
Data Access "
Public Function GetClaimFields() As String
Dim sClaimFields As String = ""
For Each Field As InsuranceField In Me
If Field.Checked = True Then
sClaimFields = sClaimFields & Field.Key
End If
Next
Return sClaimFields
End Function
Private Sub Fetch(ByVal ClaimFields As String)
RaiseListChangedEvents = False
'Here aer the 3.2 only fields
Me.Add(InsuranceField.GetInsuranceField("CF,CG,CH,CI,CJ,CK-", "Employer
Fields", CBool(InStr(ClaimFields, "CF"))))
Me.Add(InsuranceField.GetInsuranceField("DY-", "Date of
Injury", CBool(InStr(ClaimFields, "DY"))))
Me.Add(InsuranceField.GetInsuranceField("DZ-", "Claim/Ref (Injury
Type)", CBool(InStr(ClaimFields, "DZ"))))
'Fields common between 3.2 and 5.1
Me.Add(InsuranceField.GetInsuranceField("CM,CN,CO,CP-",
"Patient Address", CBool(InStr(ClaimFields, "CM"))))
Me.Add(InsuranceField.GetInsuranceField("CQ-", "Patient
Phone", CBool(InStr(ClaimFields, "CQ"))))
Me.Add(InsuranceField.GetInsuranceField("DR-", "Physician Last
Name", CBool(InStr(ClaimFields, "DR"))))
'Fields unique to 5.1
Me.Add(InsuranceField.GetInsuranceField("CA,CB-", "Patient Name",
CBool(InStr(ClaimFields, "CA"))))
Me.Add(InsuranceField.GetInsuranceField("CX-", "Patient SSN", CBool(InStr(ClaimFields, "CX"))))
Me.Add(InsuranceField.GetInsuranceField("EJ-", "Orig Product ID
Qualifier", CBool(InStr(ClaimFields, "EJ"))))
Me.Add(InsuranceField.GetInsuranceField("AM06-", "WC Segment", CBool(InStr(ClaimFields, "AM06"))))
Me.Add(InsuranceField.GetInsuranceField("EA-", "Orig Product
Code", CBool(InStr(ClaimFields, "EA"))))
Me.Add(InsuranceField.GetInsuranceField("EB-", "Orig Prescribed
Qty", CBool(InStr(ClaimFields, "EB"))))
Me.Add(InsuranceField.GetInsuranceField("AM13-", "Include Clinical
Seg", CBool(InStr(ClaimFields, "AM13"))))
Me.Add(InsuranceField.GetInsuranceField("MED-", "Medicare
Format", CBool(InStr(ClaimFields, "MED"))))
Me.Add(InsuranceField.GetInsuranceField("DX-", "Send Copay", CBool(InStr(ClaimFields, "DX"))))
Me.Add(InsuranceField.GetInsuranceField("2E-", "Include PCP
ID", CBool(InStr(ClaimFields, "2E"))))
RaiseListChangedEvents = True
End Sub
#End Region ' Data Access
End Class
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Child
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Csla
Imports Csla.Data
Imports Csla.Validation
<Serializable()> _
Public Class InsuranceField
Inherits BusinessBase(Of InsuranceField)
#Region " Business Properties and
Methods "
' declare members
Private _ID As Guid = Guid.Empty
Private _key As String = ""
Private _name As String = ""
Private _checked As Boolean = False
<System.ComponentModel.DataObjectField(True, True)> _
Public ReadOnly Property ID() As Guid
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Get
Return _ID
End Get
End Property
Public Property Key() As String
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Get
Return _key
End Get
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Set(ByVal value As String)
_key = value
End Set
End Property
Public Property Name() As String
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Get
Return _name
End Get
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Set(ByVal value As String)
_name = value
End Set
End Property
Public Property Checked() As Boolean
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Get
Return _checked
End Get
<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)>
_
Set(ByVal value As Boolean)
_checked = value
End Set
End Property
''' <summary>
''' Get the unique id for the current object.
''' </summary>
''' <returns>A value that is the unique id of the object.</returns>
''' <remarks></remarks>
Protected Overrides Function GetIdValue() As
Object
Return _ID
End Function
#End Region ' Business Properties and Methods
#Region "
Validation Rules "
''' <summary>
''' Method that allows the addition of custom
business rules.
''' </summary>
''' <remarks></remarks>
Private Sub AddCustomRules()
'todo: add custom/non-generated rules here...
End Sub
''' <summary>
''' Method that allows the addition of shared
custom business rules.
''' </summary>
''' <remarks></remarks>
Private Sub AddSharedCustomRules()
'todo: add custom/non-generated shared rules
here...
End Sub
''' <summary>
''' Method used to instigate the addition of
all Business rules both Custom and Common.
''' </summary>
''' <remarks></remarks>
Protected Overrides Sub
AddInstanceBusinessRules()
AddCustomRules()
MyBase.AddBusinessRules()
End Sub
''' <summary>
''' Method that allows the addition of shared
common business rules.
''' </summary>
''' <remarks>These rules represent the database defaults that can be
generated.</remarks>
Private Sub AddSharedCommonRules()
End Sub
''' <summary>
''' Method used to instigate the addition of
all Business rules both Custom and Common.
''' </summary>
''' <remarks></remarks>
Protected Overrides Sub AddBusinessRules()
AddSharedCommonRules()
AddSharedCustomRules()
MyBase.AddBusinessRules()
End Sub
#End Region ' Validation Rules
#Region "
Authorization Rules "
Protected Overrides Sub AddAuthorizationRules()
End Sub
#End Region ' Authorization Rules
#Region "
Factory Methods "
Friend Shared Function NewInsuranceField() As
InsuranceField
Return New InsuranceField()
End Function
Friend Shared Function GetInsuranceField(ByVal Key As String, ByVal Name As
String, ByVal Checked As Boolean) As InsuranceField
Return New InsuranceField(Key, Name, Checked)
End Function
Private Sub New()
ValidationRules.CheckRules()
MarkAsChild()
End Sub
Private Sub New(ByVal Key As String, ByVal Name As String, ByVal Checked As
Boolean)
MarkAsChild()
Fetch(Key, Name, Checked)
End Sub
#End Region ' Factory Methods
#Region "Data
Access"
Private Sub Fetch(ByVal Key As String, ByVal
Name As String, ByVal Checked As Boolean)
_ID = Guid.NewGuid
_key = Key
_name = Name
_checked = Checked
MarkOld()
ValidationRules.CheckRules()
End Sub
#End Region
End Class
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I greatly appreciate your insight on this issue. I would prefer to remove much
of the validation/authorization and other unneeded code from the
ChildCollection and Child if possible.
Sincerely,
Rob
Invite
your mail contacts to join your friends list with Windows Live Spaces. It's
easy! Try it!
I know this goes along with some saying about the Forest but can't remember it. Thankfully I did not go into rocket science.
Thank you Rocky
Thanks, it is now correct in svn.
Rocky
From: culprit
[mailto:cslanet@lhotka.net]
Sent: Wednesday, September 05, 2007 1:54 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] RE: CSLA .NET 3.0 Available
Rocky,
I think I found why the ProjectEdit form did not reload after clicking the
Apply button. (I am using the VB version) The "rebind" If statement
was inside the Else side of the If SaveObject statement. I put it in the
finally section and it seems to work okay.
Rob
I’m not sure I understand the question.
Yes, you can use all those technologies together.
But if you are asking if you can use the ASP.NET
ObjectDataSource control with CSLA objects the general answer is no. The
ObjectDataSource control is designed to work primarily with DataTables, and as
a bonus it works with data transfer objects (DTOs). But, as I discuss in the
book, it simply can’t handle the more complex business objects you
typically create using CSLA .NET (objects with read-only properties, validation
rules, private constructors, etc).
If you are asking about the ASP.NET membership providers,
then the answer is yes. You can use the ASP.NET membership provider instead of
Windows or CSLA custom authentication – as long as you don’t
have a separate application server.
And even if you do have a separate application server, you can still
use the ASP.NET membership provider, but you need to wrap their principal
object with a custom principal object. This is discussed in Chapter 10.
Rocky
From: jhoojharsinghyadav
[mailto:cslanet@lhotka.net]
Sent: Monday, July 23, 2007 9:12 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] CSLA .NET 3.0 Available
Hi Rocky,
I am quite new to CSLA .
BUt had worked on similar kind of architechtures in my previos projects .
in my current project , i am planning to use CSLA + AJAX+WF+PAGEFLOWS+WCF+ENT
LIB 3.0 +ASP.NET PROVIDERS
Would it be possible to have a integration of all the things and move ahead
smmmotthly , coz not using csla providers for the very reason had used the
aspnet_DB and customised it a lot with extending the default providers and
would be troublesome for me to move back to start from begining .
and need wf / pageflows to control whole of the flow of application and pages
with several action buttons .
ajax inddedd will be required .
Awaiting your valuable answer to this .
thanks
Govind
I can't provide free consulting, no. However, here are a couple suggestions:
jhoojharsinghyadav:hi rocky,
now i wnat to go for 3 tier deployment i.e my busines logic on application server , the datbase , and the iis hosting asp.net pages.
I strongly suggest you read chapters 1 and 2 of the Expert C#/VB 2005 Business Objects book, because those chapters discuss the intended and supported architectures for CSLA .NET. In fact, "CSLA" stands for component-based, scalable, logical architecture and so it is an architecture first, and a framework second.
CSLA is designed to put the business logic on both the client and app server using the concept of mobile objects.
I personally recommend against building web apps where the business logic is all on the app server. This means that every web request must go to the web server, then to the app server, probably to the database server and back to the user. The performance will usually be bad.
But if you really want to do that, then I suggest you limit your use of CSLA to the app server, and build your app server to expose a set of services as discussed in Chapter 11. Then you can build your web application to consume the web services, data binding directly to the service proxy objects. That will help keep the overhead as low as possible on the web server - which must be a goal for any hope of performance in such an archirecture.
hi rocky,
yes i had read those chapters being suggested by you .
as being suggested by you , i would rather choose to be on using the 2-tier architechture viz : application server + iis and dataserver .
so now it comes out that for this kind of a architechture i would be required only to implement the csla in library section and use them directly to my asp.net pages ( correct if wrong ) . and later on if required to sepaarate the application layer will implement a new layer for that but that woudl require a change of all so to avoid it what i feels is i go up with a wrapper layer which would give call to the library layer and then use that wrapper layer itself directly into my project . so as to when the web service layer is implemented it goes in betwwen the wrapper layer and library layer rather then wrapper layer and the presentation layer .
databse->librarylayer->wrapperlayer->asp.net
database->librarylayer->webservices/proxies->wrapperlayer->asp.net
no change required for front end as is .
one more request , i would like to begin a new forum thread to share up this with the forum users and get their valuable comments/suggestions on same .would it b possible for me to start a new thread of my own and watch it on continously .
thanks
govind
jhoojharsinghyadav:so now it comes out that for this kind of a architechture i would be required only to implement the csla in library section and use them directly to my asp.net pages ( correct if wrong ) . and later on if required to sepaarate the application layer will implement a new layer for that but that woudl require a change of all so to avoid it what i feels is i go up with a wrapper layer which would give call to the library layer and then use that wrapper layer itself directly into my project . so as to when the web service layer is implemented it goes in betwwen the wrapper layer and library layer rather then wrapper layer and the presentation layer .
I suppose you could do that, but that would make it difficult to get a lot of benefit from CSLA.
Remember that CSLA includes the data portal, which is designed so you can change from a two tier to a three tier architecture. When you use the data portal to do this, you are using mobile objects, and so the business layer runs on both the web server and application server.
The result is that you get the best of all worlds. The business logic that can run on the web server does run there. The business and data access logic that needs to run on the application server runs there.
jhoojharsinghyadav:one more request , i would like to begin a new forum thread to share up this with the forum users and get their valuable comments/suggestions on same .would it b possible for me to start a new thread of my own and watch it on continously .
Of course! That is a very good idea.
Hi rocky,
thanks for your valuable suggestions
coming on to the webservice part being implemented with project tracker and after going throught the chapter 11 here is my understandng of the same .
1. credential class is being implemented as a supportive class to pass on the user credentials so as to authenticate him prior mamking any call to the web methods.
my question is , does there do exist or possible a way so as to my websrvice calls become as simple as i am making calls to the buisness objects i mean mobile webmethods as the mobile objects are .
also please do suggest me the way to start up a new thread . as i was being unable to locate that .
thanks
govind
jhoojharsinghyadav:also please do suggest me the way to start up a new thread . as i was being unable to locate that .
Go here: http://forums.lhotka.net/forums/5/ShowForum.aspx
And click on the New Post button in the upper left.
govind,
I use both Roles and Permissions exactly as you describe.
Rocky is aware of the issue and has added a Delegate for IsInRole to the wish list. He just hasn't gotten around to implementing it yet.
Joe
When I tried to open VB solution in VS2005 (without sp1), it says the project is created in a newer version and can not be opened. Do I need VS2005 + SP1 or VS2008 Beta?
Thanks,
The cslacs and cslavb solutions both open in VS 2005 SP1. I
wouldn’t think Microsoft changed the sln file format just for a service
pack, but I suppose that is possible. You can probably just edit the sln file
in notepad and back the version number by one if that’s the case (but I really
doubt that’s the case).
Some of the _projects_ under the ProjectTracker folder
are VS 2008 projects – the readme.txt at the top level describes which
ones. Those projects are _not_ in the ProjectTracker solution. The
ProjectTracker solution is a VS 2005 SP1 solution, and only includes VS 2005
projects.
Rocky
Copyright (c) Marimer LLC