-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: CSLA - Hibernate
PostPosted: Thu Jan 19, 2006 2:48 pm 
Newbie

Joined: Thu Jan 19, 2006 2:36 pm
Posts: 3
We are kind of binded to the CSLA .Net architecture here. I use hibernate on a java project and loved it. CSLA is more of a objet model driven framework which I dont necessarely agree on. Theres a couple of .net features that the framework includes that are nice but im not to found of the "put everything in the object" philosophy. Also the object persistence management of the business objects is tiedius and needs to be coded has for NHibernate its all taking care of (Dirty objects, interceptors, generated ADO code etc). If im not mistaking , the CSLA author uses these following arguments from the CSLA book to promote this framework :
- scalable n-tier security architecture (passing the business object from 1 tier to the other with firewalls between tiers,
- and encapsulating everything from the UI coder.

To make a long story short, Does anyone know if it would be wise to try to incoporate NHibernate into CSLA at the Data Access level or should I just try to convince the work place to go nhibernate and have classic UI-Businnes and Data access on same machine in a web farm configuration for overload

Thankx


Top
 Profile  
 
 Post subject: Re: CSLA - Hibernate
PostPosted: Thu Jan 19, 2006 3:13 pm 
Beginner
Beginner

Joined: Fri Nov 11, 2005 1:04 pm
Posts: 22
jiffyjub wrote:
We are kind of binded to the CSLA .Net architecture here. I use hibernate on a java project and loved it. CSLA is more of a objet model driven framework which I dont necessarely agree on. Theres a couple of .net features that the framework includes that are nice but im not to found of the "put everything in the object" philosophy. Also the object persistence management of the business objects is tiedius and needs to be coded has for NHibernate its all taking care of (Dirty objects, interceptors, generated ADO code etc). If im not mistaking , the CSLA author uses these following arguments from the CSLA book to promote this framework :
- scalable n-tier security architecture (passing the business object from 1 tier to the other with firewalls between tiers,
- and encapsulating everything from the UI coder.

To make a long story short, Does anyone know if it would be wise to try to incoporate NHibernate into CSLA at the Data Access level or should I just try to convince the work place to go nhibernate and have classic UI-Businnes and Data access on same machine in a web farm configuration for overload

Thankx


CSLA and NHibernate address similar needs. I wouldn't recommend trying to integrate the two. What I've found in regards to all the O/RM tools is that it's a good thing to use a generator. Whether you're making mapping files for nHibernate or whatever you have to do with CSLA, doing it by hand is tedious.

Either way, you should separate your presentation logic from your data logic. For trivial applications it doesn't really matter, but as applications get larger and more complex it becomes more imperative to buffer the presentation from the data logic.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 19, 2006 3:54 pm 
Newbie

Joined: Thu Jan 19, 2006 2:36 pm
Posts: 3
would you have any suggestion for code gen's.

CSLA proclaims that hidding the data access code in the business object is a good thing. so in there words yes the actual data access code is hidden but "in the object " I dont know !

CSLA'a data access layer just call's the save, update , delete methods that are in the BO.

any how thx for your reply


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 19, 2006 4:55 pm 
Beginner
Beginner

Joined: Fri Nov 11, 2005 1:04 pm
Posts: 22
jiffyjub wrote:
would you have any suggestion for code gen's.

CSLA proclaims that hidding the data access code in the business object is a good thing. so in there words yes the actual data access code is hidden but "in the object " I dont know !

CSLA'a data access layer just call's the save, update , delete methods that are in the BO.

any how thx for your reply


Mygeneration is a good code generation tool that uses templates to generate business objects/mapping files for multiple O/RM tools (nhibernate, and CSLA are supported along with several others).

I'm currently in the process of developing a template based code generator based on the Domain Specific Language tools, but it's not even in the alpha stage yet.

There is nothing wrong with putting the CRUD methods on your business objects in and of itself. It's just another way of tackling the data tasks.

Again I'm not familiar with CSLA so I can't tell you if there are any pitfalls involved. Generally, you want to avoid non static (or shared) select methods on the business object. In other words, having to create a business object in order to retrieve a business object from the database is just a bad idea. I actually ran into that pitfall the first time I tried programming the DAO pattern...I thought the DAO and the DTO should be the same.

Believe me, it's not a pretty thing to have to deal with. If CSLA requires something like this, I'd argue that you try to shield the rest of your code from it.


Top
 Profile  
 
 Post subject: some overlaps
PostPosted: Mon Apr 24, 2006 4:54 am 
Newbie

Joined: Wed Mar 29, 2006 2:24 am
Posts: 14
i am currently involved in a project that is using csla and nhibernate. so far there are just some overlaps of functionalities. i also want some feedbacks on others who had taken this path.

_________________
http://devpinoy.org/blogs/joeycalisay


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 24, 2006 9:28 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
I think that most people here don't view csla as a real or mapper.. Also, putting your dataacces in the domain object might be 'another way of tacklink the data acces problem' but you won't find many big projects doing it this way, for obvious reasons.

That said, as I understood it, csla.net is an application framework and nh is an ormapper, so why couldn't the two be perfectly integrated?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.