EXTJS 2.0 + struts2.0 在 google app 上面跑通测试.
2014-11-14 00:00
411 查看
新的东西要不断学习.
不知道.用 extjs 的人多么.
用的开发工具还是用的 GWT的那个工具.发布部署上去了.
action 层.不能使用 模型驱动. 需要对每一个参数 进行
request.getParameter.() 得到.(google app的struts2 这个拦截跑不了)
service层业务逻辑.编写业务逻辑.需要手动将 结果写成一个 json 的格式.json lib 也被限制了.
dao层.没有数据库而是之间将bean序列号化 到服务器.
目前还没有 ioc的容器.
http://freewebsys.appspot.com/
部署上去了.
附近是源代码..没有放jar包
自己写了一个json转换.
写道
private String toPageJSON(int size, List<User> results) {
StringBuffer json = new StringBuffer();
// 将返回数据拼接成一个json的分页格式.
json.append("{\"results\":\"");
json.append(size);
json.append("\",\"items\":[");
for (int i = 0; i < results.size(); i++) {
json.append(toObjectJSON(results.get(i)));
if ((i + 1) != results.size()) {/* 不是最后一个.添加逗号. */
json.append(",");
}
}
json.append("]}");
return json.toString();
}
private String toObjectJSON(User user) {
StringBuffer json = new StringBuffer();
json.append("{");
json.append("\"id\":" + "\"" + user.getId() + "\",");
json.append("\"name\":" + "\"" + user.getName() + "\",");
json.append("\"email\":" + "\"" + user.getEmail() + "\"");
json.append("}");
return json.toString();
}
写的比较匆忙.应该用 反射改改..
不知道.这个extjs的速度 怎么样.
有兴趣的可以 邮件联系.
toeoso@gmail.com
不知道.用 extjs 的人多么.
用的开发工具还是用的 GWT的那个工具.发布部署上去了.
action 层.不能使用 模型驱动. 需要对每一个参数 进行
request.getParameter.() 得到.(google app的struts2 这个拦截跑不了)
service层业务逻辑.编写业务逻辑.需要手动将 结果写成一个 json 的格式.json lib 也被限制了.
dao层.没有数据库而是之间将bean序列号化 到服务器.
目前还没有 ioc的容器.
http://freewebsys.appspot.com/
部署上去了.
附近是源代码..没有放jar包
自己写了一个json转换.
写道
private String toPageJSON(int size, List<User> results) {
StringBuffer json = new StringBuffer();
// 将返回数据拼接成一个json的分页格式.
json.append("{\"results\":\"");
json.append(size);
json.append("\",\"items\":[");
for (int i = 0; i < results.size(); i++) {
json.append(toObjectJSON(results.get(i)));
if ((i + 1) != results.size()) {/* 不是最后一个.添加逗号. */
json.append(",");
}
}
json.append("]}");
return json.toString();
}
private String toObjectJSON(User user) {
StringBuffer json = new StringBuffer();
json.append("{");
json.append("\"id\":" + "\"" + user.getId() + "\",");
json.append("\"name\":" + "\"" + user.getName() + "\",");
json.append("\"email\":" + "\"" + user.getEmail() + "\"");
json.append("}");
return json.toString();
}
写的比较匆忙.应该用 反射改改..
不知道.这个extjs的速度 怎么样.
有兴趣的可以 邮件联系.
toeoso@gmail.com
相关文章推荐
- EXTJS 2.0 + struts2.0 在 google app 上面跑通测试.
- 我在Google AppEngine上部署了一个Java应用(OpenID测试)
- 在google app engine(GAE)中利用struts2
- Realazy � 测试 Google App Engine
- Java 开发 2.0: 使用 Google App Engine
- 大话App测试2.0笔记2
- 大话App测试2.0笔记1
- 大话APP测试2.0笔记——抓包查看响应时间
- 在google app engine(GAE)中利用struts2
- {Android} 测试Google Play In-App-Billing支付
- 大话APP测试2.0笔记——内存测试
- How to fetch access token in Google AppEngine (OAuth 2.0) us
- 大话APP测试2.0笔记——应用响应时间
- Java 开发 2.0: 使用 Google App Engine
- APP2.0测试经验
- 大话APP测试2.0笔记——耗电量测试
- Google开始测试点击呼叫通讯服务
- New examples for the Microsoft .NET Framework 2.0 online and Google group Ajax.NET
- 福布斯富豪榜上面的Google富翁
- Google开始测试Gmail for Domains!!!