Vibrant discussion about CSLA .NET and using the framework to build great business applications.
I am using CSLA 2.0 as the foundation for a major enterprise scale application and I have some concerns about the amount of reflection used. Wouldn't it make more sense to take an interface driven approach to the DataPortal instead of using reflection on each DB call?
This is a pretty common question, and I answered it here for CSLA .NET 1.x.
The answer remains fundamentally the same for version 2.0. Though in version 2.0 the use of reflection is (I think) even more justified because it allows the business developer to write strongly typed DataPortal_XYZ methods. An interface-based approach would force a return to the 1.x approach of passing in parameters of type object and then manually casting them.
All that said, people have altered CSLA .NET to replace the reflection calls with an interface in the past, and I'm sure that change will be done in the future as well. But I don't anticipate making such a change to the core framework itself, because I like the following:
Okay, thanks for the explanation. Since you have already done the research I think I will leave well enough alone and quit trying to optimize prematurely.
Rules of optimization:
1. Don't2. Not yet