由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 一个关于GWT的问题
相关主题
PHP/JSP/ASP等页面语言应该被慢慢抛弃了吧? (转载)请问哪个J2EE MVC Framework最有前途
web application请教新手学习web service,有人想一起做点project吗?
入门问题:以Spring+JPA开发back end,那么表现层只能用jsp吗?asp.net现在的mvc模式,很象java当年在servlet里面的doGet(),doPost()里写html code.
一个详细有趣的JDjava学习范围 - for找工作
j2ee现在流行什么?JSF有前途吗
Spring MVC question.Stateful session bean到底有啥好处?
怎么把servlet publish成web servicesGWT + Spring ?
大妈求建议(拜谢!)javascript 画多边形?
相关话题的讨论汇总
话题: gwt话题: spring话题: mvc话题: json话题: form
进入Java版参与讨论
1 (共1页)
d**k
发帖数: 1223
1
我有一个关于GWT的问题。好像坛子里讨论的不多。在以前的一个帖子里,魔法胖子提
到“google will own your rear end”。这是个什么意思?
其实我的理想状态还是后端用jdbc或者别的persistance, 然后前端用GWT代替jsp,
这个可行吗?这个GWT前后端是怎么talk的?还需要一个spring mvc或者别的什么web
tier的东西吗?我的直觉是spring mvc 和GWT 整合应该是没戏了。谢谢了。
g*****g
发帖数: 34805
2
mf was talking about cloud. You certainly can use GWT as your front end,
and you can integrate with spring MVC if you want it that way.
It's probably simpler though, to integrate with a restful webservice.

【在 d**k 的大作中提到】
: 我有一个关于GWT的问题。好像坛子里讨论的不多。在以前的一个帖子里,魔法胖子提
: 到“google will own your rear end”。这是个什么意思?
: 其实我的理想状态还是后端用jdbc或者别的persistance, 然后前端用GWT代替jsp,
: 这个可行吗?这个GWT前后端是怎么talk的?还需要一个spring mvc或者别的什么web
: tier的东西吗?我的直觉是spring mvc 和GWT 整合应该是没戏了。谢谢了。

m******t
发帖数: 2416
3

Never mind that. Just one of my poor attempts at being funny. :-)
You can still have gwt running with spring mvc, or any other http
service for that matter. Gwt supports sending standard http requests.
That's actually how I made my gwt login form communicate with spring
security's login processing service.

【在 d**k 的大作中提到】
: 我有一个关于GWT的问题。好像坛子里讨论的不多。在以前的一个帖子里,魔法胖子提
: 到“google will own your rear end”。这是个什么意思?
: 其实我的理想状态还是后端用jdbc或者别的persistance, 然后前端用GWT代替jsp,
: 这个可行吗?这个GWT前后端是怎么talk的?还需要一个spring mvc或者别的什么web
: tier的东西吗?我的直觉是spring mvc 和GWT 整合应该是没戏了。谢谢了。

d**k
发帖数: 1223
4
谢过两位老大了。
t******h
发帖数: 120
5
可以啊
gwt前后端通过rpc和http通信
我现在的项目就是用gwt(rpc) + spring mvc + ibatis做的
我记得网上有个文章讲这个的 就是写一个service接受所有rpc 然后通过spring mvc转
发给不同的service来处理
好像还有一个开源的项目做了这个框架 不用自己写 google一下吧
d**k
发帖数: 1223
6
那就是说mvc只负责router service, 不再用来forward view 乐?我还是搜搜吧。谢谢了

【在 t******h 的大作中提到】
: 可以啊
: gwt前后端通过rpc和http通信
: 我现在的项目就是用gwt(rpc) + spring mvc + ibatis做的
: 我记得网上有个文章讲这个的 就是写一个service接受所有rpc 然后通过spring mvc转
: 发给不同的service来处理
: 好像还有一个开源的项目做了这个框架 不用自己写 google一下吧

m******t
发帖数: 2416
7

谢了
It still handles views, except in this case a view could
be some json or xml response.

【在 d**k 的大作中提到】
: 那就是说mvc只负责router service, 不再用来forward view 乐?我还是搜搜吧。谢谢了
d**k
发帖数: 1223
8
我tnnd笨死了:死活没法create一个简单的app看看到底怎么回事儿。老大你能给个简
单的例子吗?我试试能不能试着go through一个sample. 谢谢了

【在 m******t 的大作中提到】
:
: 谢了
: It still handles views, except in this case a view could
: be some json or xml response.

k******p
发帖数: 21
9
RE: 我试试能不能试着go through一个sample. 谢谢了
http://courses.coreservlets.com/Course-Materials/gwt.html
Happy coding

【在 m******t 的大作中提到】
:
: 谢了
: It still handles views, except in this case a view could
: be some json or xml response.

m******t
发帖数: 2416
10

I am not supposed to share the source code I have, but basically
it works like this:
1. Some GWT code submits a form to a url,
2. The url is mapped to a spring mvc handler that, well, handles
it just like any other form submission requests, prepares the model,
and forwards to a view,
3. The view renders a json response (as oppose to typical html),
4. Finally the GWT code gets the response, and parses the json.
So in the steps above, 1 and 4 are completely gwt, while 2 and 3
are spring mvc. They

【在 d**k 的大作中提到】
: 我tnnd笨死了:死活没法create一个简单的app看看到底怎么回事儿。老大你能给个简
: 单的例子吗?我试试能不能试着go through一个sample. 谢谢了

相关主题
Spring MVC question.请问哪个J2EE MVC Framework最有前途
怎么把servlet publish成web services新手学习web service,有人想一起做点project吗?
大妈求建议(拜谢!)asp.net现在的mvc模式,很象java当年在servlet里面的doGet(),doPost()里写html code.
进入Java版参与讨论
d**k
发帖数: 1223
11
hey, Thanks a lot, man. I will take a look to see if I can find any clue
about spring+gwt.

【在 k******p 的大作中提到】
: RE: 我试试能不能试着go through一个sample. 谢谢了
: http://courses.coreservlets.com/Course-Materials/gwt.html
: Happy coding

d**k
发帖数: 1223
12
胖子, thanks a lot for all your help. I guess I need to spend some more time
on this thing. There is one question just pop up to my head: if a GWT form
submit to a URL, and Spring, say controller, catch the post and doing its
data process and then forwards to a view which renders as JSON, than how
could that form or other GWT component catch this JSON?

【在 m******t 的大作中提到】
:
: I am not supposed to share the source code I have, but basically
: it works like this:
: 1. Some GWT code submits a form to a url,
: 2. The url is mapped to a spring mvc handler that, well, handles
: it just like any other form submission requests, prepares the model,
: and forwards to a view,
: 3. The view renders a json response (as oppose to typical html),
: 4. Finally the GWT code gets the response, and parses the json.
: So in the steps above, 1 and 4 are completely gwt, while 2 and 3

o**1
发帖数: 6383
13
为什么要用 spring mvc? 直接 gwt async service 就可以吧,把 spring service
autowire 进 gwt service 里面。

【在 d**k 的大作中提到】
: hey, Thanks a lot, man. I will take a look to see if I can find any clue
: about spring+gwt.

d**k
发帖数: 1223
14
倒不是一定要用spring mvc, 以前的project就是这个的,想着如果mvc跟gwt好整合的
话,可能会头update 旧的project会方便些

【在 o**1 的大作中提到】
: 为什么要用 spring mvc? 直接 gwt async service 就可以吧,把 spring service
: autowire 进 gwt service 里面。

m******t
发帖数: 2416
15

time
form
In GWT, you always submit an http request along with a callback, which
will be called with the response. And that's where the json string can be
processed.

【在 d**k 的大作中提到】
: 胖子, thanks a lot for all your help. I guess I need to spend some more time
: on this thing. There is one question just pop up to my head: if a GWT form
: submit to a URL, and Spring, say controller, catch the post and doing its
: data process and then forwards to a view which renders as JSON, than how
: could that form or other GWT component catch this JSON?

d**k
发帖数: 1223
16
that does make sense....thanks a lot, dude!

【在 m******t 的大作中提到】
:
: time
: form
: In GWT, you always submit an http request along with a callback, which
: will be called with the response. And that's where the json string can be
: processed.

t******h
发帖数: 120
d**k
发帖数: 1223
18
hohoho! 我还真就看到这个了。而且似乎还是work的。

【在 t******h 的大作中提到】
: http://technophiliac.wordpress.com/2008/08/24/giving-gwt-a-spring-in-its-step/
: are you looking for this?

t******h
发帖数: 120
19
我就是跟着这个做的
1 (共1页)
进入Java版参与讨论
相关主题
javascript 画多边形?j2ee现在流行什么?
找工作时Spring面试一般问题会怎么问?Spring MVC question.
Web前端的HTML+JavaScript+CSS可以理解为MVC吗?怎么把servlet publish成web services
get输出到Json大妈求建议(拜谢!)
PHP/JSP/ASP等页面语言应该被慢慢抛弃了吧? (转载)请问哪个J2EE MVC Framework最有前途
web application请教新手学习web service,有人想一起做点project吗?
入门问题:以Spring+JPA开发back end,那么表现层只能用jsp吗?asp.net现在的mvc模式,很象java当年在servlet里面的doGet(),doPost()里写html code.
一个详细有趣的JDjava学习范围 - for找工作
相关话题的讨论汇总
话题: gwt话题: spring话题: mvc话题: json话题: form