Web application achitecture

时间:2015-11-12 11:17:43

标签: java web-services web architecture

I've to rebuild a swing based application to move it to a web environment. This application has some functionalities that already exist in another web application. I want them both to maintain the same functionalities, even those that are shared, but I don't want duplicated code. In terms of architecture/technologies, what is the best approach to reuse as much code as I can? A third service-oriented application that controls all the business logic and have the web applications serve only as front-end? But how to avoid code duplication on the front-end?

Any feedback will be much appreciated.

2 个答案:

答案 0 :(得分:1)

非常广泛的问题因此很难给出确切的解决方案。考虑将通用功能分离为不同的服务。然后两个应用程序都可以重定向到它或使用它的api。

如果那不是一个选项,那么尝试将该逻辑分离到将包含在其他应用程序中的库。好的前端框架允许你使用前端代码(指令,插件,验证器等)来实现它

答案 1 :(得分:0)

您可以使用依赖项来转换库中的常用实用程序,访问数据和业务规则。在第一时间,您可以创建一个分层和责任的重构器,然后您可以将Maven合并到您的环境中以生成并开始使用依赖项。