该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2010-11-25
因为可以使用SPRING的一站式解决方案
|
|
返回顶楼 | |
发表时间:2010-11-25
最近用到了一个公司基于SpringMVC封装的框架, 最大的感受就是SpringMVC对于View的支持很广泛。 比如支持Velocity View, 基于Castor的XML View等等。 StrutsMVC(至少ver1.x)好像只能支持JSP。 关于SpringMVC,springsource上有如下说法: http://forum.springsource.org/showthread.php?t=16553 1. Spring provides a very clean division between controllers, JavaBean models, and views. 2. Spring's MVC is very flexible. Unlike Struts, which forces your Action and Form objects into concrete inheritance (thus taking away your single shot at concrete inheritance in Java), Spring MVC is entirely based on interfaces. Furthermore, just about every part of the Spring MVC framework is configurable via plugging in your own interface. Of course we also provide convenience classes as an implementation option. 3. Spring, like WebWork, provides interceptors as well as controllers, making it easy to factor out behavior common to the handling of many requests. 4. Spring MVC is truly view-agnostic. You don't get pushed to use JSP if you don't want to; you can use Velocity, XLST or other view technologies. If you want to use a custom view mechanism - for example, your own templating language - you can easily implement the Spring View interface to integrate it. 5. Spring Controllers are configured via IoC like any other objects. This makes them easy to test, and beautifully integrated with other objects managed by Spring. 6. Spring MVC web tiers are typically easier to test than Struts web tiers, due to the avoidance of forced concrete inheritance and explicit dependence of controllers on the dispatcher servlet. 7. The web tier becomes a thin layer on top of a business object layer. This encourages good practice. Struts and other dedicated web frameworks leave you on your own in implementing your business objects; Spring provides an integrated framework for all tiers of your application. |
|
返回顶楼 | |
发表时间:2010-12-13
人家是不想重新发明轮子了~!不是谁该不该出现的问题~!
|
|
返回顶楼 | |
发表时间:2010-12-19
我觉得 你的面试官问你这个问题 大约想了解 你对Spring 和Struts 的理解 主要针对模式方面, 如果是我 我会跟他说 Struts 的精髓是MVC 而Spring 主要是用它的AOC 和IOC/DI 至于Spring MVC 真的很少用! 然后重点再说说Struts 的MVC 和Spring 的模式 就OK了
|
|
返回顶楼 | |
发表时间:2011-03-23
直接对面试官说,有你妈就行,还要你爸干嘛
|
|
返回顶楼 | |
发表时间:2011-04-18
问这个问题的面试官也够态度的。不过这也从侧面反正出一个人的能力。。。
|
|
返回顶楼 | |
发表时间:2011-05-25
那些技术不咋地的人,为了充胖子,就爱这样。扯一些莫名其妙的问题,要么就扯一些让你云里雾里的概念。曾经遇到过session都不懂的,还做项目经理(技术类的)
|
|
返回顶楼 | |
发表时间:2011-05-27
你直接问面试官:你是sb吗
|
|
返回顶楼 | |
发表时间:2011-05-27
最后修改:2011-05-27
没用过struts,一直在用spring mvc rest和注解确实蛮好用的。还有这个面试官,面试就怕碰到这样的面试官。
|
|
返回顶楼 | |
发表时间:2011-05-29
面试官的问题确实比较没水平……spring很爽,最成功的JEE框架
看struts就不爽 |
|
返回顶楼 | |