Spring 3.0 与 Java EE 6.0 [英] Spring 3.0 vs Java EE 6.0

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

问题描述

我遇到了一个情况...

I'm confronted with a situation...

我被要求就 Spring 3.0 和 Java EE 6.0 之间的 Java EE 开发提供关于采用哪种方法的建议.我曾经是,现在仍然是 Spring 2.5 对经典 Java EE 5 开发的推动者,特别是 JBoss,我什至将旧应用程序迁移到 Spring 并影响了此处开发策略的重新定义以包含 Spring 特定的 API,并帮助制定战略计划以促进更轻量级的解决方案,例如 Spring + Tomcat,而不是较重的 JBoss,现在,我们仅将 JBoss 用作 Web 容器,具有我所说的容器内的容器悖论",也就是说,Spring 应用程序及其大部分 API 都在 JBoss 中运行,因此我们正在迁移到 tomcat.

I've been asked to give an advise regarding which approach to take, in terms of Java EE development between Spring 3.0 and Java EE 6.0. I was, and still am, a promoter of Spring 2.5 over classic Java EE 5 development, specially with JBoss, I even migrated old apps to Spring and influenced the re-definition of the development policy here to include Spring specific APIs, and helped the development of a strategic plan to foster more lightweight solutions like Spring + Tomcat, instead of the heavier ones of JBoss, right now, we're using JBoss merely as a Web container, having what I call the "container inside the container paradox", that is, having Spring apps, with most of its APIs, running inside JBoss, So we're in the process of migrating to tomcat.

然而,随着Java EE 6.0的到来,很多让Spring在当时很有吸引力的特性,容易部署,少耦合,甚至是某种DI等,似乎都被模仿了,以一种或另一种方式.JSF 2.0、JPA 2.0、WebBeans、WebProfiles 等.

However, with the coming of Java EE 6.0 many features, that made Spring attractive at that time, easy deployment, less-coupling, even some sort of D.I, etc, seems to have been mimicked, in one way or the other. JSF 2.0, JPA 2.0, WebBeans, WebProfiles, etc.

所以,问题是......

So, the question goes...

在您看来,鉴于 Java EE 6.0 提供的新视角,继续投资于非标准 Java EE 开发框架(如 Spring)的安全性和逻辑性如何?

From your point of view, how safe, and logical, it is to continue to invest in a non-standard Java EE development framework like Spring given the new perspectives offered by Java EE 6.0?

我们能否再讨论 3 或 4 年的 Spring 开发,或者您是否建议尽早采用 Java EE 6.0 API 及其实践?

Can we talk about maybe 3 or 4 more years of Spring development, or do you recommend early adoption of Java EE 6.0 APIs and its practices?

我将不胜感激.

推荐答案

恕我直言,关键不是功能之一.在这方面,Spring 将永远领先于 JavaEE,因为它对 OpenSource VS 来说是很自然的.一个标准.所以一个事实是,您在 Spring 中获得新功能比在 JavaEE 中更早(例如,容器集成测试是 JavaEE 6 中的一项新功能,并且在 Spring 中已存在多年).

The crucial point IMHO is not the one of features. In that regard, Spring will always be ahead of JavaEE as it's natural for OpenSource VS. a Standard. So one fact is, that you get the new features much earlier with Spring that with JavaEE (e.g. container integration testing is a new feature in JavaEE 6 and has been available in Spring for ages).

恕我直言,最重要的一点是管理和开发的生命周期之一.当您选择 JavaEE 时,您将您的编程模型与您的基础设施联系起来.通常应用服务器供应商并不是采用新标准版本最快的(怪 WebSphere、JBoss,你有什么).所以这意味着我们可能不会在年底之前看到大型供应商的 JavaEE 6 支持产品.

The most important point IMHO is the one of lifecycles for administration and development. When you choose JavaEE, you tie your programming model to your infrastructure. Usually app server vendors are not the fastest adopting new standard's versions (blame WebSphere, JBoss, what have you). So this means we probably won't see production ready, JavaEE 6 supporting products by the big vendors before end of the year.

即使是这种情况,您仍然需要克服管理、IT 部门和预算控制经理的障碍,才愿意升级到这个闪亮的新版本.从这方面来看,JavaEE 6 甚至不是许多商店的选择.您可以选择将您的应用程序部署到什么位置?您想选择 Glassfish 进行生产吗?来吧,试试.大多数商店都没有这种舒适"的情况.

Even if that is the case then you still have to take the hurdle of your administration, IT department and budget controlling managers to be willing to upgrade to this shiny new version. Coming from this side, JavaEE 6 is not even an option to many shops. You can choose what ever you like to deploy your apps to? You wanna choose Glassfish for production? Go ahead, try. Most shops aren't in such a "comfortable" situation.

恰恰相反:春天.将编程模型与基础设施分离.使用当前的 3.0.x 并在您的 Tomcat 或遗留应用程序服务器中使用 @Inject、JPA 2 等.

Exactly contrary: Spring. Decoupled programming model from infrastructure. Go take current 3.0.x and use @Inject, JPA 2 and the like in your Tomcat or legacy application server.

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

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