与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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值