Arch-03-16- RIA 最佳实践探寻
发布时间: 2012-07-15 20:11:37 作者: rapoo
Arch-03-16- RIA 最佳实践摸索
RIA 是必须的了,实现 RIA 的路径也特别的多,摸索正确的框架搭档和最佳实践路径也成了必须。
?
1、基调
(1)后端用: java
(2)前端用: Dojo 或 JQuery
(3)前端组件库:smartClient 或 dojo/jquery官方组件库
?
2、路径
(1)struts,chain,tile,dojo,smartClient
(2)struts,dwr,jquery,自写UI组件
?
3、路径 1 解剖(struts,chain,tile,dojo,smartClient)
(1)目录

?
(2)应用按模块方式组织,一个模块分三个部份存放
?? ? ?。class 直接放入 classes 或 lib
?? ? ?。jsp 页面和struts 配置放入 /WEB-INF/services-xxx 下的 config 和 pages
?? ? ?。前端脚本放入应用根目录 /service-xxx/js/
?
(3)载入
?? ? ?。跳到独立页面 uum.jsp
?
??? ? ?。初始化 isomorhpic
?? ? ?。session 中取得 userData
?? ? ?。初始化 dojo
?? ? ?。载入应用
?
?(4)应用模块调用入口
?? ? ?。infa.ajax.application.Application.run()
?? ? ?。this._run(), 初始化 title,history,bookmark,perspective,_init(),layout.show(),_runSession()
?? ? ?。this._init(), 初始化 本地语言,创建 layout?
?
?(5)View 是继承于 isc.VLayout
?
?? ? ? 。然后调用 service 操作数据库。
?
?
?
4、路径 2 解剖(struts,freemarker,dwr,jquery,自写UI组件)
?
(1)目录
?? ?。整个站点以 freemarker + struts 显示,
?? ?。/WEB-INF/classes/template ,全部页面模板文件 ftl,没有明确独立模块存放标志。
?? ?。/WEB-INF/classes/spring-*.xml 配置文件,
?
(2)/WEB-INF/classes/template/decorator/default/template.ftl - 主页全局文件,全站唯一入口。
?
??
?
?
(3)sturts-config.xml
?
?
??
?
(4)view-profile-communities.ftl
?
?
?
?
?(6)后台处理
public abstract class RemoteSupport implements LocaleProvider, TextProviderpublic class FollowingActionBean extends RemoteSupport... this.followingManager.followContainer(getUser(), container);...public class FollowingManagerImpl implements FollowingManager, EventSource... this.followingDAO.create(user.getID(), descriptor);...
??