- Non-invasiveness: imposing minimal special requirements on application objects run within it
- Quick start up
- Lack of any special deployment steps
- Light footprint, enabling it to run in any architectural tier
- Ability to manage objects of any granularity, including fine-grained objects that cannot be modelled as EJBs.
What Spring really stands for is the non-invasiveness: the framework helped make POJO development trendy. We have Spring to thank for the new status quo in enterprise Java, where we don't have to inherit from mandatory classes, write unnecessary boilerplate or otherwise deal with much accidental complexity. Spring's idea of lightweight containers --along with Hibernate -- gave us dependency injection, AOP, declarative transactions and POJO object persistence. When we think of Spring as being lightweight, we really mean its adherence to the principles I quoted above.
There are some aspects of Spring that I find unnecessarily tedious, verbose and complex. Sometimes, I am tempted to apply the word "heavyweight" to Spring. And it is true that SpringSource has become a big company with a confusing proliferation of commercial products. But I would not deny the title of "lightweight" to the core Spring framework according to principles defined by Spring, nor would I begrudge a measure of gratitude to a programming paradigm that transformed an industry.
What specific aspects do you find tedious, verbose, and complex? Going into specific detail about them could help the community make Spring better!
ReplyDeleteThanks for writing this. I've grown very weary of hearing people say "Spring isn't lightweight anymore" by applying their own definition of lightweight that Rod never intended.
ReplyDeleteIf anything, Spring has become even lighter over the years with regard to invasiveness. Take Spring MVC for instance: At one time we had to extend Spring-specific classes to create controllers. Now Spring only invades my controllers with annotations. While some may debate that annotated POJOs aren't really POJOs, you must agree that annotations are significantly less invasive than forcing us to extend controller base classes.
spring made me learn some best practices, which i apply to projects where i do not use spring (like programming to interfaces) etc..
ReplyDeletecomplexity depends on how much u use. or u think u must master to feel reasonably comfortable.. it industry is becoming more heavy weight by that yardstick..
spring is also heavy weight in that sense.. but then again it depends on what u think u need for the job. u cannot learn and know everything..
for ex. i use hibernate support in sporing.. never used spring jdbc.. but i need not know until i need...so that does not make spring heavy...it all depends on what u think is important to learn.
Chris
ReplyDeleteI came up with a set of criteria in a blog entry last year: see http://impalablog.blogspot.com/2008/05/what-makes-technology-lightweight.html
On the basis of this, I'd regard core of Spring as lightweight, although some of the technologies being promoted by SpringSource somewhat less so.
Phil
http://impalablog.blogspot.com/