-
Notifications
You must be signed in to change notification settings - Fork 88
decision service framework
We need to choose which framework(s) we want to use for building services. For the devonfw, we focus on a standard API, if available. However, we also want to recommend an implementation. While projects would still be able to choose whatever they want, we want to suggest the best, most robust, and established solution. This way, projects do not have to worry about the decision and can rely on a production-ready framework without running into any trouble. Also, besides the standard, the configuration of the implementation framework differs, so we want to give instructions in the documentation and by our sample application. This is why, in the end, the implementation also matters. If a project has a customer demand to use something else, the project has to take care of it. We will always suggest and "support" ONE solution.
For REST services, devonfw relies on the JAX-RS standard (and NOT on spring-mvc with its proprietary annotations). JAX-RS (Jakarta RESTful Web Services) is a Java programming language API to develop web services following the Representational State Transfer (REST) architectural pattern. For Apache CXF, the spring container was the first choice, but container abstraction has been properly introduced by design, so it can be used in JEE application servers. Apache CXF is a services framework that helps to build and develop services using frontend programming APIs, such as JAX-RS. Everything works smoothly in our sample application, and in addition, we collected feedback from various projects utilizing CXF, either with XML or JSON, with reported success in production. Therefore, we decided to use Apache CXF for Spring. For Quarkus applications, devon4j recommends to use RESTEasy, which is a JAX-RS implementation aimed at providing productivity frameworks for developing client and server RESTful applications and services in Java.
For WebServices we rely on the JAX-WS standard. On our short list we have Metro2 and Apache CXF. Here a collection of facts and considerations:
Metro2 | Apache CXF | |
---|---|---|
Pro |
- reference implementation |
- supports both JAX-WS and JAX-RS therefore consistent configuration, single integration into servlet-container and spring |
Contra |
- We expect trouble if use the planned URL path scheme <app>/services/(rest|ws)/... as CXF and Metro2 would both occupy services/* |
- IMHO currently used in less projects than metro2 so less existing experience |
See also http://predic8.de/axis2-cxf-jax-ws-vergleich.htm We also had an evaluation at CSD research on CXF vs. Axis2. vs. Metro that suggested CXF.
BTW: Axis(2) is definitely out of discussion for devonfw.
This documentation is licensed under the Creative Commons License (Attribution-NoDerivatives 4.0 International).