websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-14

Should only be able to create WebSockets using POJOs and Annotations

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      The motivation behind this request is to make a simple programming model consistent with the JAX-RS spec which does not allow programmatic endpoints, just POJO+annotation endpoints. Since this POJO+annotation style has become a central feature of the Java EE programming model, perhaps this spec should only use it ?

      This would mean removing Endpoint and the MessageHandler classes. Session, RemoteEndpoint and probably the configuration and container classes would have to remain.

      I think there is benefit in standardizing the API-versions of websocket endpoints, even if this does offer two modes in the programming model. The benefit is to standardize on the multiple API-versions of websocket-endpoint out there already, and to cater to developers who do not care for annotations (there are plenty).

        Activity

        Hide
        dannycoward added a comment -

        We will keep both POJOs and Endpoints per the comment

        Show
        dannycoward added a comment - We will keep both POJOs and Endpoints per the comment
        Hide
        dannycoward added a comment -

        We will not remove either of the two modes.

        We have had feedback that developers like to be able to do programmatic endpoints as well as annotations, even if some people believe that annotations should be the only mode.

        As much as the EE programming model is focused around annotations nowadays, there are still many developers who prefer an API approach. Allowing other websocket frameworks to layer on top of our standard Endpoint API is going to be a big plus. We'd rather than kind of invention happen on top of our APIs than away from them.

        Show
        dannycoward added a comment - We will not remove either of the two modes. We have had feedback that developers like to be able to do programmatic endpoints as well as annotations, even if some people believe that annotations should be the only mode. As much as the EE programming model is focused around annotations nowadays, there are still many developers who prefer an API approach. Allowing other websocket frameworks to layer on top of our standard Endpoint API is going to be a big plus. We'd rather than kind of invention happen on top of our APIs than away from them.

          People

          • Assignee:
            dannycoward
            Reporter:
            dannycoward
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: