Is ComponentBehavior will be removed forever?

已查看 33 次
跳至第一个未读帖子

ktu...@gmail.com

未读,
2011年1月15日 03:47:082011/1/15
收件人 uNhAddIns
Hi everyone,

I saw that ComponentBehavior and ComponentBehavior.Castle was removed
from repository, is it still in fixing progress or those libraries
will be removed forever? or am i missing something?

Best Regards
ktutnik

José F. Romaniello

未读,
2011年1月15日 06:50:442011/1/15
收件人 unha...@googlegroups.com
Hi Ktutnik and thank you for your interest.

We are droping support for ComponentBehaviors because we feel there are better solutions out there (the old code is in a branch).
It is no longer my recommendtion to use DynamicProxy with the WPF binding infrastructure, because WPF binding use a lot of reflection. There are some workarrounds that Marco Amendola wrote on his blog but i don't like this.

Better tools;
for INotifyPropertyChanged:


for IDataErrorInfo:
  implement on your base view model 

for IEditableObject:
  i wrote an aspect with postsharp, using field interception, in about 20 line of code. However I've never used this interface in real application.

All the afore mentioned tools work for WPF and SL.

About using entities as viewmodels, my general advice is to think twice. But these things are great for viewmodels.

Ketut Sandiarsa

未读,
2011年1月15日 07:49:552011/1/15
收件人 unha...@googlegroups.com
Thanks José,

actually i realize that the library was missing after i read your blog (the link that you sent).

too bad, because i think the library was great, regarding Marco's Blog I never used interface for viewmodel because NotifyProperyChangedBehavior never work with interface proxy. but maybe it is a little bit out of nhibernate scope.
anyway, i trust for what you guys done, because you are the man
just keep up the good work :)

Best Regards
ktutnik

José F. Romaniello

未读,
2011年1月15日 07:57:182011/1/15
收件人 unha...@googlegroups.com
Thanks Ketut; I strongly believe in this new project NotifyPropertyWeaver, it has many configuration flavors and even work with pre-existing scenarios.
Also can handle readonly properties as:

public string FullName{
  get{ return FirstName + " " + LastName; }
}

It adds a notification for FullNAme in firstname and lastname

And it is static compiled.. .so no proxy, no ioc no nothing...

just new Person and it implements INotifyPropertyChanged in the best way possible.

I've scenarios where i completely forgot about INPC, having logic inside properties set. The weaver can handle that an inject right where it has to be injected.

So I directed all my support for this project (well i fix a minor bug so far :P) and we are working on something bigger with Simon (NotifyPropertyWeaver author).


2011/1/15 Ketut Sandiarsa <ktu...@gmail.com>

Ketut Sandiarsa

未读,
2011年1月15日 08:11:252011/1/15
收件人 unha...@googlegroups.com
Thank you,

Sounds great, I will try that library asap.

best regards
ktutnik
回复全部
回复作者
转发
0 个新帖子