471,605 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Event framework

Dear colleagues, we have encountered some problems.
there are some types of events in our system: business objects events,
events that fire on time, on some conditions, and on user input.
so we need some framework or library which includes persistent events
and scheduling
any ideas are welcome.
thanks in advance.

Dec 14 '05 #1
2 1452
Hi,
I am not much clear about your intension by "persistent events and scheduling" but the event mechanizm in Microsoft.Net is very good. I have given you sample which shows how to create it and how to use it.

This is a Sample according to publisher-subscriber scenario in Observer design pattern which will give you the idea of creating and using the custom delegate - which is the same concept .Net for Function pointer
On publisher side:
Delegate:
public void delegate MyDelegate(MyType sender, MyParamCollection params);

Event in MyType:
public event MyDelegate MyEvent;

Define some method for raising event like,
private void OnMyEvent() {
MyParamCollection coll = new MyParamCollection();
:
:
if(MyEvent !=null) {
MyEvent(this, coll);
}
}
and call this method at some point where you want to raise the specific event,

On subscriber side:
objMyType.MyEvent += new MyDelegate(MyEventHandlerMethod);
private void MyEventHandlerMethod(MyType sender, MyParamCollection params) {
do something.....
}

If MyType is the class from where you want to raise the event then you can call OnMyEvent method from some point like user input, or at some condition satisfiying point etc in your business object [here MyType is that class] and that way you can achieve the effect you want.

HTH,

<ve****@yahoo.com> wrote in message news:11*********************@g47g2000cwa.googlegro ups.com...
Dear colleagues, we have encountered some problems.
there are some types of events in our system: business objects events,
events that fire on time, on some conditions, and on user input.
so we need some framework or library which includes persistent events
and scheduling
any ideas are welcome.
thanks in advance.

Dec 14 '05 #2
If I understand your question properly, what you're after is a business
integration tool.

Microsoft's offering is BizTalk, but there are many others out there,
including Bea's WebLogic Integrator.

All of these things are terribly expensive, though. You need a fairly
large enterprise to make it worth buying them, learning them,
developing with them, deploying the results, maintenance, etc.

So, if you're working for a very large company, look at one of these
tools. If you have a smaller problem to solve, look at how these tools
work and "roll" a simpler version of your own.

Dec 14 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Carlo Marchesoni | last post: by
4 posts views Thread by Anatoly | last post: by
3 posts views Thread by R Millman | last post: by
19 posts views Thread by Heidi Hundåla | last post: by
6 posts views Thread by Shimon Sim | last post: by
4 posts views Thread by Andrew Robinson | last post: by
3 posts views Thread by Jason | last post: by
9 posts views Thread by Marcelo Cabrera | last post: by
9 posts views Thread by jeff | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by

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.