Fabio,

I am not scared of IoC/AOP (well the MSIL code scared me for the AOP) but I
fully admit I don't understand it.  I am trying but I am beginning to wonder
if I am just not able to grasp the concepts.

My struction is this:

winForm -> Logic Layer -> DAL -> NH -> DB

I am sure the CpBT would work perfectly for me, I have no doubt that you
know exactly what your talking about, the problem is I can't understand when
or how to use it.

Thanks,
Josh

On Wed, Jun 24, 2009 at 9:53 AM, Fabio Maulo <[email protected]> wrote:

> well... what I suggest is CpBT because, so far, it is working very well.What
> I'm seeing is that many winForm/wpf developers are scared by IoC/AOP (that
> shouldn't be your case if in some moment you was thinking about PostSharp).
> Perhaps I should find the time to implements a "manual" management of CpBT.
>
> Which is the architecture of your tiers ?
>
> winForm -> Presenter? -> MVM? -> ??? -> DAOs?/Repository? -> NH -> DB
> or
> winForm -> NH -> DB
>
> Don't worry about how you think the architecture but try to explain the
> true here (for me is important to understand which was the problem with
> CpBT)
>
> 2009/6/24 joshlrogers <[email protected]>
>
>>
>> Ok, you confirmed something I was thinking but was not sure of in
>> regards to the session per call.  So then how do you suggest setting
>> the boundaries of a session in a win-forms app?  Obviously not the
>> entire application as you said that is a time-bomb and from the little
>> I understand I agree.  So do you suggest the boundaries to be that of
>> the form itself?  Or something smaller than that even?
>>
>> Thanks,
>> Josh
>>
>> On Jun 24, 9:32 am, Fabio Maulo <[email protected]> wrote:
>> > mmmm... I don't think that work at "property" level is a good idea, open
>> and
>> > close the session for each lazy property access is very closer to an
>> > anti-pattern called : session-per-call.
>> > In general is better to have the session open in a more high level.
>> > Btw if you think that what you need go ahead.
>> >
>> > 2009/6/24 joshlrogers <[email protected]>
>> >
>> >
>> >
>> >
>> >
>> > > I can't seem to understand how to use uNHAddins in my application so I
>> > > am exploring possibly using PostSharp.  Tell me if I am thinking about
>> > > this correctly.  If I intercept the lazy loaded properties of my
>> > > object I can open the session for lazy loading calls, correct?  Will
>> > > this interfere with Castle at all?  Is it possible to have two proxies
>> > > operating on a single property/method and if so how is the order
>> > > determined?
>> >
>> > > It seems with PostSharp that I can handle the entry and exit of the
>> > > property so after the lazy load I can close the session again.  This
>> > > would be optimal, yes?
>> >
>> > > Thanks,
>> > > Josh
>> >
>> > > On Jun 23, 9:42 am, Fabio Maulo <[email protected]> wrote:
>> > > > 2009/6/23 joshlrogers <[email protected]>
>> >
>> > > > > 1.  If I go to using IoC for my session management I still do not
>> see
>> > > > > how that takes care of possible orphaned sessions or prematurely
>> > > > > closed sessions.
>> >
>> > > > Orphaned ?
>> > > > CpBT do it trough SessionWrapper.
>> >
>> > > > > 2.  If I use one very long session through the life of the program
>> and
>> > > > > just call commits on that session I am worried about the caching
>> and
>> > > > > other possible issues.
>> >
>> > > > If you use a long session that span the life time of the application
>> you
>> > > > will have only a time bomb.
>> >
>> > > > > 3.  I REALLY do not want to make my forms cognizant of the session
>> > > > > handling however I do not know how I can get around this since for
>> > > > > lazy loading I have to leave a session open which could possibly
>> > > > > result in orphaned sessions.  Yet, I do not see any other way to
>> close
>> > > > > those sessions without the form giving some kind of notification
>> to
>> > > > > the DAL.
>> >
>> > > > Model in Gustavo's example (in uNhAddIns examples).
>> >
>> > > > > 4.  Even if I did fully grok IoC and CpBT, which I don't and that
>> is
>> > > > > probably the problem, I don't see how that handles leaving
>> sessions
>> > > > > open to allow for lazy loading unless there is some way to
>> intercept
>> > > > > the lazy loading call so that you can open the session get the
>> > > > > information that needs to be loaded then close the session again.
>> > > > > However, I have no idea if that is possible or how it would be
>> > > > > implemented.
>> >
>> > > > AOP
>> >
>> > > > > I apologize for being so dense when it comes to this.  Handling
>> these
>> > > > > sessions has forced me to think more abstractly than I normally
>> do,
>> > > > > which is a good thing, thus why I want to take this experience and
>> > > > > learn from it.
>> >
>> > > > Perhaps we should implements a "easier" to manual manage CpBT, in
>> > > uNhAddIns,
>> > > > without AOP but, so far, we don't have any request in this
>> direction.
>> >
>> > > > --
>> > > > Fabio Maulo
>> >
>> > --
>> > Fabio Maulo
>>
>>
>
>
> --
> Fabio Maulo
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to