dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Re: [Vrs-development] Defining WebServices (NetServices???)


From: Rhys Weatherley
Subject: Re: [DotGNU]Re: [Vrs-development] Defining WebServices (NetServices???)
Date: Thu, 05 Dec 2002 09:16:54 +1000

Peter Minten wrote:

> /* Webservice struct. */
> typedef struct webservice {
>   char * name;
>   session_pool * pool;
>   /* Probably needs a lot more metadata. */
> } ws;

Just a quick suggestion.  Do not declare the contents of these
data structures in the public .h file.  Instead, put them in a
private .h file.  Also, "ws" is probably too short an identifier
and may clash with identifiers in programs that use it.  Spell
it out: "webservice".  The public definition would look like this:

    typedef struct webservice webservice;

The reason for doing this is that a private structure can be
modified in future versions of the API without requiring all
applications that depend upon it to be recompiled.  Public
structures also tend to encourage programs to directly access
the fields, rather than use accessor functions.  This makes
it very difficult to change the data structure later.

Have a look at "include/il_program.h" and "image/program.h" in
the pnet sources.  All of those structures (ILClass, ILMethod,
ILField, etc) are opaque so that I could change the data structure
without having to rewrite all the IL tools.

I'll let others comment on whether the API meets the requirements
of web services or not.

Cheers,

Rhys.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]