[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Need a hand with design a question

Mike

6/1/2004 8:23:00 PM

Here's the story.

I have a large database which has a lot of columns. I am creating a web
service for clients to use to insert information into this database. All
the clients are the same and are identified by a unique 4 digit number.
Depending on the client, different information must or must not be inserted
into the database.

Here is my question.

With web services which don't support funtion overloading, should I create a
bunch of webmethods with different names all of which accept different
paramerters, or should I create one funtion that accepts all parameters?
Based on the id they pass in I can check to see if they are passing in the
right parameters.

Am I just looking at this the wrong way? Is there a easier or more
efficient way I should look at?

Any help is greatly appreciated.

Mike R.


4 Answers

Bojidar Alexandrov

6/1/2004 9:18:00 PM

0

If you have different number and type of parameters for your clients that
means that you actually have different type of clients! So you must have
different functions.
It sounds strange that all your clients are different. Please explain more.

Bojidar Alexandrov
"Mike" <mraeNOSPAM@NOSPAMATALLcalibrus.com> wrote in message
news:uKr%23$UASEHA.644@tk2msftngp13.phx.gbl...
> Here's the story.
>
> I have a large database which has a lot of columns. I am creating a web
> service for clients to use to insert information into this database. All
> the clients are the same and are identified by a unique 4 digit number.
> Depending on the client, different information must or must not be
inserted
> into the database.
>
> Here is my question.
>
> With web services which don't support funtion overloading, should I create
a
> bunch of webmethods with different names all of which accept different
> paramerters, or should I create one funtion that accepts all parameters?
> Based on the id they pass in I can check to see if they are passing in the
> right parameters.
>
> Am I just looking at this the wrong way? Is there a easier or more
> efficient way I should look at?
>
> Any help is greatly appreciated.
>
> Mike R.
>
>


Mike

6/1/2004 10:50:00 PM

0

Well to be more specific it is one client with many different rooms. Each
room wants to be differnet and collect different data. I have a dynamic
website now that displays all of the different textboxs that a certian room
needs after they login. Some of the rooms now want to use back end
processing instead of the webpages currently out there.

The problem is is that there can basically be a huge amount of combinations
of data that needs to be passed in. I can simplify it and only offer x
number of web methods to handle all of these combinations. I was just
wondering if there is a better/different way of looking at this.

"Bojidar Alexandrov" <bojo_do_no_spam@kodar.net> wrote in message
news:uJpr00ASEHA.3056@TK2MSFTNGP11.phx.gbl...
> If you have different number and type of parameters for your clients that
> means that you actually have different type of clients! So you must have
> different functions.
> It sounds strange that all your clients are different. Please explain
more.
>
> Bojidar Alexandrov
> "Mike" <mraeNOSPAM@NOSPAMATALLcalibrus.com> wrote in message
> news:uKr%23$UASEHA.644@tk2msftngp13.phx.gbl...
> > Here's the story.
> >
> > I have a large database which has a lot of columns. I am creating a web
> > service for clients to use to insert information into this database.
All
> > the clients are the same and are identified by a unique 4 digit number.
> > Depending on the client, different information must or must not be
> inserted
> > into the database.
> >
> > Here is my question.
> >
> > With web services which don't support funtion overloading, should I
create
> a
> > bunch of webmethods with different names all of which accept different
> > paramerters, or should I create one funtion that accepts all parameters?
> > Based on the id they pass in I can check to see if they are passing in
the
> > right parameters.
> >
> > Am I just looking at this the wrong way? Is there a easier or more
> > efficient way I should look at?
> >
> > Any help is greatly appreciated.
> >
> > Mike R.
> >
> >
>
>


RES

6/2/2004 6:40:00 PM

0

I would make 1 function, that accepts 2 parameters. The first parameter is
the ID. The second parameter is an XML document, which has all the
information about what needs to be inserted in an XML form.

You can then look through the DOM, and get the appropriate data depending on
the client.

"Mike" <mraeNOSPAM@NOSPAMATALLcalibrus.com> wrote in message
news:uKr%23$UASEHA.644@tk2msftngp13.phx.gbl...
> Here's the story.
>
> I have a large database which has a lot of columns. I am creating a web
> service for clients to use to insert information into this database. All
> the clients are the same and are identified by a unique 4 digit number.
> Depending on the client, different information must or must not be
inserted
> into the database.
>
> Here is my question.
>
> With web services which don't support funtion overloading, should I create
a
> bunch of webmethods with different names all of which accept different
> paramerters, or should I create one funtion that accepts all parameters?
> Based on the id they pass in I can check to see if they are passing in the
> right parameters.
>
> Am I just looking at this the wrong way? Is there a easier or more
> efficient way I should look at?
>
> Any help is greatly appreciated.
>
> Mike R.
>
>


charlie@nunya.com

6/11/2004 4:58:00 PM

0

I think what he is saying is that based on the user, the data that is
inserted or updated will vary.

You should create one method that takes all the parameters and the unique
"client id". Then, on the server you should have some method that is
capable of building the correct insert or update statement based on the id
of the sender. This could be a method that builds a sql string or a call to
a stored procedure that pretty much does the same thing.

For your Web Service method, I would probably create an object which could
be populated by the caller then passed to the handling method on the server
side.