0

I am trying to develop a cross application model/view scheme using Qt. What I mean attempting is to have:

Data: SQL Server

Model: Server Application

View/Controller: Client Application

This is for security reasons so that the Client App does not communicate directly with the server. Instead the communication between the model and the data server is handled via proxy Server App which runs on the same server as the database. Communication between the latter two is easy since Qt has the classes to handle it already and they are relatively easy to sub-class.

The problem for me is how to establish the connection between the model (based in the remote Server App) and the view (in local Client App).

I will present my ideas I gathered from researching the topic if it is the right direction but I would really appreciate some guidance. So first I will establish the network socket-based connection between the two apps. But what then? Is it possible to simply "link" the model in the Server App in the Client App as if they were part of the same app? Or should there be the model in the Client App as well and the connection would be used for synchronization between the two models? Or something different?

Thanks for help!

4

1 回答 1

1

你肯定必须实现某种协议。如果您只是将完整的模型从服务器链接到客户端,那么安全性没有任何好处。更多的是local copy,您的应用程序缓存中将有一个用于重新表示数据的缓存。您需要定义要同步的内容以及何时检查新数据或将数据发送回服务器。之后开始实现最基本的协议选项并开始发送一些数据。最重要的是开始实现您需要的任何更多功能。

于 2013-07-23T12:39:17.867 回答