Is CSLA appropriate for this situation

Is CSLA appropriate for this situation

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


sbrickler posted on Tuesday, November 27, 2007

We have an application that integrates with many exising ERP solutions currently in the market. Our application provides a common editing interface for common tasks typically found in ERP systems.  Our system supports different ERP packages by developing a plugin architecture where each plugin defines a derived version of some base business object as well as an implementation of a data access layer for the respective ERP. Rarely do we work with the actual ERP database, often we utilize some sort of API typically webservice or xml based messaging etc. We are thinking of using CSLA for these business objects and just implementing the ERP API calls as a dataportal. We are especially interested in the n-level undo, validation rules, and binding ability of the framework.

Is CSLA a good fit for out application??

RockfordLhotka replied on Wednesday, November 28, 2007

It sounds like CSLA .NET should work well for you, as long as you use a formal DAL (data access layer).

You can look at the DeepData sample app on www.lhotka.net to get some ideas on building a DAL. Also, Miguel Castro, who created and teaches the official CSLA .NET training through Dunn Training, wrote a DAL that he uses in his class. Many other people on this forum have various DALs as well.

The only other thing I want to point out is that you should be careful in your use of inheritance with business objects. Inheriting to get properties can be problematic because it complicates data access code quite a bit. Inheriting to get behavior (like rule methods, etc) can make sense. But in all cases, the time-tested best practice of favoring composition over inheritance is something to keep firmly in mind.

Copyright (c) Marimer LLC