Swing瘦客户端中的MVC设计模式

时间:2013-02-25 02:38:20

标签: java swing model-view-controller

我正在开发一个应用程序,它有许多swing瘦客户端UI访问公共服务器。 客户端使用RMI与服务器通信。

如何在此类应用程序中实现MVC模式?

编辑:

我想在客户端和服务器端都有ControllerClientController侦听View中的所有事件,即客户端UI,并将信息传递给服务器端的Controller。然后,ServerController访问Model Service Model。我在客户端和服务器端都考虑了Controller,以便在客户端可以处理客户端中发生的任何小事件,而无需在服务器中调用带有RMI开销的Controller。

这是实施MVC的正确方法吗?

1 个答案:

答案 0 :(得分:0)

mvc最初在一台机器上引用了迷你架构(http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html)。既然你的是一个网络应用程序,请查看http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller上的另请参阅。还可以在http://c2.com/cgi/wiki?ModelViewController看到派生和扩展。其中一个可能是你想要的。