473,320 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Web Services and Web References

I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site of
on an intranet server. What are the best practices for creating web services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?
Nov 23 '05 #1
4 2176
For security, I sugguest that use many web services with few functions. If
one cannot find a door, one will not wanna attack it.
"Ryan Wade" <Ryan Wa**@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #2
For security, I sugguest that use many web services with few functions. If
one cannot find a door, one will not wanna attack it.
"Ryan Wade" <Ryan Wa**@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #3
It depends on how many application layers you will implement and how often
you will be adding new webservices & functionallity to the system, not to
mention personal preference :)

You could go to extremes and have a single method with parametrized
method-to-call-name, object-input and object-return, (e.g. public object
DoSomething(string methodName, object input)) and figure out what to do in
the back, as some data access layers are built. But that's really going to
extremes and requires extra layers with actual methods in front and begind
the ws. It is justified sometimes, though; as always it depends on the
problem.

In a relatively fixed-spec scenario I personally go for object-like
webservices - more services, with fewer methods, just like you normally
build different objects with their respective methods.
This means you need to have several ws references on the client (one ws -
one reference), but it is no biggie and you also have better control. You
can either generate proxies in VS, or manually via the wsdl tool
(e.g. wsdl /out:WSObresti.cs
/namespace:Rrc.DursNet.Obresti.UI.WSObrestiClient
http://localhost/durs/WSObresti/WSObresti.asmx)
The only gripe about this is that objects suddenly come from different
namespaces, so some typecasting is usually involved.

In either scenario I would recommend an intermediate layer on the client, so
that changes to the transport mechanism and webservices need not affect the
client directly. It's not that much work, but may save you plenty of nerves
in the future.
I also recommend that you store the ws urls into the config file of some
sorts (you then target the ws at appropriate urls in the intermediate
layer), so you don't have to recompile the app if you move your webservices
around.

Another thought... if you are transferring your own objects, take a good
look into xml & soap serialization. If you need functionallity only binary
serialization can provide, serialize the objects via binary serializer and
transfer them as byte arrays, then deserialize them back at the client.

Good luck!

Regards,

Sigmund Jakhel
MCSD.NET

"Ryan Wade" <Ryan Wa**@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #4
It depends on how many application layers you will implement and how often
you will be adding new webservices & functionallity to the system, not to
mention personal preference :)

You could go to extremes and have a single method with parametrized
method-to-call-name, object-input and object-return, (e.g. public object
DoSomething(string methodName, object input)) and figure out what to do in
the back, as some data access layers are built. But that's really going to
extremes and requires extra layers with actual methods in front and begind
the ws. It is justified sometimes, though; as always it depends on the
problem.

In a relatively fixed-spec scenario I personally go for object-like
webservices - more services, with fewer methods, just like you normally
build different objects with their respective methods.
This means you need to have several ws references on the client (one ws -
one reference), but it is no biggie and you also have better control. You
can either generate proxies in VS, or manually via the wsdl tool
(e.g. wsdl /out:WSObresti.cs
/namespace:Rrc.DursNet.Obresti.UI.WSObrestiClient
http://localhost/durs/WSObresti/WSObresti.asmx)
The only gripe about this is that objects suddenly come from different
namespaces, so some typecasting is usually involved.

In either scenario I would recommend an intermediate layer on the client, so
that changes to the transport mechanism and webservices need not affect the
client directly. It's not that much work, but may save you plenty of nerves
in the future.
I also recommend that you store the ws urls into the config file of some
sorts (you then target the ws at appropriate urls in the intermediate
layer), so you don't have to recompile the app if you move your webservices
around.

Another thought... if you are transferring your own objects, take a good
look into xml & soap serialization. If you need functionallity only binary
serialization can provide, serialize the objects via binary serializer and
transfer them as byte arrays, then deserialize them back at the client.

Good luck!

Regards,

Sigmund Jakhel
MCSD.NET

"Ryan Wade" <Ryan Wa**@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
0
by: Saumendra | last post by:
Hi guys, When I am adding a Web Reference in Visual Studio.net, I provide the url to the .vsdisco file, so that Visual Studio.net can dynamically discover all the available Web Services. Now when...
3
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
0
by: Eeraj | last post by:
In a large scale web service project, it is a good idea to group the services into logical units. So for example: http://myservices/CustomerService.asmx http://myservices/SupplierService.asmx...
2
by: Deecrypt | last post by:
Hi, I'm creating an ASP.NET website in Visual Studion 2005 using Csharp and have added Web References to "two" Web Services running on my localhost (Both WebServices and ASP.Net website are on the...
3
by: =?Utf-8?B?QS4gUm9iaW5zb24=?= | last post by:
I have been looking high and low and can't seem to find anything a little more detailed on the whole RS utility. What I'm looking for specifically is some type of programming reference. Also, I...
2
by: ddieckmann | last post by:
I am writing an application that will use the FedEx Web Services to validate addresses and determine what services are available for an address. I have downloaded the sample code and WSDL files...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.