[prev in list] [next in list] [prev in thread] [next in thread] 

List:       midware
Subject:    Re: [midware] Tutorials?
From:       "Francois PIETTE" <francois.piette () overbyte ! be>
Date:       2002-12-07 20:34:44
[Download RAW message or body]

> So, what if I wanted the server to respond to commands with non-standard
> characters

MidWare offer a transparent transport for your data. All 8 bits are
available for whatever you like. See for example the BioLife demo: images
are trasported from server to client in a snap.

> 'help' it would echo the word help to the other chatters, but if the
> user types '/help' it would bring up a help menu.  Can I use slashes in
> a class declaration?

By default, a TServerObject extract his FunctionCode from his ClassName,
removing TServerObject or TSObj from his class name. But you can use
whatever you like by overriding the method BuildFunctionCode. See the base
code RBroker.pas, procedure TServerObject.BuildFunctionCode.

--
francois.piette@overbyte.be
http://www.overbyte.be


----- Original Message -----
From: "Scott Beeson" <sbeeson@crosswinds.net>
To: <midware@elists.org>
Sent: Saturday, December 07, 2002 5:23 PM
Subject: RE: [midware] Tutorials?


> Okay, okay, I think I'm catching on.  You'll have to excuse me, I only
> started visual programming about 2 months ago, until then I was still
> using Turbo Pascal 7, and not using the object oriented features to
> their fullest :)
>
> So, what if I wanted the server to respond to commands with non-standard
> characters?  Using the chat client for instance, If the user types
> 'help' it would echo the word help to the other chatters, but if the
> user types '/help' it would bring up a help menu.  Can I use slashes in
> a class declaration?
>
> -----Original Message-----
> From: midware-admin@elists.org [mailto:midware-admin@elists.org] On
> Behalf Of Francois PIETTE
> Sent: Saturday, December 07, 2002 10:12 AM
> To: midware@elists.org
> Subject: Re: [midware] Tutorials?
>
> > I guess the main thing I want to know right now is, do I have to
> create
> > a component for every command the server can respond to?
>
> You mean at server side ? The answer is yes. You have to write a
> TServerObject derived class for each function your server has to respond
> to.
> It can be of course very short:
>
> TServerObjectBeeson = class(TServerObject)
> protected
>     procedure Execute; override;
> end;
>
> procedure TServerObjectBeeson.Execute;
> begin
>     FResponseBuffer.WriteFields(FALSE, ['Hello World']);
>     FResultStatus := 200;
>     Finish;
> end;
>
> This TServerObjectBeeson will answer 'Hello World' to FunctionCode
> BEESON.
>
> You don't even have to install it as a component. If you don't, you have
> to
> add it by code to the TRequestBroker like this (in FormCreate for
> example):
>
>     RequestBroker1.AddServerObject(TServerObjectBeeson );
>
> If you install your TServerObject as component, you can drop them on the
> server form and assign the requestbroker using the object inspector.
> Visual
> programming :-)
>
> > Is there no way to just code some if/then statements like "if
> (receivedstring) =
> > 'getdatetime' then (senddatetime)"?
>
> It would be difficult to do that and still have all the features. The
> AppServer may instanciate serveral instances of the sae TServerObject to
> server concurrent running requests. Also having separate TServerObject
> per
> request allows you to make clean programming: each one can have his own
> variables (just define them in the class). Remember you are in an Object
> Oriented Programming context !
>
> MidWare ORB (Object Request Broker) will do the job of finding the right
> TServerObject for the right request for the right client, and create a
> new
> instance on the fly to server that request for that client.
>
> I think you'll quickly understand the ease and power of this OOP.
>
> --
> francois.piette@overbyte.be
> http://www.overbyte.be
>
>
> > -----Original Message-----
> > From: midware-admin@elists.org [mailto:midware-admin@elists.org] On
> > Behalf Of Francois PIETTE
> > Sent: Saturday, December 07, 2002 3:34 AM
> > To: midware@elists.org
> > Subject: Re: [midware] Tutorials?
> >
> > > Okay, I finally got through the tutorial in the help file for the
> > > time/date server.  Does anyone have any good resources for some
> > Midware
> > > tutorials?
> >
> > Have you looked at the provided sample programs ?
> > And the FAQ ?
> >
> > Just ask for your questions here - including design questions - and we
> > will
> > be pleased to answer them.
> > --
> > francois.piette@overbyte.be
> > http://www.overbyte.be
> >
> >
> > _______________________________________________
> > Midware mailing list [http://www.elists.org/mailman/listinfo/midware]
> > Visit our website at: http://www.overbyte.be
> >
> >
> >
> > _______________________________________________
> > Midware mailing list [http://www.elists.org/mailman/listinfo/midware]
> > Visit our website at: http://www.overbyte.be
>
>
> _______________________________________________
> Midware mailing list [http://www.elists.org/mailman/listinfo/midware]
> Visit our website at: http://www.overbyte.be
>
>
>
> _______________________________________________
> Midware mailing list [http://www.elists.org/mailman/listinfo/midware]
> Visit our website at: http://www.overbyte.be


_______________________________________________
Midware mailing list [http://www.elists.org/mailman/listinfo/midware]
Visit our website at: http://www.overbyte.be

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic