Request to use Generic to SetValue

Mar 30, 2011 at 4:30 PM

Hi,

         I did some proof  of concept using Catel. I really enjoyed that. I was concenterating only on attributes "Model", "ViewModelToModel" and "InterestedIn". It is really a cool feature. I am pretty sure other other feature as well. I will be using that for one of my Game development and for my future projects. Also I recommended the same to my company. 

 

One thing I noticed is SetValue uses object. It would be better to convert that to Generic.

 

regards,

Ajosh

Mar 30, 2011 at 4:44 PM

Hi Ajosh,

Great to hear that you like Catel :)

Can you explain why you think the SetValue should be generic? The values are kept in a Dictionary<string, object> anyway, so why the request? If you have good reasons, we will implement it!

Best regards,

 

Geert

Mar 30, 2011 at 5:54 PM
The reason is I may be using primitive values for binding. Rather than holding those as reference type it would be good to keep it as value type. Bottom line is we can avoid unnecessary Boxing/UnBoxing.

From: [email removed]
To: [email removed]
Date: Wed, 30 Mar 2011 08:45:01 -0700
Subject: Re: Request to use Generic to SetValue [Catel:251814]

From: GeertvanHorrik
Hi Ajosh,
Great to hear that you like Catel :)
Can you explain why you think the SetValue should be generic? The values are kept in a Dictionary<string, object> anyway, so why the request? If you have good reasons, we will implement it!
Best regards,

Geert
Read the full discussion online.
To add a post to this discussion, reply to this email (Catel@discussions.codeplex.com)
To start a new discussion for this project, email Catel@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Mar 31, 2011 at 7:53 AM

I thought that was the reason. The problem that if you want to completely distinguish the (un)boxing, you will have to create a dictionary per type, which makes it all so much more complex.

The ViewModelBase derives from the DataObjectBase which actually holds all the property values.

If you can show that it really boosts the performance, we will consider it!

 

btw. when declaring dependency properties for a DependencyObject (in WPF), all values are stored in object as well.

Mar 31, 2011 at 2:04 PM
If you think it is complex to implement and won't improve the performance significantly, then please ignore my request.
Right now the personal projects I am going to use this framework doesn't give enough data to prove this issue.


As I told u before, I have proposed Catel to one of my company project. In case our Enterprise architects raise any concern regarding that or any other issues, then I will reach you out.

Thanks,
Ajosh

From: [email removed]
To: [email removed]
Date: Wed, 30 Mar 2011 23:53:41 -0700
Subject: Re: Request to use Generic to SetValue [Catel:251814]

From: GeertvanHorrik

I thought that was the reason. The problem that if you want to completely distinguish the (un)boxing, you will have to create a dictionary per type, which makes it all so much more complex.
The ViewModelBase derives from the DataObjectBase which actually holds all the property values.
If you can show that it really boosts the performance, we will consider it!

btw. when declaring dependency properties for a DependencyObject (in WPF), all values are stored in object as well.
Read the full discussion online.
To add a post to this discussion, reply to this email (Catel@discussions.codeplex.com)
To start a new discussion for this project, email Catel@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Mar 31, 2011 at 4:34 PM

Ok, for now, we will put this feature request on hold. If anything changes, just let us know!