---
title: "基于Spring/Hibernate/Hessian的RCP客户端系统框架"
author: "salever"
date: "2012-08-14T11:23:20Z"
tags: []
categories: ["行业应用"]
slug: "spring-hibernate-hessian-rcp"
draft: false
lastmod: "2012-08-14T11:24:11Z"
id: 1631207
url: "https://salever.iteye.com/blog/1631207"
---

## 本文同步发表在  [http://www.xeclipse.com/?p=1344](http://www.xeclipse.com/?p=1344)

最近抽空将以前弄得项目整理一下，主要是一些基于数据库的RCP业务系统，比较常见的方式是通过Hibernate处理数据库，Spring处理一些业务逻辑的封装，然后RCP实现前端UI界面。这里简单的整理一下2个实现框架。

![](http://www.xeclipse.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif "更多...")

## 本地MVC化的RCP系统基础框架

模拟场景：

基于数据库的客户端系统，涉及登录、权限、模块编辑、管理、报表等，这一类的系统客户端都可以适用

主要技术：

Hibernate实现数据库封装，Spring处理业务逻辑封装，RCP实现前端界面，标准的MVC结构

主要系统架构设计

[![](http://www.xeclipse.com/wp-content/uploads/2012/08/%E6%9C%AC%E5%9C%B0%E5%8C%96%E7%9A%84RCP.jpg "本地化的RCP")](http://www.xeclipse.com/wp-content/uploads/2012/08/%E6%9C%AC%E5%9C%B0%E5%8C%96%E7%9A%84RCP.jpg)

源码参考

SVN：[http://org-salever-commons.googlecode.com/svn/trunk/prototype/](http://org-salever-commons.googlecode.com/svn/trunk/prototype/)下面的：

- org.salever.rcp.dbSystem.client.db
- org.salever.rcp.dbSystem.client.ui

## 远程分布式的RCP系统基础框架

模拟场景：

服务器与客户端分离，通知远程通信来实现数据请求与交互。RCP单纯作为富客户端实现UI界面。所有逻辑都由服务器端实现。

示意图：

[![](http://www.xeclipse.com/wp-content/uploads/2012/08/%E8%BF%9C%E7%A8%8BRCP%E7%A4%BA%E6%84%8F%E5%9B%BE.png "远程RCP示意图")](http://www.xeclipse.com/wp-content/uploads/2012/08/%E8%BF%9C%E7%A8%8BRCP%E7%A4%BA%E6%84%8F%E5%9B%BE.png)

主要技术：

- 服务器端：Spring+Hessian实现远程通信，Hibernate封装数据库，tomcat或其他web容器
- 客户端：RCP仅作为UI实现，所有的业务逻辑由远程请求实现

主要系统架构设计：

服务器端：

[![](http://www.xeclipse.com/wp-content/uploads/2012/08/%E8%BF%9C%E7%A8%8BRCP%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%AB%AF.png "远程RCP服务器端")](http://www.xeclipse.com/wp-content/uploads/2012/08/%E8%BF%9C%E7%A8%8BRCP%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%AB%AF.png)

客户端：

[![](http://www.xeclipse.com/wp-content/uploads/2012/08/%E8%BF%9C%E7%A8%8BRCP%E6%9C%8D%E5%8A%A1%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%AB%AF.png "远程RCP服务客户端端")](http://www.xeclipse.com/wp-content/uploads/2012/08/%E8%BF%9C%E7%A8%8BRCP%E6%9C%8D%E5%8A%A1%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%AB%AF.png)

源码参考：

SVN：[http://org-salever-commons.googlecode.com/svn/trunk/prototype/](http://org-salever-commons.googlecode.com/svn/trunk/prototype/)

工程列表：

- org.salever.rcp.remoteSystem.client.net.core 用于客户端与远程server通信
- org.salever.rcp.remoteSystem.server server web 工程
- org.salever.rcp.remoteSystem.server.db 处理数据库的工程
- org.salever.rcp.remoteSystem.server.sdk server暴露的远程模型和service接口
- org.salever.rcp.remoteSystem.client.ui 客户端