Newbie Framework Questions
Newbie Framework QuestionsOld forum URL: forums.lhotka.net/forums/t/7541.aspx
bioluminescence posted on Monday, August 31, 2009
I'm new to CSLA.NET.
I got the book on expert business objects and I am at chapter 3. I normally do some research before I use or buy something. Now I read many negative reviews on this framework (and not much positive reviews) after buying the book. And alot of people say that we should rather use DDD (Domain-Driven Design). What exactly is DDD? What model does CSLA.NET use? How does it differ from DDD?
Has any one used CSLA.NET on large public web projects?? And comments positive/negative? I have a website that has lots of concurrent users at any one time, can the framework handle this without slowing the website? When will the framework start slowing down on the number of concurrent users using the website? A 100, 1000, 10 000 concurrent users? I would like to hear as many stories/experiences as possible.
I also read alot of negatives on calling DA methods directly from the business object. I was working with the patterns solution from Do Factory and they have a service layer that does all the calls to the data access layer. Why does CSLA.NET do this? I also read that you cannot do unit testing. Why is this?
I hope someone can help me clarify my issues and concerns regarding the framework.
Thanks and regards,
JonnyBee replied on Monday, August 31, 2009
There are several methods for how to design your application. I prefe to use a UseCase/ResponsibilityDriven approach for my Csla objects in MVVM (model-view-viewmodel) mindset. Meaning: My business objects need to get certain values/entities as input - allow alterations/registration - and perform actions on these.
Csla is also based on the Mobile Objects pattern (implemented by the DataPortal) that allows you to send an object tree over the "wire" to another machine and call methods on the root object on another PC/Server.
IMHO - your limitations on concurrent users lies more in the design of your application - not in the Csla framework as such.
Csla favors encapsulation - meaning that the BOs also incapsulates the DAL calls. This makes it hard to write unit tests. But the newer versions of Csla introduces ObjectFactory that enables you to move all data access into another layer (and possibly another assembly) and even allows you to write your own FactoryLoader that uses IoC.
So the newer version has better functionality for unit testing - but this breaks the encapsulation mindset.
I would recmmend you to buy 2 videos from the Silverlight Video Series from Rocky that discusses this is more detail: Business Object TypesN-Tier Data Access
bioluminescence replied on Tuesday, September 01, 2009Thanks. Do you think that CSLA.NET is a good framework? Does it slow down performance? The guys were very clear on this is that it slows down performance.
pondosinat replied on Tuesday, September 01, 2009
CSLA is like any other framework - in good hands it works well, but it doesn't really impact performance in and of itself. That is the product of a number of other variables - your dal/database queries/business service layer/UI Layer/overall architecture.
If you're building an ASP.NET app then it is true that some features will be overkill. But, performance impact would be negligible. What are your sources for the performance criticism? Just because it's written on a forum post doesn't make it true :)
JoeFallon1 replied on Wednesday, September 02, 2009
CSLA is a great framework. I use it for a large web app that is in Production at dozens of Fortune 500 companies. It does NOT slow down performance. In fact it is siginficantly faster that datasets. CSLA BOs are much lighterweight objects than datasets. You have been subjected to a fear/scare campaign. Put your mind at ease - CSLA can handle anything you need it to do.
JonnyBee replied on Wednesday, September 02, 2009Hi,
Yes, I believe Csla is a great framework. There is a learning curve (as with any framework) and you end up with well structured code in well defined layers and importantly - it is maintainable code.
We have about 35 developers using Csla and I have been using Csla for the last 3 years. Rocky has done a tremendous job in adding new features and keeping in sync with new versions of .Net, WPF, Silverlight and WCF.
The more tiers you introduce in your app the more tears you are going to cry. Introducing new tiers does come at a cost. But if you need it - the that's what you pay. I do not find Csla to be degrading in performance over other technologies like DataSets.
Copyright (c) Marimer LLC