The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

  • Advertisements

Using CSLA as an application framework

Posted by Clayton James on October 17, 2006

I have been using CSLA 2.0.1 for a couple of 2.0 windows applications and thought it was time to share some thoughts.


  1. Object Orientated Programming (OOP): I originally coded .NET in datasets, I now use objects. I made this change when .NET 2.0 was first released as MSFT made many improvements to object binding. I couldn’t go back to implementing a solution using datasets. When designing a solution I find it so much clearer when thinking objects…it comes naturally. CSLA is centered around OOP and generics.
  2. Keeps business logic where it should be…in the Object. CSLA takes object encapsulation to a true OO design. The object manages:
    • Authorization: Who can delete/add/update/select an object.
    • Validation: Basic property validation …Required fields, max/min lengths, data types.
    • Business Rules:  Complex business rules validation. Allows you to easily write complex business logic into the object and validate these rules.
    • Data access (this can be removed and put into a data layer if required)
  3. Windows development: BindingSource, CSLA Object & ErrorProvider = Zero code for validating controls in UI (Sh*t hot)
  4. UI: Due to the object encapsulating much of the functionality, it allows the UI to be dumb. Could easily create a Web UI and Windows UI for any CSLA project that we design. Remember the object validates it properties which bound to controls on the form, takes care of authorization through roles, contains business rules and manages the data access. Not much left for the UI to do 🙂
  5. All this adds up to easier code maintenance.
  6. Community driven: There is a solid community for support, direction and discussions.
  7. Code generation: Can easily code gen your objects using Templates and Code Smith (free version 2.6 works fine)
  8. Written to support WCF.
  9. The framework is FREE.


  1. Learning curve. As with any new technology/framework there is a skill up period. This needs to be weighed up before deciding to use CSLA. I work for a company (Data Cogs) and we have made the decision to use CSLA for all projects.
  2. Can take more development hours than using datasets.
  3. I have experienced some minor problems with the code generation templates…but hey, they are free and you can change to suit your requirements.

There are other things that I haven’t discussed as I haven’t used, including one of the main benefits in using CSLA (Component Scalable Logical Architecture) which is built into its name. It allows you to design the same system that can work in both a client/server environment or physical n-tier environment where objects can cross app domains. This was always a huge issue as the design of your system was usually built around its technology/architecture. CSLA apparently takes this decision out of the equation when designing your system.

I would love to hear other peoples views on CSLA…


20 Responses to “Using CSLA as an application framework”

  1. buy cialis online

  2. Hoan said

    Sample using csla framework?
    I researeching csla framework. I want to find sample which using csla for application n tier.
    Help me please.


  3. CJ said

    Hi Hoan,

    CSLA.Net is primarily built and designed by a man named Rocky Lhotka. You can get some great resources from his site http://www.lhotka.net/Area.aspx?id=4. There is also a community built around CSLA and you can find this also on Rocky’s site.

    For an example you can look at this great article http://www.primos.com.au/primos/Articles/CSLAversion2whatsinitforme/tabid/67/Default.aspx?PageContentMode=1. It does take a while to load so be patient 🙂

    Pleanty of other resoureces online, just google CSLA.Net.

  4. Patrick Conan said

    Hi All,

    Usually a project has to be finished in 6 – 9 months.
    The learning curve of CSLA is so lengthy that I don’t think it worths using. Your company ends up failing to deliver anything to client.
    I think Microsoft framework is ten times better. You can find tons of resources from Microsoft.
    If performance is important in your project, don’t use CSLA (please read his book Chapter two)

  5. Mike said

    “I think Microsoft framework is ten times better.”

    Haha. The .NET framework is not a business framework. I always find it humerous when people say, “why do we need a framework, we have the .NET framework?” This comment shows such a lack of software development knowledge.

    Does .NET have a data access layer? No. You must create your data access using .NET components.

    Does .NET have a business logic layer? No. You have to put in your logic checks yourself.

    An application framework and the .NET framework are not anything close to being related. That’s like saying a random bunch of people are a company. The “people” are components in .NET and each serve a function, but a in order to have a working company, those people need organization and direction which is similar to an application framework.

  6. Gurdeep said

    Well said Mike :::

    For who those who are new to CSLA.Net Just keep in mind that CSLA sits on the top of Microsoft.Net and Inherit its Core functionality. It adds the Data Access Layer and Business Layer that any application required.

    So in order to develop the software you might ends up having the common platform such as CSLA & MS.Net for all your applications and any common business libraries that your projects might needs. After that all you have to do is add few new classes for new project, rest you have already there (just need to add refrence) as your common library. You can quickly develop commercial apps while keeping up the standards.

    I hope it helps you to get Idea what the CSLA is about !!

  7. […] Blogger’s pros and cons: https://claytonj.wordpress.com/2006/10/17/using-csla-as-an-application-framework/ InformIt article: […]

  8. GooluDown said

    For those who are using CSLA, can anybody do a comparason between CSLA and Enterprise Library?
    I think Enterprise Library should be much better for these reasons: 1> it is developed and supported by Microsoft 2> it is free 3> I have been using it for 3 years and it works very well.

  9. pudjo said

    Does it work on Mono Project (http://mono-project.com/)Mono is a cross platform, open source .NET development framework.?

  10. Shane said

    Pudjo: There is a new version of CSLA v3.7.1 that is designed to run on .NET 2.0. I tested it with the Mono Migration Analyzer and it came back with < 30 TODO/Not Implemented items, so it's getting close, but not quite vanilla.

  11. Marco said


    CSLA framework is an excellent framework for toy applications – applications that have to be written by guys who would have been construction workers had they not stumbled across one of those “Expert Business Objects”-books. No offense meant …

    There is no shame in building toy applications (for toy problems) … just don’t fool yourself that you are building “business objects” because you are not …

  12. samuel said

    aXDuvw http://dy5Ndo9BsL1vpVv5kqsUh.com

  13. Yzvyeoxq said

    little tight pussy lolita >:-D

  14. Etxazemj said

    What sort of work do you do? pthc bbs forum

  15. Zedjspnt said

    Another service? underage boys

  16. Ojwyjisf said

    magic story very thanks Forbidden Nymphets >:DD

  17. Gonqnaxw said

    It’s a bad line Young Female Models :]]]

  18. Huibrist said

    i’m fine good work Kdz Fuck kwwisk

  19. Vjghacpf said

    We were at school together http://lycoleukae.de.tl free preteen forums Oh yeah baby do you want me inside you?? I want to stick my fucking fat cock on that stunning pussy!!!

  20. Janette said

    Greetings! Very helpful advice in this particular post! It’s
    the little changes that produce the most significant changes.
    Thanks a lot for sharing!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: