THE ART OF #FRAMEWORKLESS
IN THE BACKEND
Matteo Vaccari
@xpmatteo
Frameworks?
Risk
Functionality
Performance
Obsolescence
Incompatibilities
Developer
Experience
App startup time
Test running timeThe bad
The good
Learning
Standardisation
Bad habits
DB-Centric
Quick project startup
Extra work
Upgrades
Searching on
Stackoverflow
for answers
Addiction
Creating a new game
First guess: the letter “e”
Second guess: the letter “t”
Etc, etc…
Spring/JPA
(Spring
MVC)
Controller
Embedded
Tomcat
Spring
MVC
Servlet
(Spring)
Application
Service
(JPA)
Repository
Emtity
Manager DB
Our router
Embedded
Jetty
Our Servlet
Our
Application
Service
Our
Repository
JDBC DB
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Spring/JPA
No Spring/No JPA
(Spring
MVC)
Controller
Embedded
Tomcat
Spring
MVC
Servlet
(Spring)
Application
Service
(JPA)
Repository
Emtity
Manager DB
Our router
Embedded
Jetty
Our Servlet
Our
Application
Service
Our
Repository
JDBC DB
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
Domain
Objects
HttpServletRequest
HttpServletResponse
HttpServletRequest
HttpServletResponse
WebRequest
WebResponse
HttpServletRequest
HttpServletResponse
WebRequest
WebResponse
GameResponse
x
HttpStatus
GuessRequest
Main
The “Main Partition”
The Router
The Router, part II
The Application Service
The Domain Objects
The Application Service
The Game Repository
The Web Request
The Guess Request
Spring/JPA Spring/— —/—
Server startup
time
~6s ~3s 0.4s
Time to run all
tests
10s 5.5s 3.5s
Time to run
slowest test
7s 4-5s 1s
# of tests 25 24 48
SLOC prod 360 424 643
SLOC test 358 357 745
jar size 30MB 17MB 6.3MB
Frameworks?
Risk
Functionality
Performance
Obsolescence
Incompatibilities
Developer
Experience
App startup time
Test running timeThe bad
The good
Learning
Standardisation
Bad habits
DB-Centric
Quick project startup
Extra work
Upgrades
Searching on
Stackoverflow
for answers
Addiction
References
https://github.com/xpmatteo/frameworkless-hangman
https://github.com/frameworkless-movement/manifesto
38
twitter.com/xpmatteo
thoughtworks.com
THANK YOU
WE ARE HIRING!
YES, IN ITALY!
How do we save a “guess”?
The Web Response

Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018