简体   繁体   English

Web Application和Desktop之间的通信有哪些更好的方法?

[英]Communication between Web Application and Desktop, what better way?

Good afternoon everyone! 大家下午好!

I have a web application which contains some products need to communicate with a desktop application, when changing inventory, the best way in this case? 我有一个Web应用程序,其中包含一些需要与桌面应用程序通信的产品,在更改库存时,这种情况下的最佳方法是什么?

Note: Before it was a Desktop System -> Desktop, communication was done by exchanging text files, but now how has the web system is no longer possible, so I would know what the best form of communication between Desktop and Web. 注意:在它是桌面系统 - >桌面之前,通过交换文本文件来完成通信,但是现在Web系统不再可能,所以我知道桌面和Web之间的最佳通信形式。

In your case, we decided to expose our web app functionality as web services, because of: 在您的情况下,我们决定将我们的Web应用程序功能公开为Web服务,因为:

  • The client code is easily generated by your favorite WS library 客户端代码很容易由您喜欢的WS库生成
  • The server code is just an annotated POJO and every stub is generated by the same library (say you can choose CXF for both things but there are plenty of options) 服务器代码只是一个带注释的POJO,每个存根都是由同一个库生成的(假设您可以为这两个选项选择CXF,但有很多选项)
  • Security and operations people agreeded instantly to our proposal since functionality was exposed to the exterior through the corporative https security (exactly the same as our web application was doing) 安全和运营人员立即同意我们的提案,因为功能通过公司的https安全性暴露在外部(与我们的Web应用程序正在做的完全相同)

The kind of web services you use depends on your requirements: people normally expose their API as a REST api, which is more or less an http CRUD wrapper over your application entities. 您使用的Web服务类型取决于您的要求:人们通常将其API公开为REST API,这或多或少是您应用程序实体上的http CRUD包装器。 You can use standard SOAP web services, which is more of a procedural point of view. 您可以使用标准SOAP Web服务,这更像是一个程序观点。

Up to you to decide, I hope this was useful 由你来决定,我希望这很有用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM