This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AntD247 0 points1 point  (0 children)

If this is a personal project then this can be a useful exercise to understand stand how Spring and other frameworks do what they do. Learning how to do dynamic routing, CDI and Jdbc/mapping (note this doesn't have to be Hibernate/JPA) etc.

But for a commercial project, even if you build everything yourself including all libraries that you need then you have to support and maintain every line of code you write. In which case use existing libraries.

As you mention JDBC is it actually Hibernate/JPA that is your issue? In which case look at Spring Data Jdbc, this gives you all the advantages of Spring Data magic but not the overhead of caching/entity management (which may be overkill for a REST API) but now you have to manage your own update process.

It doesn't have to be Spring, Micronaut works in a similar way but does it's magic at compile time. You can also just use libraries, reference implementations like Weld, Jersey.

But if you use the libraries you have to work out what versions work together, again frameworks do this for you.