Organizing Large Web Service

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
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?
 
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.
 
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.
 
Back
Top