Let's use "ProjectType" as an example.
In the past I would have created a Project business object and added a method to it that would return a dataset of project types.
However, CSLA requires that you create a seperate class called "ProjectTypeList" (or "ProjectTypes"). Along with that, you need a "ProjectTypeInfo". And you probably will also need just a "ProjectType" class.
So that's three classes that would not have existed at all in the past.
Now, I understand why it is much better to utilize the smart data of a business object rather than a dataset. But how many classes is too much to be contained inside one assembly? 100? 500? 1000??
I worry for two reasons:
1) I worry about new developers being overwhelmed when they open our business object library.
2) Also, at what point does the number of classes start degrading performance? Is that even a concern?
thanks, Ryan
I don't think the number of classes in any given assembly will have any performance implication - other from the fact that it might take a bit longer to initially JIT compile the assembly that is.
Most of us are using code generation with partial classes. This helps to offset being overwhelmed by the amount of code, or _look_a_like_ code from one class to antoher.
At the end of the day though, I think Csla does exactly the opposite. Because all of the business objects have the same skelleton, developers will be able to immediatly make out the difference between _framework_ code and _business_logic_ code... and this will help you down the road.
If you're concened about the number of classes in one given assembly, nothing prevents you from splitting your library into smaller, more managable, assemblies.
Business objects provide many advantages over
datasets. This is more so in larger projects. IMO, it would be a
mistake to go with datasets over business objects in any large project.
Copyright (c) Marimer LLC