What is the best way to share common code (such as domain classes) between two or more projects?

后端 未结 7 1846
野的像风
野的像风 2021-02-02 11:33

We are developing a Web application consisting of two Eclipse projects. One project is an HTTP-based RESTful Web service; the other project is a Web site. Both

7条回答
  •  野的像风
    2021-02-02 12:06

    If you are sharing domain classes between a client and server in a RESTful system you are defeating the point of REST. The REST constraints are designed to allow a client and server system to independently evolve by ensuring that the only coupling between the two systems is confined to media types and link relations.

    If you need to share domain objects, forget about REST, it is going to me more trouble than it is worth.

提交回复
热议问题