473,473 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Question: Aspect Oriented Programming

Greetings,

I was reading the latest MSDN magazine and in it is an insert (VOLUME I: Feb
2005 -- Patterns & Practices Digest) that discusses something relating to
the Avande ACA.NET framework (which I'll most likely never afford to
purchase and I'm not shopping, anyway)... but I have a question.

On page 12, it gives an example of using the ACA.NET aspects framework and
it seems to be more automatic than I thought you could achieve with .NET.
They give an example:

using Avanade.ACA.Aspects;

[AcaService]
[AsmxTransport]
[WseTransport]
public CalculatorService
{
[AcaServiceMethod]
[AspectContainer("CalcContainer", AspectContainerScope.SendersOnly)]
public int Add(int arg1, int arg1)
{
return arg1 + aqrg2;
}
}
My questions, since the class is not inheriting from ContextBoundObject or
derivitive, how it is possible to apply an attribute and then have that
attribute get fired when the method is executed?

My understanding, is that in .NET you must inherit your object at least from
ContextBoundObject, and your attributes from ContextBoundAttribute in order
to get the attribute to automatically fire when the "thing" that the
attribute is applied to is executed. Perhaps that isn't exactly all you
need to do to add aspects (and there example, although says it is, is
missing some serious details in order to market it)...?
Thanks,
Shawn
Nov 17 '05 #1
2 1579
Any ideas?

"Shawn B." <le****@html.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Greetings,

I was reading the latest MSDN magazine and in it is an insert (VOLUME I: Feb 2005 -- Patterns & Practices Digest) that discusses something relating to
the Avande ACA.NET framework (which I'll most likely never afford to
purchase and I'm not shopping, anyway)... but I have a question.

On page 12, it gives an example of using the ACA.NET aspects framework and
it seems to be more automatic than I thought you could achieve with .NET.
They give an example:

using Avanade.ACA.Aspects;

[AcaService]
[AsmxTransport]
[WseTransport]
public CalculatorService
{
[AcaServiceMethod]
[AspectContainer("CalcContainer", AspectContainerScope.SendersOnly)]
public int Add(int arg1, int arg1)
{
return arg1 + aqrg2;
}
}
My questions, since the class is not inheriting from ContextBoundObject or
derivitive, how it is possible to apply an attribute and then have that
attribute get fired when the method is executed?

My understanding, is that in .NET you must inherit your object at least from ContextBoundObject, and your attributes from ContextBoundAttribute in order to get the attribute to automatically fire when the "thing" that the
attribute is applied to is executed. Perhaps that isn't exactly all you
need to do to add aspects (and there example, although says it is, is
missing some serious details in order to market it)...?
Thanks,
Shawn

Nov 17 '05 #2
"Shawn B." <le****@html.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Greetings,

I was reading the latest MSDN magazine and in it is an insert (VOLUME I:
Feb
2005 -- Patterns & Practices Digest) that discusses something relating to
the Avande ACA.NET framework (which I'll most likely never afford to
purchase and I'm not shopping, anyway)... but I have a question.

On page 12, it gives an example of using the ACA.NET aspects framework and
it seems to be more automatic than I thought you could achieve with .NET.
They give an example:

using Avanade.ACA.Aspects;

[AcaService]
[AsmxTransport]
[WseTransport]
public CalculatorService
{
[AcaServiceMethod]
[AspectContainer("CalcContainer", AspectContainerScope.SendersOnly)]
public int Add(int arg1, int arg1)
{
return arg1 + aqrg2;
}
}
My questions, since the class is not inheriting from ContextBoundObject or
derivitive, how it is possible to apply an attribute and then have that
attribute get fired when the method is executed?
Theoretically it's not. However, what they could be doing is generating a
proxy based on the attributes and reflection, and exposing that proxy to the
outside world. Some other alternatives include modifying the IL at compile
or JIT time.
My understanding, is that in .NET you must inherit your object at least
from
ContextBoundObject, and your attributes from ContextBoundAttribute in
order
to get the attribute to automatically fire when the "thing" that the
attribute is applied to is executed. Perhaps that isn't exactly all you
need to do to add aspects (and there example, although says it is, is
missing some serious details in order to market it)...?
Thanks,
Shawn

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hung Jung Lu | last post by:
Hi, I have been looking into AOP (Aspect-Oriented Programming) for sometime, now. I frankly don't like the syntax of any of the approaches I have seen so far. I am kind playing around with some...
14
by: New_aspect | last post by:
Hello, Aspect oriented Software development seems to be expanding in the popular vision of developers, with more and more IDE 'add-ons' and even more specialized tools,Jboss etc. I've seen more...
1
by: Flare | last post by:
Hi, I heard alot of IoC containers and aspect oriented programming for the Java / J2EE world, eg, Spring, AspectJ, Pico, etc. I find the idea very compeeling that the framework calls the...
15
by: christopher diggins | last post by:
I have written an article on how to do Aspect Oriented Programming in vanilla C++ (i.e. without language extensions or other tools such as AspectC++). The article is available at...
2
by: cmrchs | last post by:
Hi, I'm looking for a good Aspect-compiler + clear tutorial enabling me to experiment a little with the world of Aspect oriented Programming. Anybody knows some good sites ? Any help greatly...
9
by: marathikaka | last post by:
Hi all just wondering will the next hype be aspect oriented programming. I was reading through this link and just thought about it http://www.geocities.com/aspectdotnet/
3
by: mca | last post by:
Hi everyone, I'm new to asp.net and i have a question about separating the html code from the programming code. i have an unknown numbers of entries in my table. I want to make a hyperlink...
1
by: Bob | last post by:
Would it be out of the question to ask MS to allow delegates - even if they can only refer to static methods - to be included in attribute paramaters? Something like the code below? Bob ...
8
by: Support | last post by:
Hello: I am deploying a new web site that will have over 100 pages. In the ASP world, I would create templtes - include files, etc... to easily "manage" the site. In asp.net 2.0 I want to create...
3
by: =?iso-8859-1?Q?Vicente_Garc=EDa?= | last post by:
Hello all, I am searching for a language to work with aspect oriented programming on the .NET platform with Csharp. Also, I would like that the language can be integrated on Visual Studio 2008....
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.