Why SpringFramework?
This topic can be slightly different answer when discuss with different context.
#. Using Spring in light weighted model.
- - MVC tier + DAO + Annemic Domain Model - MVC tier + POJO and DDD style design
#. Using Spring in multi-tier architecture
- Using SpringFramework to replace EJB (session bean) model
#. Bean container provide DI, bean management, with following features:
- - AOP - Injection preprocessing (custom annotation behavior) - Bean can be singleton, prototype, and customly defined scope
- Compared with purely Session Bean model, this allow more flexible design
#. Promoting 'Design to Interface'
- - General (non-spring specific) design / engineering technique - Promote testability, loose coupling - Using Spring will promote this mentality.
#. Reduce coding
- SpringFramework provide tons of utilities class - JDBCTemplate, HibernateTemplate, JMSTemplate - Remoting support - Quartz scheduler integration - ThreadQueue implementation
#. The maturity and propularity of Spring brings additional advantages
- - Different framework, library provide Spring integration out of the box
Example: AcegiSecurity, ActiveMQ
#. Other commonly raised adv:
- - Built-in integration for Web Services / various remoting technology - Built-in integration for JMX, Portlet