Organizing Large Web Service

G

Guest

Hi all,

How do you all organize your large web services?

I have a service which needs to cover multiple components. Do you build one
asmx file for all the functions. Multiple ASMX files - grouping by
functionality? Or have do you go the document route - in which the details
are in the XML, and the web service routes it to the appropriate backend?

Some of the components need "high" performance, and I need usability, so
I'm hoping to stay away from the document-centric model.

Any ideas?

Thanks!
 
C

Cowboy \(Gregory A. Beamer\)

Most often, I would think in terms of functionality, which may or many not
correspond to the actual assemblies. Each service (page) should focus on a
particular set of methods that fit a particular type of functionality. If
you think of each page as a service (it is), then you are fine.

You do not have to line up services with "documents" in another application.
In fact, in most cases, that is a detrimental way to design your services,
as you are thinking UI rather than service.
 
G

Guest

Most often, I would think in terms of functionality, which may or many
not correspond to the actual assemblies. Each service (page) should
focus on a particular set of methods that fit a particular type of
functionality. If you think of each page as a service (it is), then
you are fine.

You do not have to line up services with "documents" in another
application. In fact, in most cases, that is a detrimental way to
design your services, as you are thinking UI rather than service.

Any ideas how I can reduce the number of web references? For example if an
application needs access to multiple ASMX files - it'll become tedious to
add all those references all the time?
 
G

Guest

You can have multiple WebMethods in single asmx file...
That is usually how it's done...

I know that - but what happens when you have 100's of methods?

That's my problem.
 
G

George Ter-Saakov

Nothing happens :)
You just have a 100's methods...

Usually in your asmx file you have only declarations. As soon as method
called you route it to your internal classes... Which can be in different
files.

So your asmx file is not big at all. Like 4 lines per method.

PS: Of course I do not know what kind of web service you doing but usually
it's not suppose to be 100s methods. Rarely you need to expose all your
business to outside world.
May be you can expose one method "DoTheDew" that takes one string (or
generic class ) as a parameter.
That string suppose to be XML which is parsed out and routed to
appropriately. Something like
----IN--------------------
<BOD>
<Action>CreateOrders</Action>
<ActionDetails>..........</ActionDetails>
</BOD>

----OUT---------------
<BOD>
<Status>Success</Status>
<ErrorMessage></ErrorMessage>
<ResponseDetails>..........</ResponseDetails>
</BOD>

George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top