我是靠谱客的博主 羞涩小甜瓜,最近开发中收集的这篇文章主要介绍与JEE6/EJB3.1相比, Spring framework 丧失了几乎所有的优势,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

The Spring framework was a major competitor against the ejb technologies. But with EJB3.0/3.1 picked up all the good things, such as Dependecy Injection, Configuration Over Convention etc, Spring no longer has any advantages at all. Over the years, Spring has become over engineered and hard to use. 

 

For web applications, with JSF2.0, a backing bean would be easily injected with the @ManagedBean annotation. An EJB is a POJO, you can easily inject an EJB into your managed bean by annotation @EJB. You can easily inject your datasource with @Resource, You can easily inject a JPA persistence context with @PersistenceContext. You don't want to configure everything as a "bean" in all sorts of xml files in order to "inject" an object. This would dramatically ease the learning curve regarding web developemnt with JEE6. It proves SpringMVC to be redundant.

 

You don't need to programme with the JavaScript libraries directly, it's hard to maintain once the guy leaves the team.  Primefaces provides plenty of UI widgets for use and it hide the raw JavaScript from developers. As a result, your JSF pages are pretty simple and clean, thus easy to understand and maintain.

 

Why not adopt a JEE application server, such as JBoss and/or Glassfish? If you need transaction service, the application server provides it for you by default, an ejb method is transactional by default. You don't need to do anything, except write your busincess code. If you need messaging service, the application server provides it for you but default. If you need sheduling service, the application server provides it for your by default... This can go on and on, why just stick to a servlet container like Tomcat and then depends on Spring to put everything together manually? 

 

JDBC or JPA is straightfoward and there's no need to introduce extra API on top of it.

 

Flixibility is a lie, testable component is cheating, test driven developemnt is a joke.

Configuration is not programming, Java developement should use the Java prorgamming language, not xml.  

Face the reality, Sping has completed its mission and it will gradually become legacy technology.

 

Probably one could write a book like "JEE developement without Spring". Spring has contributed lots to the Java community. However, it also split the Java community. Java developers live a much harder life compared to .net developers. I personally hope that the Java community would simplify the platforms and tools and head to the same direction, so that Java developers would live a better life.

最后

以上就是羞涩小甜瓜为你收集整理的与JEE6/EJB3.1相比, Spring framework 丧失了几乎所有的优势的全部内容,希望文章能够帮你解决与JEE6/EJB3.1相比, Spring framework 丧失了几乎所有的优势所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部