Spring与JSF 2相比 [英] Spring compared to JSF 2

查看:187
本文介绍了Spring与JSF 2相比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有使用Spring,但听起来它很受欢迎。我听说它提供了另外的处理方式,例如能够使用RESTful Web服务。有没有人知道是否提供了类似于JSF 2引入的功能,或者我会将苹果与橙子进行比较?

I haven't used Spring, but it sounds like it is fairly popular. I heard that it provides alternate ways of doing things, such as being able to consume RESTful web services. Does anyone know if provides similar features as those introduced by JSF 2, or would I be comparing apples to oranges?

编辑:

感谢您提供的信息。比较Spring MVC和JSF 2,使用Spring MVC而不是JSF 2功能会有什么好处吗?

Thanks for the information. Comparing Spring MVC to JSF 2, would there be advantages of using Spring MVC instead of JSF 2 functionality?

谢谢。

推荐答案

苹果到橘子。

Spring是一个应用程序框架,它在一个堆栈中集成了依赖注入,面向方面的编程和其他几个东西。它粗略的苹果与苹果的比较将是J2EE。

Spring is an application framework that integrates dependency injection, aspect oriented programing and several other things in one stack. Its rough apples to apples comparison would be J2EE.

JSF是一种视图层技术,建立在模型视图控制器范例之上。它粗糙的橘子与橘子的比较将是Spring MVC。两者都可以使用不同的View技术(即Facelets,JSP,Velocity等),并且两者都能很好地集成到各自的堆栈中。

JSF is a view layer technology, built on the Model View Controller paradigm. Its rough oranges to oranges comparison would be Spring MVC. Both can use different View technologies (ie. Facelets, JSP, Velocity, etc.) and both integrate extremely well into their respective stacks.

- 作为回应对于新问题 -

我已经使用了相当数量的JSF2(就像任何人都可以给它年轻时一样)并且我发现它是一个非常好的框架。它修复了JSF 1.2的许多缺点,我觉得JSF 1.2也适合我。

I've used JSF2 a fair amount (as much as anyone can given its young age) and I find it to be a very good framework. It fixes a lot of the shortcomings of JSF 1.2 and I felt that JSF 1.2 was a good match for me too.

我使用了Spring MVC,但是我看了一些其他开发人员已经完成的代码。

I've not used Spring MVC much but I have looked at some code that another developer has done.

我(非常)有限的经验是,Spring MVC感觉更像是一个动作框架,而JSF感觉更像是一个组件框架。我个人认为,组件式框架是OOD的更自然的扩展,它吸引我和我编写软件的方式。

My (very) limited experience is that Spring MVC feels slightly more like an "action" framework while JSF feels more like a "component" framework. I, personnaly, think that the component-esque frameworks are a more natural extension of OOD, which appeals to me and the way I write software.

这篇关于Spring与JSF 2相比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆