作者: 阿水 時間: 2008-11-8 18:20 標題: struts v1 vs struts v2
what is their major difference and which one is easier to get started
作者: thinkpanda 時間: 2008-11-8 20:41
Struts is a controller oriented framework, that singletons of actions are defined to handle HTTP request. Each of the actons accepts the request from parameter of "execute" method, process it and generate HTTP response.
On the other hand, Struts 2 is an action oriented framework. Processing logic is handled by per-request "action" objects. Controller is not explicitly defined.
For new web developer controller oriented approach is more easy to understand, and it work well for fairly complicated system. Other hand, action oriented framework make application code nearer to the application object model, which is good from analysis point of view.
作者: 阿水 時間: 2008-11-10 09:49
原帖由 thinkpanda 於 2008-11-8 08:41 PM 發表
Struts is a controller oriented framework, that singletons of actions are defined to handle HTTP request. Each of the actons accepts the request from parameter of "execute" method, process it and ge ...
是否代表 struts2 有些page 可以直情唔洗用 action (controller, e.g. the lanuage selection page)
struts 1 可否簡易地做地同樣的野
作者: thinkpanda 時間: 2008-11-10 10:23
原帖由 阿水 於 2008-11-10 09:49 發表
是否代表 struts2 有些page 可以直情唔洗用 action (controller, e.g. the lanuage selection page)
struts 1 可否簡易地做地同樣的野
languge selection 建議用filter 做, 重來唔應該去到controller/action 層次.
(assume 你真係做哂正確既internationalization)
作者: 阿水 時間: 2008-11-10 14:53
原帖由 thinkpanda 於 2008-11-10 10:23 AM 發表
languge selection 建議用filter 做, 重來唔應該去到controller/action 層次.
(assume 你真係做哂正確既internationalization)
其實wap 的header 同 http header 有甚麼分別
i just mean an example (that something so easy to understand)
點都同就算自動入面要選個機會user 選
香港有些地方名稱的中英差好遠
除此之後重有無其他大的分別
作者: thinkpanda 時間: 2008-11-10 15:16
原帖由 阿水 於 2008-11-10 14:53 發表
其實wap 的header 同 http header 有甚麼分別
i just mean an example (that something so easy to understand)
點都同就算自動入面要選個機會user 選
香港有些地方名稱的中英差好遠![]()
除此之後重有無其他大的分別![]()
係web server 層次, 你可以當佢地一樣.
但WAP 2.0 device 會有D額外既header 指示ua-profile 既URL, 或者有D電話台係某D特定情況用header send 埋個user 既電話號碼俾你.
作者: 阿水 時間: 2008-11-10 15:29
原帖由 thinkpanda 於 2008-11-10 03:16 PM 發表
係web server 層次, 你可以當佢地一樣.
但WAP 2.0 device 會有D額外既header 指示ua-profile 既URL, 或者有D電話台係某D特定情況用header send 埋個user 既電話號碼俾你.
除此之後struts v1 同 v2 重有無其他分1別
作者: thinkpanda 時間: 2008-11-10 16:19
我無用開struts 2 , 講唔到更detail 啦...
Struts 1 都係幾年前既事.而家主要用Spring MVC
作者: 阿水 時間: 2008-11-10 23:49
原帖由 thinkpanda 於 2008-11-10 04:19 PM 發表
我無用開struts 2 , 講唔到更detail 啦...
Struts 1 都係幾年前既事.而家主要用Spring MVC
spring vs structs which one is easier to get on (and they are their major difficult, so for these kind of stupid question, but so many to choose)
作者: thinkpanda 時間: 2008-11-11 01:14
原帖由 阿水 於 2008-11-10 23:49 發表
spring vs structs which one is easier to get on (and they are their major difficult, so for these kind of stupid question, but so many to choose)![]()
單以Web framework 黎講, Spring 係簡單D, 但係要用Spring 唔會單用MVC, 要起步既learning curve 係大D.
作者: 阿水 時間: 2008-11-11 09:41
原帖由 thinkpanda 於 2008-11-11 01:14 AM 發表
單以Web framework 黎講, Spring 係簡單D, 但係要用Spring 唔會單用MVC, 要起步既learning curve 係大D.
OK, so I better start with struct

