We’ve had tremendously positive feedback on my recent article that talked about the awesomeness of SQL. However, not everyone agreed to the Fallacy #5: The database is the wrong place for business logic. Why is this such a controversial topic? In what situations is the database the right place, and in what situations isn’t it the right place for such logic?
I’ve been testing a ton of frameworks lately – good and otherwise. One of them, the Java micro framework Spark, really amazed me with its simplicity and rapid development capabilities. In this article, we’ll examine an example of Spark’s usefulness by creating a REST API. So, without further ado, let’s see how to store, retrieve, update and delete some information in a PostgreSQL database using jOOQ ORM over a RESTful API in a simple To-do app.
The following fallacies are things that I hear all the time: “SQL is legacy. Why can’t we work with more modern tech?”, or “SQL is low level, like assembler. Would you prefer to work with assembler or with Java? Similarly, would you prefer to work with SQL or with Hibernate?” It’s time we move on and realize that with SQL, we can be incredibly productive and write awesome data logic in only a few lines of code.
jOOQ provides an easy way to automate the process of generating the java classes that represent database tables, records, etc. via the jooq-codegen-maven plugin. This time we let Maven worry about downloading the required JAR files and generating Java code that lets you build typesafe SQL queries through jOOQ’s fluent API.
It often happens that if something is loved, it is also hated with the same power. The idea of object relational mapping fits into this concept perfectly. You will definitely come across many opposite points and fierce discussions as well as unwavering advocates and haters. So if you have ever asked whether to use ORM or not, the answer “it depends” will not be enough.
jOOQ and Vertabelo perfectly complement each other in the application development. With Vertabelo you can easily design a database structure what saves you from writing DDL code manually, while jOOQ handles generation of Java classes corresponding to database tables, and allows to construct SQL queries through its fluent API.
Before writing this article, I talked to a group of software engineers who use Hibernate on a daily basis in their work. Some of them work for small companies (up to 20 developers on site) while others are employed in corporations known world-wide that employ over 100,000 IT professionals. This gave me an insight into how development with Hibernate is organized in different companies.
One of the exciting moments in a programmer’s life is to leave legacy code behind and have fun with some new, fresh and cool tools. Today I have just such an opportunity – I’m creating the structure of a new project in Java.
Some time ago I announced that the integration of Vertabelo and jOOQ was coming soon. While we’re waiting for an official (stable) jOOQ release to support this integration, I’d like to present you with some of the details about how to use this new feature.
We’ve got good news for Java developers talking to databases. We’re in the home stretch for delivering built-in support for Vertabelo XML format in jOOQ. And that’s not all. You won't even have to download the XML manually – jOOQ will take care of it for you!