[OpenNI-dev] ManagedNITE thoughts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenNI-dev] ManagedNITE thoughts

Todd
Here are some quick thoughts about the managed wrapper from my very limited experience so far.

The XnM prefix on all of the classes is probably unnecessary. You could drop it since the classes are already in the ManagedNite namespace. XnMSessionManager could just be SessionManager.

Strings as flag parameters to a method or constructor is not very helpful. I would guess a lot of .NET developers rely on intelisense when documentation is limited so a flags enum would be more helpful. In particular I'm thinking of new XnMSessionManager(context, "Wave", "RaiseHand"). It isn't quickly obvious to me what the valid values are for the last two parameters are. Something like new XnMSessionManager(context, SessionFocus.Wave | SessionFocus.Click, SessionRefocus.RaiseHand) would be more discoverable, but maybe the valid values are non-deterministic?

Last thing I noticed is that everything is disposable, I'm guessing some of the objects don't have to be disposable. Maybe you are using C++/CLI and the way you are doing things it automatically makes everything disposable?

Anyways, thanks for having a managed API and I look forward to future developments in it.

-Todd

--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: [OpenNI-dev] ManagedNITE thoughts

Joshua Blake
+1 on all of this. I had the same thoughts.
 
I'd recommend reviewing these resources for anyone who is designing class libraries and frameworks. They're very helpful guidelines that result in consistent and discoverable APIs that are a pleasure to use.
 
Thanks,
Josh
On Thu, Dec 16, 2010 at 1:09 AM, Todd <[hidden email]> wrote:
Here are some quick thoughts about the managed wrapper from my very limited experience so far.

The XnM prefix on all of the classes is probably unnecessary. You could drop it since the classes are already in the ManagedNite namespace. XnMSessionManager could just be SessionManager.

Strings as flag parameters to a method or constructor is not very helpful. I would guess a lot of .NET developers rely on intelisense when documentation is limited so a flags enum would be more helpful. In particular I'm thinking of new XnMSessionManager(context, "Wave", "RaiseHand"). It isn't quickly obvious to me what the valid values are for the last two parameters are. Something like new XnMSessionManager(context, SessionFocus.Wave | SessionFocus.Click, SessionRefocus.RaiseHand) would be more discoverable, but maybe the valid values are non-deterministic?

Last thing I noticed is that everything is disposable, I'm guessing some of the objects don't have to be disposable. Maybe you are using C++/CLI and the way you are doing things it automatically makes everything disposable?

Anyways, thanks for having a managed API and I look forward to future developments in it.

-Todd

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

--
You received this message because you are subscribed to the Google Groups "OpenNI" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
Reply | Threaded
Open this post in threaded view
|

[OpenNI-dev] Re: ManagedNITE thoughts

Rui Marinho
Todd have u managed to put a sample working? can u help me out on some
details of the xml file.. i  get

Failed to open XML Error :File not found!

Thanks´
Rui

On 16 Dez, 07:17, Joshua Blake <[hidden email]> wrote:

> +1 on all of this. I had the same thoughts.
>
> I'd recommend reviewing these resources for anyone who is designing class
> libraries and frameworks. They're very helpful guidelines that result in
> consistent and discoverable APIs that are a pleasure to use.http://msdn.microsoft.com/en-us/library/ms229042.aspx
>
> Thanks,
> Josh
>
>
>
> On Thu, Dec 16, 2010 at 1:09 AM, Todd <[hidden email]> wrote:
> > Here are some quick thoughts about the managed wrapper from my very limited
> > experience so far.
>
> > The XnM prefix on all of the classes is probably unnecessary. You could
> > drop it since the classes are already in the ManagedNite namespace. XnMSessionManager
> > could just be SessionManager.
>
> > Strings as flag parameters to a method or constructor is not very helpful.
> > I would guess a lot of .NET developers rely on intelisense when
> > documentation is limited so a flags enum would be more helpful. In
> > particular I'm thinking of new XnMSessionManager(context, "Wave",
> > "RaiseHand"). It isn't quickly obvious to me what the valid values are for
> > the last two parameters are. Something like new XnMSessionManager(context, SessionFocus.Wave
> > | SessionFocus.Click, SessionRefocus.RaiseHand) would be more
> > discoverable, but maybe the valid values are non-deterministic?
>
> > Last thing I noticed is that everything is disposable, I'm guessing some of
> > the objects don't have to be disposable. Maybe you are using C++/CLI and the
> > way you are doing things it automatically makes everything disposable?
>
> > Anyways, thanks for having a managed API and I look forward to future
> > developments in it.
>
> > -Todd
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "OpenNI" group.
> > To post to this group, send email to [hidden email].
> > To unsubscribe from this group, send email to
> > [hidden email]<openni-dev%2Bunsubscribe@googlegrou­ps.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/openni-dev?hl=en.- Ocultar texto citado -
>
> - Mostrar texto citado -

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

Reply | Threaded
Open this post in threaded view
|

[OpenNI-dev] Re: ManagedNITE thoughts

Todd
Rui,

I posted some sample code a while ago, thought it doesn't use the managed nite in a standard way. You can find the code at https://github.com/etihwddot/Kinect-WPF-Sample. I'm guessing the issue you are running into is not having openNI.xml in a data folder.

-Todd

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