This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

JVx vs. JSP/Spring/Hibernate

We found a nice article about a simple CRUD application, created with JSP/Spring/Hibernate - read more....

This example is great for a comparison with JVx, because JVx is perfect for CRUD applications.

We used our existing app JVxFirstApp as reference because it is comparable to the Spring app. Our app has some extra features like authentication and a specific security manager, but that does not change anything.
Both applications provide CRUD operations on a table called CONTACTS. A big difference is the used technology: Web (JSP) vs. Desktop (Swing), but it is no extra coding effort to start our app as Web application - with our WebUI.


Why the comparison?

A big advantage of JVx is to simplify application development specifically of database applications. We want to show the difference in complexity and compare some statistics.
Let's start with the statistics:

    JSP/Spring/
Hibernate
  JVx
Files   17   9
LoC   265   208
Config lines   74   15
JSP lines   230   -
Libraries   37   2


We used the same code formatter for both projects, therefore the Lines of code should be meaningful. The config files do not contain a lot of empty lines and the jsp files are standard html. We counted every line.

As you can see there is a big difference. Less lines of code do not automatically mean less complexity, but in this concrete example is it so. If your application has few lines of code, it is easier to understand how things work together and it is easier to maintain your application. And if you are a beginner it is better to get fast results without losing the control. That is the case if your project contains many files.

And if you are not a beginner it is important that you have the best flexibility with your framework. Both technologies allow the unrestricted use of other frameworks. But more dependencies means more problems if you plan to update to newer versions. The testing effort should not be underestimated. Fewer dependencies are an advantage!


What is your opinion?

Leave a Reply

Spam protection by WP Captcha-Free