A
Allan Ebdrup
I just had a discussion with one of my fellow programmers.
We have a class for doing some logging and sending an email, it has 5
different scenarioes of loggin that are common enough to share a class and
database tables.
In the future there might be new scenarioes that require their own custom
classes and database tables.
Now we want to expose some of our logging class's methods as webservices
(more a group of function calls called in one batch)
I want to use an OO-like approach to laying out the webservice where we have
the methods of this one logging class in one .asmx file and create other
..asmx files for the future logging classes. Then we group all the logging
..asmx files together in the same namespace (and directory)
He want's to bunch all the Add methods together and have a .AddClass1 method
and a .AddClass2 method and so on in the same .asmx file
What approach is the best? Does one not apply some OO principles to
webservices (I mean: they are declared as a class with webmethods) or does
on simply create function libraries with some (hopefully) meaningfull
grouping of functions.
I hope you have some insights to a best practice for the architecture of
webservices.
Kind Regards,
Allan Ebdrup
We have a class for doing some logging and sending an email, it has 5
different scenarioes of loggin that are common enough to share a class and
database tables.
In the future there might be new scenarioes that require their own custom
classes and database tables.
Now we want to expose some of our logging class's methods as webservices
(more a group of function calls called in one batch)
I want to use an OO-like approach to laying out the webservice where we have
the methods of this one logging class in one .asmx file and create other
..asmx files for the future logging classes. Then we group all the logging
..asmx files together in the same namespace (and directory)
He want's to bunch all the Add methods together and have a .AddClass1 method
and a .AddClass2 method and so on in the same .asmx file
What approach is the best? Does one not apply some OO principles to
webservices (I mean: they are declared as a class with webmethods) or does
on simply create function libraries with some (hopefully) meaningfull
grouping of functions.
I hope you have some insights to a best practice for the architecture of
webservices.
Kind Regards,
Allan Ebdrup