Spring boobs03 Oct 2016
Six years ago I developed an enterprise project with Spring framework.
We believed that Spring is a bloody enterprise.
We wanted to get rid of this boilerplate.
We were young and courage, we wanted changes.
And it began!
At year 2010 I got to Codeborne company where we got a freedom to use whatever tools we wanted.
I wanted a lot of very different tools.
Meanwhile I developed projects with:
- Struts2 (Java),
- Play 1 framework (Java),
- Ruby (Sinatra),
- Scala (Scalatra),
- Python (Tornado framework),
- and even PHP!
And what now?
* slow compilation Scala;
* Groovy scripts that are not supported well by any IDE;
* dynamic Python that fails with any upgrade;
* annoying keyword
self. that you must write in Python before every method call;
* Ruby that can be broken by single random comment line in single random dependency;
* endless night debugging sessions with unbelievably crazy Play framework bugs,
I started to look for something stable.
Something that I could rely on.
Something that simply works.
I decided to try Spring framework once again.
I decided to give it a chance.
And I found that
- it contains no more boilerplate than Struts2 framework.
- it can reload classes on the fly much better than Play framework.
- it can log, save, and load data out of the box. With no bugs. With no issues. With no unexpected behaviour. With no black magic.
- it almost doesn’t allow you to write spaghetti code because built-in architecture forces you to write good code: all these services, repositories, ideally implemented dependency injection - it’s just impossible to make it bad.
- it does everything to allow you easily write automated tests.
- Both unit-tests and integration. With just one command - runs database, tests your select and dies.
- And even UI tests. With just one command - runs application with database, opens a browsers, clicks the buttons and dies.
- and finally, it does not need any XML.
Does anybody still remember what we didn’t love Spring six years ago?
Maybe I am just getting old, but now I am ready to say that Spring is the best framework in the world. Better than anything that was created after it.