本ブログは更新を停止しました。Aerieをよろしくお願いいたします。
投稿カレンダーはJavaScriptが有効でない環境では使用できません。
αετο? / aetos / あえとす
シャノン? 誰それ。
埼玉を馬鹿にする奴は俺が許さん。
基本的に知ったかぶり。興味を持った技術に手を出して、ちょっと齧りはするものの、それを応用して何か形にするまでは及ばずに飽きて放り出す人。
今までは「プロキシヽ(゚∀゚)ノサイコー」でしたが、一転、「プロキシorzツカエネー」になりました。
まぁ何があったかと言うと、周知の問題だったわけですが、
っていう2点が、これほど大きく効いてくるとは思わなかった。
要するにアレですもんね。プロキシを被せたいオブジェクトの実装を知らないと使えないってことですもんね。
投稿日時 : 2007年1月9日 13:22
> this経由の参照は生のまま つDynamicProxy ソースがあるなら設計&コーディングルールで回避するほうが早そう…。 > newを捕捉できない つContextBoundObject
DynamicProxyってCastleの? 何にせよ、標準のRealProxyは使えねー。 ContextBoundObjectは、多重継承を認めない.NETでは使いにくすぎる印象が。 ContextBoundObjectであるということ自体がAspectだというのに。
> DynamicProxyってCastleの? です。 > 何にせよ、標準のRealProxyは使えねー。 用途がみえないんで何ともですがあとからメソッドの動きをどうにかするっていう場合にはAOPは全く役に立ちませんし向きませんね。
うーん? そもそも、AOPって「後からメソッドの動きをどうにかする」ことじゃないのん?
> そもそも、AOPって「後からメソッドの動きをどうにかする」ことじゃないのん? ソースを失念したのではっきりとしたことは言えないのですがパッチ的な使い方ではなくAOPに向いた設計をすべきということが提唱されていました。 私もこの意見には賛成であくまで処理の事前、事後に処理を挟み込む or 処理をまるまるすげかえるなどの用途に使うのがいいと思います。 パッチ的な用途に用いてしまうと折角実装から分離したAspectが実装と密に結びついてしまうのでオブジェクト指向的な良さをスポイルしてしまうように思います。
あぁ、なるほど。 確かに俺が「RealProxy使えねー」と判断したのは、黒龍さんの言うところのAOP的ではない処理でした。 でも、目的をそれだけに限定してもやっぱり、Weaving対象のクラスの作りによっては、RealProxyが使えない場合がありますよね。 というか、俺が投げた処理に割と近いシチュエーションで。
うーむ。 > Weaving対象のクラスの作りによっては、RealProxyが使えない場合がありますよね。 だから、AOPしたいんであれば、被Weavingクラスをそういう作りにするな、っていうことかしら。 それはそれで制限になってしまうなぁ。 > というか、俺が投げた処理に割と近いシチュエーションで。 これ、そんなにひねくれた処理じゃないと思うので。 ちなみにどんなケースでさじを投げたかと言うと、例えばこう。 class A { public B GetB() { retuen new B( this ); } public void SomeMethod(); } class B { private A _a; public B( A a ) { _a = a; } public Moge() { _a.SomeMethod(); } } A a = GetProxiedA(); a.GetB().Moge(); これでAspect対象にならないA.SomeMethodの出来上がり。 実際に俺が遭遇したケースはもーちょっとヒネクレてるけど。
ある程度の制限は仕方ないと思います。AOPすることも含めて設計&コーディングしないと^^; まずい点がいまいち見えないですがInterfaceやVirtualを絡めてうまくいかないかな??
> AOPすることも含めて設計&コーディングしないと^^; なるほどねぇ。 その点からみると、.NET FrameworkってのはRealProxyやContextBoundObjectを提供しているにもかかわらず、AOP-Friendlyな作りになっていないと言えましょう。 .NET Frameworkに対してProxy被せようとして失敗したのでね。 他人が作った、ソースコードが手に入らないビルド済みバイナリに対してもWeavingできるってのがAOPの利点の一つだと思っていたのだけれど、無条件にYESというわけではないのかもしれないね。 ま、そもそも、RealProxyやContextBoundObjectが当初からAOPを想定して提供されていたかどうかという問題もあるけれど。「プロキシ」とか「コンテキスト」ってのはCOMの概念ですからね。
> .NET Frameworkに対してProxy被せようとして失敗したのでね。 他人が作った、ソースコードが手に入らないビルド済みバイナリに対してもWeavingできるってのがAOPの利点の一つだと思っていたのだけれど、無条件にYESというわけではないのかもしれないね。 ですね。.Netの場合というかRealProxyの場合はWeavingというよりはインターセプトなので。 > ま、そもそも、RealProxyやContextBoundObjectが当初からAOPを想定して提供されていたかどうかという問題もあるけれど。「プロキシ」とか「コンテキスト」ってのはCOMの概念ですからね。 なるほど。興味深い点です。Essential .NETあたりではAOP的考えとしてRealProxyやContextBoundObjectに触れているので意識はされていたように思います。C#の父アンダースさんは動的ウィービングでのコード汚染はやなのでパーシャルを推奨していましたね。
RealProxy使えねぇー:2
I visited multiple websites however the audio feature for audio songs existing at this web page is really fabulous.
Hi there, all is going sound here and ofcourse every one is sharing information, that's in fact excellent, keep up writing.
Hi to all, it's really a fastidious for me to go to see this site, it includes valuable Information.
My brother recommended I might like this website. He was once totally right. This submit actually made my day. You cann't imagine just how so much time I had spent for this information! Thanks!
Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your website? My website is in the exact same niche as yours and my users would certainly benefit from some of the information you provide here. Please let me know if this okay with you. Appreciate it!
Heya i'm for the first time here. I found this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you aided me.
It's not my first time to pay a quick visit this web page, i am visiting this site dailly and obtain pleasant facts from here daily.
Ridiculous story there. What occurred after? Take care!
After exploring a few of the blog posts on your web page, I seriously appreciate your way of writing a blog. I book marked it to my bookmark site list and will be checking back soon. Please check out my web site as well and tell me how you feel.
Hello to all, because I am really eager of reading this weblog's post to be updated on a regular basis. It consists of fastidious information.
It's awesome to visit this web page and reading the views of all mates concerning this post, while I am also zealous of getting experience.
When someone writes an article he/she retains the thought of a user in his/her mind that how a user can be aware of it. Therefore that's why this post is outstdanding. Thanks!
Hi, i feel that i saw you visited my web site thus i got here to go back the prefer?.I am attempting to find things to improve my site!I assume its adequate to make use of some of your concepts!!
Hello, just wanted to tell you, I liked this post. It was funny. Keep on posting!
This info is invaluable. When can I find out more? scoliosis surgery https://coub.com/stories/962966-scoliosis-surgery scoliosis surgery
I go to see day-to-day a few web sites and information sites to read content, but this web site provides quality based content.
Powered by: Copyright © αετος / aetos