Eran Chinthaka wrote:
Srinath Perera wrote:
Hi Eran;
If we use two servlets .. user need to aware about the endpoint change..
Making users aware abt it explicitly is good, IMO.
When I did what we have before .. I actually think about the two
servlets. But one servlet is kind of cool for me as once you rest
enable it .. all the services will have REST and normal interfaces.
Does a one servlets complecate/ slowdown the things too much?
It will not slow down, but complicates the stuff. REST is rich enough to
be implemented in a seperate servlet. When you were implementing, u've
implemented just one case, out 5 or more scenarios. Just look at even
the current code, its getting complicated.
So I still thinks its kind of cool and easy to have them in two seperate
serlvets.
Since when was the servlet the unit of functionality in Java? There's no
reason you couldn't have a single servlet which in turn delegates to
different implementations of the HttpServlet API depending on the kind
of call. This keeps the single endpoint (if that matters) and splits the
code into two orthogonal sections for ease of development.... am I
missing something here?
Tom