Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] JSR-356 Design Thought

Hi,

On Tue, Feb 18, 2014 at 6:10 AM, Mack Gerhardt <mack@xxxxxxxxxxxxxx> wrote:
> Is it me or does anyone else feel like the annotation based setup of a
> WebSocket pojo is like trying to bring dynamic feel of node and python to
> java. Why not have concrete interfaces to implement vs methods to annotate,

You can do that in both JSR (extend Endpoint and implement the
MessageHandler you need) and Jetty implementations
(WebSocketListener).

> and if you screw up the signature it doesn't work as intended vs
> implementing an interface and knowing at compile time, and having code
> hinting in any ide.

:)

> One of the things I love about java is the rigidity, and that it is not
> dynamic, and I can reflect over  classes, and methods. It just feels like
> they are trying to do cool things with jsr-356, instead of a nice clean api.

For one they are following the JEE trend, that of "annotate
everything". Annotating has pros and cons.
The API is IMHO is missing a lot of basic things that network APIs
require, and contains mistakes that could have been avoided.
The list is quite long, and we gotta live with it.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.


Back to the top