CSLA.NET or not?

CSLA.NET or not?

Old forum URL: forums.lhotka.net/forums/t/37.aspx


johnm posted on Tuesday, May 09, 2006

Hi all buddies,

We have an extreme big project has just been kicked-off; choosing which distributed technology to separate tiers became a big challenge. 

One of the choices is just using SOAP Xml Web Service + WSE to construct a sort of Service-Orientated-Architecture. Another choice is using CSLA to provide more flexible deployment options.

Here I have 3 concerns with CSLA. Can any of you give some advice?

  1. Ultimately WCF (Windows Communication Foundation, called Indigo previously) will be the final standard of .NET-distributed technology. What is the future of CSLA?
  2. From interface IDataPortalServer, probably I can tell CSLA has the abstraction that business object only work under CRUD modes, but in real business application, scenario can be way more complicated. We can have more than 10 different ways to fetch same business objects, same as create or delete, isn't it right?
  3. Is there any successful business case of using CSLA in big application in sectors like finance service or health care?

 Forgive me just having very limited understanding of CSLA, just eager to know.

pelinville replied on Tuesday, May 09, 2006

With SOA I would still wan't a good object oriented design which the services use.  Using CSLA as a basis fo that OO design provides some real benifits.
 
You can retrieve/create/delete the objects from the datasource however many ways you want depending on how you use the criteria (I am speaking from 1.x stuff here.) 
 
I know Rocky put alot of work in to make sure that transitioning to Indigo will be as painless as possible. He talked about this in his blogs, a couple of interviews I have heard and on his site. 
 
Also on his site is some of the companies that use CSLA.  (http://www.lhotka.net/Articles.aspx?id=a26b2727-f99d-485b-aa3e-a5466e534a2b)
 
And remember, you have the source code so you can extend and or modify it to fit your needs.
 
 

johnm replied on Tuesday, May 09, 2006

Thanks Pelinville,

Agree with that have better object design will give real benifit for long run. But from this aspect, is there any difference of using CSLA versus other ORM tools?

The most attractive portion of CSLA is it provides you unified interface to access WebService Proxy, Remoting Proxy and/or local access proxy.

johnm replied on Tuesday, May 09, 2006

One thing I am not sure about CSLA and WCF is not if they can communicate to each other.

My personal understanding is: WCF has a big portion of overlapping with CSLA, the concept of Data Contract is similar with DataPortalServer, but more generic. Detail.

If I am using WCF plus another good ORM framework. Why I have to use CSLA anymore?

 

RockfordLhotka replied on Wednesday, May 10, 2006

The point of CSLA .NET is to abstract complex .NET "plumbing" like data binding and to add extra features to your objects like validation and authorization.

The support for mobile objects through the use of the data portal is important, but is not (to my mind) the primary value of the framework. As others have noted, the use of thte data portal is optional and other alternatives exist.

The primary value of CSLA .NET is to enable the creation of business objects where you spend your time designing and implementing business code rather than plumbing code.

To CSLA .NET, WCF is no different from Remoting or Enterprise Services. It is an RPC (remote procedure call) technology. There is fundamentally no overlap between CSLA and WCF at all - they are designed to do entirely different things. I certainly don't view CSLA as a technology for communicating across the network (which is the purpose of WCF). Rather, CSLA is a technology that uses pre-existing technologies to communicate across the network to implement a higher-level concept called mobile objects.

johnm replied on Friday, May 12, 2006

Thanks Rocky, you've made the point clear.

 

pelinville replied on Tuesday, May 09, 2006

CLSA really isn't an ORM.  I think some people use an ORM with CSLA but I haven't actually seen this in action. 
 
I use code generation much like the book by Kathleen Dollard and many use templates with another code generation app Code Smith (I think that is what it is called).
 
Personally I don't even use the Dataportal any more.  I have extended the CSLA BusinessBase and BusinessCollectionBase and use a remotable DAL.  I didn't have to touch the base CSLA for this.  I only mention this to show how flexible it is.  I am sure the 2.0 version is even better.

Patrick replied on Wednesday, May 10, 2006

Hi,

there is a framework named JCL which uses CSLA.NET in combination with an ORM tool named LLBLGen Pro.
Patrick

LayeredDev replied on Tuesday, May 09, 2006

Hi JohnM,

I don't see how there can be 10 different ways of loading the same business objects.

I am not very familiar with CSLA .net but have extensive experience with CSLA VB 6.  My CSLA VB 6 apps are extremely scalable thanks to the CSLA architecture. If you are worried about bringing a lot of data to the client, you may have to design the app in such a way that the minimum required data is brought to the client.

Cosmic Ovungal

Formerly 3TierDeveloper on the old CSLA forum.

 

ajj3085 replied on Tuesday, May 09, 2006

Hi Johnm,

First, WCF will likely fit in as another DataPortalServer.  It should be pretty easy to implement it.  I think I read that Rocky was already tinkering with it.

As for your second question, another poster answers that; you can use different criteria to give you more than one way of loading your object.  Secondly, you could (if you need to see if a row exists but don't want to load it or anything.. you can use Execute method and an object which inherits CommandBase.

Another poster answered this via a link; looks like the answer is yes.

Finally, I would NOT develop an application around SOA.  Your web service layer should be thought of as yet another UI to the business layer.  This will give you much more flexibility (for example, if you ever need to build  a web UI in addition to the web service).  If your business layer is the SOA layer, you can't really change the object hierarchy anymore because you'll break the contract with your service clients.  If you build the business layer seperately (and on top of CSLA) you can then build a web service which just uses your business objects.  You can then change your business objects as needed and update the web service layer to use the new objects, but externally nothing will seem to have changed.

HTH
Andy

xal replied on Tuesday, May 09, 2006

1. I recall Rocky saying something about a dataportal using wcf, but he didn't release it yet because wcf is still subject to changes. Definitely, csla will support it.

2. Actually you can have 10 different strongly typed fetch methods. This is well supported by the dataportal. It will call the correct method based on the criteria type you pass to the dataportal. (Or you can handle all in one method based on criteria parameters, but that is the old way...).

3. www.lhotka.net has a list of companies using csla.
Here:
http://www.lhotka.net/Articles.aspx?id=a26b2727-f99d-485b-aa3e-a5466e534a2b


But I'm sure he posted an updated list in his weblog. I just can't find it.


Andrés

RockfordLhotka replied on Tuesday, May 09, 2006

1) I already have a data portal channel that works on the FebCTP of WCF - you can find it on www.lhotka.net under downloads. To say that WCF is the "final standard" is a bit optimistic I think. It is very unlikely that Microsoft will quit changing their distributed technologies with WCF Wink [;)]. Obviously however, support for WCF is important.

Perhaps the most important thing to realize around WCF, is that CSLA will allow you to move from using remoting, web services or enterprise services to use WCF without changing your code. At least this is true with the current WCF data portal channel, so unless Microsoft makes a radical and unfortunate change to WCF (basically dropping concepts needed for client/server) this will be the case.

2) Certainly you might have different criteria or selection schemes for your data. But it is very hard to imagine operations beyond create,fetch,insert,update and delete. These operations have been the core of data access for decades now and have been sufficient. I think what you are saying is that you have complicate criteria - and CSLA .NET supports this concept.

3) Someone already linked to my web site in this regard. But yes, the framework has been used in some large applications and by some large companies.

Copyright (c) Marimer LLC