DEV Community

Discussion on: Framework-less REST API in Java

Collapse
 
c62eu19 profile image
Stan Zajdel

You can simplify this even further by simply using a servlet which handles much of what you have coded in your example.

Collapse
 
piczmar_0 profile image
Marcin Piczkowski

Probably, but I would not like to develop my own servlet container from scratch when we have plenty of them already. I would use Tomcat or Jetty or other if I went this route. The purpose was to make sth simple from ground up, but the experiment shows it's not that simple after all when the API grows, cause eventually we would come up with reinventing a wheel. My feelings, weather to use it in real app, or stick to well known frameworks like Spring are mixed. Still, I think it's good to know underlying techniques that the frameworks base on.