Example: ObservableCollection<T> is used ONLY by WPF; WinForms, MS controls
for WinForms, and 3rd-party WinForms controls do not subscribe to any events
raised by that class.

Never-the-less, I actually think that you and I are in 'violent agreement'
here [?] that the NH core should provide a mechanism for wiring up change
notification events using whatever notification methodology makes sense for
your objects (I am just strongly arguing that it be in a UI-neutral manner
and I think you are in agreement with that sentiment).

-Steve B.

On Wed, Nov 26, 2008 at 10:07 AM, HappyNomad <[EMAIL PROTECTED]>wrote:

>
> Stephen, your right that I am coming from a WPF background, but I do
> not intend to ignore the needs of other GUI frameworks.  I'm not aware
> of the WinForms notification event model.  What classes handle that?
> In any case, that still doesn't change the minimum thing I am asking
> to implement right now, which is to add this
> template method to AbstractPersistentCollection:
>  protected abstract void OnCollectionChanged
> ( NotifyCollectionChangedAction action, object changedItem, int
> index );
> and then call it from all of its subclasses, whenever the collection's
> contents are modified.  The NotifyCollectionChangedAction enum could
> even be replaced with something NH-specific if you like.  With this in
> place, any notification system could be easily implemented using
> IUserCollectionType.  And it would not be specific to
> INotifyCollectionChanged or WPF in any way.
>
>
> On Nov 26, 9:43 pm, "Stephen Bohlen" <[EMAIL PROTECTED]> wrote:
> > Its also true that this is actually a bit more complex that is being
> > suggested here.  .NET 3.5 actually support two completely different
> > 'notify-property-change' and 'notify-collection-change' eventing model --
> > one for WinForms and another for WPF.  The suggestion being offered here
> > seems to be solely WPF-centric and will (perhaps) meet the needs of
> > WPF-adopters but won't address the needs of the winforms/webforms crowd.
> >
> > I (personally) think it makes more sense for the NHib core to be
> extensible
> > and overridable rather than to explicitly support the eventing model of
> any
> > one single UI technology.  If there are changes that need to be made to
> > support this approach, then I think they make sense (to me) but to chase
> the
> > specific implementation of any one eventing model of any one UI platform
> is
> > a losing battle (IMHO), especially since MS has at least three *current*
> UI
> > platforms that would have to be explicitly supported (winforms, webforms,
> > and WPF).
> >
> > For some detail on exactly how complex (and differing) the the
> > notify-changes-to-object-via-event-raising model is between these UI
> > platforms, I would invite anyone to read Rocky Lhotka's most-recent book
> on
> > his changes to CSLA to support the different platforms (although I am not
> a
> > great big fan of CSLA per-se, reading his books on it offer some
> fascinating
> > insight into the nuances of parts of the ,NET fx).
> >
> > -Steve B.
> >
> > On Wed, Nov 26, 2008 at 9:33 AM, Gustavo Ringel <
> [EMAIL PROTECTED]>wrote:
> >
> > > I think the task of the persistence layer is not to be bindable to an
> > > specific UI model...or to inform about something to an specific UI
> model.
> > > So for sure it is not part of the core.
> > > It may be an extension to put in the contributions...
> >
> > > Gustavo.
> >
> > >  On Wed, Nov 26, 2008 at 4:29 PM, Fabio Maulo <[EMAIL PROTECTED]
> >wrote:
> >
> > >>  2008/11/26 HappyNomad <[EMAIL PROTECTED]>
>  >
> > >>>  NH 2.1 targets .NET 3.5, and
> > >>> observability is a fundamental feature of .NET 3.x, so I think the
> > >>> best way to solve this problem is to incorporate observability into
> > >>> the NH core.
> >
> > >> Sure... and sure we will add INotifyProperyChanged, and a base class
> to
> > >> work with lazy-loading and INotifyCollectionChanged and probably
> > >> IBindingList implementation.
> > >> Be sure about that.
> > >> --
> > >> Fabio Maulo
> >
> >
>

<<324.png>>

Reply via email to