Sandwich Class still recommended?

Sandwich Class still recommended?

Old forum URL:

rxelizondo posted on Saturday, January 07, 2012



I think I remember reading one of Rocky’s posts (many years ago) where he highly recommended creating a custom class to seat between the CSLA BusinessBase class and the custom business objects. This class could then be used to add any custom code to be shared between all the custom business objects.

Is this still something that is recommended to do? I am only asking this because I thought that in some other post I read that this was not a recommended approach anymore because of some issue or something…. but I am pretty sure I am mistaken… I hope I am mistaking otherwise I will need to do some refactoring!



RockfordLhotka replied on Saturday, January 07, 2012

I absolutely recommend using a custom base class that sits between the CSLA base class and your actual business classes. That is one primary extensibility point for the CSLA framework.

Copyright (c) Marimer LLC