Looking for CSLA Input Good / Bad

Looking for CSLA Input Good / Bad

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


KeithElder posted on Wednesday, November 28, 2007

Hello!

We are evaluating CSLA at work to adopt it as a "standard" for application development moving forward.  For those of you that have used it for a long time I'd love to get your feedback about the framework.  I posted an entry on my blog explaining more details here:

http://keithelder.net/blog/archive/2007/11/28/To-CSLA-or-Not-CSLA--Your-Thoughts.aspx

Feel free to leave a comment there or here on the forums.  I'm looking for war stories, success stories, battle scars (and if they healed), performance considerations, or whatever you want to throw out. 

For those that share their feedback, thank you for taking the time to share it in advance.

-Keith

JoeFallon1 replied on Wednesday, November 28, 2007

I have been using CSLA for 4 years. (For an ASP.Net app.) It has been fantastic. It is an excellent framework.

There are lots of details to learn - but once you are up to speed it is very straightforward to build CSLA business objects. I use Codesmith templates to build them. I can get thousands of lines of code generated in just a few minutes and it all works perfectly and compiles right away. I can't imagine building BOs by hand - the number of bugs would be huge.

The best idea we had was to create Use Case Controller objects which are simply Root objects that contain all the BOs needed for a particular use case. I originally called them a Unit Of Work so I suffix them with UOW (but apparently that is not a good term to use for these kinds of BOs - Use Case Controller is better.)

Being a Root object the UOW has its own rules and can tell if any contained objects are dirty or valid. This lets me call Save on the UOW and all the contained BOs get updated correctly. I can also display all the Broken Rules for the UOW and its contained BOs.

Rocky has been continually improving CSLA and the community is very strong. No negative experiences. It is that good. Highly recommended.

Joe

 

 

 

KeithElder replied on Wednesday, November 28, 2007

Thanks for the comments Joe.  Let me ask you this, how do you handle your data interaction?  Are you doing stored procs, an ORM mapper to map your objects?  What have you found that works the best?

JoeFallon1 replied on Thursday, November 29, 2007

I have avoided Stored Procedures because I need to support both SQL Server and Oracle. I have a set of classes where I define the SQL statements. Then I use a DAL that I wrote which is very similar to the MS DAAB. This allows me to encapsulate all the ADO.Net commands into one namespace.

So my DataPortal_xxx methods have code like:

dr = New SafeDataReader(DAL.ExecuteReader(cn, CommandType.Text, SomeDAO.SelectByUserkey(mUserkey)))

The class SomeDAO above returns the SQL string with the passed in userkey as the parameter.

DAL.ExecuteReader is one of the dozen overloaded methods that allow me to execute the datareader without writing all the ADO.Net code more than once.

Other people have used OR mappers like NHibernate. So you can see that the DataPortal is a very flexible concept.

Joe

pandelaras replied on Thursday, November 29, 2007

Indeed Csla is one great framework, which only extends and speeds up your project development. I am using it for 3 months and i am very satisfied. It is continually improving. It supports all kind of database interaction. I am using both SPs and standard coded queries without any problems. To be sincere there are some things which probably i could never do if i didnt use this framework.

Copyright (c) Marimer LLC