Spring MVC vs raw servlets and template engine?

Posted by Gigatron on Programmers See other posts from Programmers or by Gigatron
Published on 2012-06-30T18:59:18Z Indexed on 2012/06/30 21:24 UTC
Read the original article Hit count: 367

Filed under:
|
|

I've read numerous articles about the Spring MVC framework, and I still can't see the benefits of using it. It looks like writing even a simple application with it requires creating a big hodgepodge of XML files and annotations and other reams of code to conform to what the framework wants, a whole bunch of moving parts to accomplish a simple single task.

Any time I look at a Spring example, I can see how I can write something with the same functionality using a simple servlet and template engine (e.g. FreeMarker, StringTemplate), in half the lines of code and little or no XML files and other artifacts. Just grab the data from the session and request, call the application domain objects if necessary, pass the results to the template engine to generate the resulting web page, done.

What am I missing? Can you describe even one example of something that is actually made simpler with Spring than using a combination of raw servlets with a template engine? Or is Spring MVC just one of those overly complicated things that people use only because their boss tells them to use it?

© Programmers or respective owner

Related posts about frameworks

Related posts about spring