Home 文章 Spring RodJohnson对Spring的定义和定位

feedsky
抓虾
google reader
my yahoo
Rod Johnson对Spring的定义和定位 E-mail
User Rating: / 0
PoorBest 
作者是 Administrator   
2008-03-07 07:18:03

What is Spring, and what's its positioning? 

Rod Johnson :
It is very difficult to come up with a snappy catch phrase for Spring, partly because Spring isn't about the Spring architecture or the Spring developers; Spring is about you, if you are a Spring user. Spring is a framework that aims to make doing what you want to do, easier to do. I know that sounds like 'Spring is the answer to all problems', and obviously, Spring is not the answer to all problems, but if you look at a lot of the things a typical J2EE developer needs to do to deliver real, working applications, Spring actually makes those things easy to do. 

For example, if you need to access EJBs, Spring takes away all the pain of using JNDI. If you need to use JDBC, Spring takes away the 'try', 'catch', 'finally' blocks; Spring takes away the vendor-specific handling of exception error code. 

The core of Spring is the Inversion of Control container and we consistently apply Inversion of Control and dependency injection throughout the framework itself. We aim, above everything else, to make Spring a non-invasive framework. Spring provides you with the ability to structure your objects as POJOs; your business objects will be POJOs. Ideally, they will not depend on Spring, or any other container APIs. Spring aims not only that you don't need to depend on J2EE APIs like JNDI or JTA, but you don't need to depend on Spring APIs, and that's where you get this synergy between Inversion of Control and AOP, where your code doesn't need to use Spring APIs, but it can benefit from Inversion of Control through dependency injection and can benefit from declarative services such as declarative transaction management. 


最近更新 ( 2008-03-07 07:18:03 )
 
Java家,