上面的4句話是赤裸裸的現實。java
做爲一個開發者,一個項目我以爲應該有如下幾條準則須要確認:node
Criteria 1: You need to build something fast.git
Criteria 2: You have to learn an existing system and improve upon it.github
Criteria 3: You have to integrate with an outside service provider to pull or push data.web
Criteria 4: You are able to work with limited control over presentation.spring
Criteria 5: And you want your system to be mature and perform well.apache
如下是列舉Spring框架的好處。session
With Spring, I can build something fast. Let me give you an example.app
I am learning Cassandra for one of my projects. I spent couple hours learning how to setup Cassandra and understanding CQL.框架
I am already familiar with Spring Data for MongoDB and Oracle. Bringing Spring Data for Cassandra was as simple as pulling ‘Cassandra’ dependency Jar.
The Spring Initializer generated jar came with a unit test. I added Cassandra properties and an example I copied from the web. Voila! I am in business. Maybe I will do a video showing this next.
With Spring, I can work with an existing system and improve it.
Most of my projects involved taking an existing system and enhancing it with Spring. Spring Framework allowed me to not disrupt any existing behavior but build in parallel. I migrated to Spring in increments.
With Spring, I can integrate my application to expose to or pull from third party services.
I can give you a number of examples here.
I used to work with Axis2 and brought Spring to expose my service as SOAP.
I had an existing Spring MVC application and leveraged same service to expose as a REST resource.
Spring allows me to switch between JAX-RS Implementations.
Spring allows me to switch between databases with minimal code changes.
With Spring, I can work with any front-end technology.
I have worked with Struts, jQuery, AngularJS, Tapestry and JSF with Spring as a backbone. I worked with Handlebars, Thymeleaf, JSP, JSTL, Tiles, Free Marker, SiteMesh and Velocity templates. Speaking of AngularJS + Spring, check out jHipster.
With Spring, I get a mature framework.
This beats almost all the other criteria above. And I can say this separates Spring Framework from the rest of the offerings out there in any language.
I can bring upcoming technologies into Spring and later swap it with others if needed. Without disturbing the underlying architecture.
You could use Spring framework for web applications. You could use Spring as an MVC framework which is only one part of its offering. You could use it as a backbone for integrating all layers.
Spring provides full stack flexibility in my projects that is hard to come by in ANY language or a framework. The thriving community has a plethora of plugins to integrate with most other prominent tools.
You could take these same criteria, apply it to any language and identify winner amongst them. Remember your winner may be different than someone else’s winner for the same criteria.