Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Before I specifically answer your question, I'd like to put a few thoughts down. Is CSLA right for your project? It depends. I would personally consider CSLA for desktop based applications that does not value unit testing as a high priority. CSLA is great if you want to easily scale to an n-tier application. CSLA tends to get some flack because it does not allow pure unit testing. This is true, however like anything in technology, I believe that there is <em>No One True Way</em>. Unit testing may not be something you are undertaking for a specific project. What works for one team and one project may not work for another team or other project.<br /></p> <p>There are also many misconceptions in regards to CSLA. It is not an ORM. it is not a competitor to NHibernate (in fact using CLSA Business Objects &amp; NHibernate as data access fit really well together). It formalises the concept of a <em>Mobile Object</em>.</p> <p><strong>1. How many people are using CSLA?</strong><br /> Based on the <a href="http://forums.lhotka.net/forums/default.aspx" rel="noreferrer">CSLA Forums</a>, I would say there are quite a number of CSLA based projects out there. Honestly though, I have no idea how many people are actually using it. I have used it in the past on two projects.</p> <p><strong>2. What are the pros and cons?</strong><br /> While it is difficult to summarise in a short list, here is some of the pro/con's that come to mind.<br /> <em>Pros:</em></p> <ul> <li>It's easy to get new developers up to speed. The CSLA book and sample app are great resources to get up to speed.</li> <li>The Validation framework is truly world class - and has been "borrowed" for many many other non-CSLA projects and technologies.</li> <li>n-Level Undo within your business objects</li> <li>Config line change for n-Tier scalability (Note: not even a recompile is necessary)</li> <li>Key technologies are abstracted from the "real" code. When WCF was introduced, it had minimal impact on CSLA code.<br /></li> <li>It is possible to share your business objects between windows and web projects.</li> <li>CSLA promotes the normalization of <em>behaviour</em> rather than the normalization of <em>data</em> (leaving the database for data normalization).</li> </ul> <p><em>Cons:</em></p> <ul> <li>Difficulty in unit testing</li> <li>Lack of Separation of Concern (generally your business objects have data access code inside them).</li> <li>As CSLA promotes the normalization of <em>behavior</em>, rather than the normalization of <em>data</em>, and this can result in business objects that are named similarly, but have different purposes. This can cause some confusion and a feeling like you are not reusing objects appropriately. That said, once the physiological leap is taken, it more than makes sense - it seems inappropriate to structure objects the "old" way.</li> <li>It's not "in fashion" to build applications this way. You may struggle to get developers who are passionate about the technology.</li> </ul> <p><strong>3. After reading this does CSLA really not fit in with TDD?</strong><br /> I haven't found an effective way to do TDD with CSLA. That said, I am sure there are many smarter people out there than me that may have tried this with greater success.</p> <p><strong>4. What are my alternatives?</strong><br /> Domain-Driven-Design is getting big push at the moment (and rightfully so - it's fantastic for some applications). There are also a number of interesting patterns developing from the introduction of LINQ (and LINQ to SQL, Entity Framework, etc). Fowlers book <a href="http://rads.stackoverflow.com/amzn/click/0321127420" rel="noreferrer">PoEAA</a>, details many patterns that may be suitable for your application. Note that some patterns are competing (i.e. Active Record and Repository), and thus are meant to be used for specific scenarios. While CSLA doesn't exactly match any of the patterns described in that book, it most closely resembles Active Record (although I feel it is short-sighted to claim an exact match for this pattern).</p> <p><strong>5. If you have stopped using it or decided against why?</strong><br /> I didn't fully recommend CSLA for my last project, because I believe the scope of the application is too large for the benefits CSLA provides. <br /> I would <em>not</em> use CSLA on a web project. I feel there are other technologies better suited to building applications in that environment.</p> <p>In summary, while CSLA is anything but a <em>silver bullet</em>, it is appropriate for some scenarios.</p> <p>Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload