Personally I think it makes sense to have two distinct endpoints. I also think it makes sense to have more than one class. I don't care that much how many servlets - tho to be honest I think if there are two different endpoints with different behaviours then people who don't know the system well will find two servlets clearer and easier to manage, deploy, and secure.

For example I may wish to have very different security for REST than for WS if I am using WS-Sec for WS and HTTPS+Client Certs for REST.

Paul

On 11/27/05, Tom Oinn <[EMAIL PROTECTED]> wrote:
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

Reply via email to