Re: events not fired on the non-development machine
From: Simon Trew (ten.egnaro_at_werts)
Date: 04/05/04
- Next message: Chau Johnthan: "Re: ToolTip on static control"
- Previous message: vin: "ToolTip on static control"
- In reply to: leut: "Re: events not fired on the non-development machine"
- Next in thread: leut: "Re: events not fired on the non-development machine"
- Reply: leut: "Re: events not fired on the non-development machine"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 5 Apr 2004 08:37:49 +0100
"leut" <leut@gmx.net> wrote in message news:c4jk87$627$1@ls219.htnet.hr...
> Hi Simon ,
>
> Thanks for replying.
>
> Yes I tested it and it works fine.
>
>
>
> Q2. Can it be that my design is completely wrong?
>
> I implemented connection points for inter-object communication in my
server.
> At the service start I'm creating 3 main objects.
>
> Afterthat one object FM (FileMonitor) looks for changes on files and if
> there are any, it fires event, which is collected by other two objects.
>
> Should I instead call a methods on other objects? I thought it will be a
> good design to implement connection points in this case (don't ask me why
> :).
You can just call methods on those other objects, providing you take care
with your threading model (e.g. use a single threaded model). If you have
multiple threads running (e.g. you said you were running free threaded), you
have to take care with marshalling the interface pointers between objects on
different threads. The connection point (event) mechanism is relatively slow
compared to just calling a method, but essentially its slowness is because
it has to do marshalling, so IMHO if you need marshalling let the connection
point mechanism do it for you, unless you are suffering genuine performance
problems.
> When we are talking about clients, can I say that my 3 objects are clients
> of each other or clients are only 'outside' applications.
> Only possibly 'outside' client will be monitor application (VC++).
Yes, any object which requests something from another is a client of that
object. Similarly, any object which provides something to another is a
server to it. In my opinion, the terms "client" and "server" are used too
much in an ambiguous manner. It's all relative, and I prefer to qualify the
names to e.g. "client application" and "server application", or "client
machine" and "server machine", etc.
> I must say I'm little bit confused at the moment, beacouse of soooo much
> informations about COM/ATL in a past few weeks.
Don't worry... I'm still confused after *years* of doing it :)
- Next message: Chau Johnthan: "Re: ToolTip on static control"
- Previous message: vin: "ToolTip on static control"
- In reply to: leut: "Re: events not fired on the non-development machine"
- Next in thread: leut: "Re: events not fired on the non-development machine"
- Reply: leut: "Re: events not fired on the non-development machine"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|