z****n 发帖数: 1933 | 1 如果客户端完全用html+javascript。所有request都是call服务器端的web service。
这样的设计有啥问题。 和通用servlet框架,像springmvc, strut2, jsf,比有啥优劣?
现在有没有这样的网站采取这种架构? | c*********e 发帖数: 16335 | 2 ajax call的不一定是web services。ajax只是把从server-side得到的数据,inject到
client-side的某一個tag里面。
ajax可以就更新一個网页自身,然后数据也update了。jsp里面本身可以用javabean,
java code来做动态网页。比如一个网页上的读者的留言,更新就是用ajax.
劣?
【在 z****n 的大作中提到】 : 如果客户端完全用html+javascript。所有request都是call服务器端的web service。 : 这样的设计有啥问题。 和通用servlet框架,像springmvc, strut2, jsf,比有啥优劣? : 现在有没有这样的网站采取这种架构?
| c*********e 发帖数: 16335 | 3 struts沒有servlet灵活。ajax只是动态更新网页的某一個部分,而且用戶感觉不到网
页刷新。
劣?
【在 z****n 的大作中提到】 : 如果客户端完全用html+javascript。所有request都是call服务器端的web service。 : 这样的设计有啥问题。 和通用servlet框架,像springmvc, strut2, jsf,比有啥优劣? : 现在有没有这样的网站采取这种架构?
| z****n 发帖数: 1933 | 4 你没看懂我帖子。我说的是静态html+javascript,完全不用jsp
【在 c*********e 的大作中提到】 : ajax call的不一定是web services。ajax只是把从server-side得到的数据,inject到 : client-side的某一個tag里面。 : ajax可以就更新一個网页自身,然后数据也update了。jsp里面本身可以用javabean, : java code来做动态网页。比如一个网页上的读者的留言,更新就是用ajax. : : 劣?
| s******e 发帖数: 493 | 5 Yes. you should be fine by either way.
But before you choose between them, you might want to ask yourself some
questions:
1. do you need to keep states on the server side? For example http session..
. Web service by nature is stateless. You can make it stateful, but that
will imply the extra works on both client and server sides. On the other
hand, servlet/jsp automatically support states via http session.
2. Do you need to do the whole page navigation a lot? Ajax was introduced to
update a html page partially while keeping the other parts of the page to
be responsive. It might not be as easy to update the whole page as some
server side technologies. But if you use some RIA ui frameworks such as flex
, jquery ui, and ext-js, it might not be a big issue to you.
3. do you need authentication and authorization? actually this is still
somehow related to if you need states. | z****n 发帖数: 1933 | 6 谢谢回复,这个说到点子上了。
..
to
【在 s******e 的大作中提到】 : Yes. you should be fine by either way. : But before you choose between them, you might want to ask yourself some : questions: : 1. do you need to keep states on the server side? For example http session.. : . Web service by nature is stateless. You can make it stateful, but that : will imply the extra works on both client and server sides. On the other : hand, servlet/jsp automatically support states via http session. : 2. Do you need to do the whole page navigation a lot? Ajax was introduced to : update a html page partially while keeping the other parts of the page to : be responsive. It might not be as easy to update the whole page as some
|
|