Web App Jump Start Comparison: Setup and Start

Written By: Steve Zagieboylo, Senior Architect at Calavista


 

This is the second in the author’s blog series comparing two “jump start” tools for making Java-based Web Apps:

 

To the amusement of my colleagues at Calavista, I am constantly saying how much I hate computers. I don’t, of course, but what I hate are how hard they are to do anything you haven’t done before. Lots of tools have an overly-complicated setup process, and there’s no reason for it other than the creator of the tool not paying enough attention to the new user getting started. I’ve abandoned more than one tool because a couple hours in, I still can’t get it working. I always figure that if their setup is so filled with bugs, then the product probably is, too, so I don’t feel any loss in giving up so easily.

Caveat: I have already used JHipster for several projects for different Calavista customers. So my setup and start was not exactly virgin, but I am presenting here as if I were. In fact, I had more troubles with this because I had more troubles with this because I had an older version already on my old system and I failed to uninstall it properly in my first try.

 

Overall Winner! It’s a tie.

It is hard really to compare them. Cuba was simpler to get started, and it serves a very different purpose. It is intended for ongoing development rather than just getting started, but it offers fewer options for the final architecture. What it offers is great, if that’s pretty much what you want. JHipster, on the other hand, is primarily a one-time tool with which you create your application and then you’re on your own. It is incredibly powerful in what it creates, but all that power makes it a lot harder to get started, simply because there are so many choices you have to make.

 

Step One: Install– Winner! Cuba Framework

Cuba Framework: If you already use IntelliJ, then the Cuba install couldn’t be easier– just point at a plug-in and go. Their older product had a separate IDE, which you used for everything except the Java editing, but now it is all integrated into the one plug-in. You create a new project with File/ New/ Project, as you would expect, answer a few questions, and you’re ready to run. If you don’t already have IntelliJ, then they have another option which I believe includes a free version of a scaled-down IntelliJ, but I haven’t tried it.

JHipster: This is also quite easy, but not quite as simple as just adding a plug-in. They have a very clear ‘Getting started’ page with instructions to install Node.js and npm, and then to use them to install JHipster. This is where I ran into trouble, because I had forgotten that I had installed the old one with yarn, and my system was finding that one rather than the newer version, but that’s on me. Once I got it straightened out, it all worked fine.

 

Step Two: Create and Run your Application — Winner for ease of use, Cuba Framework. Winner for power, JHipster.

The next step was to create and to run the generated application. In both cases, I had it use the PostgreSQL database that I had already running. JHipster also has an option to use an embedded H2 database for development, which would have gotten around the next hurdle, but I had it using PostgreSQL for both development and deployment.

A not very artificial hurdle: Just to see how well they handled the misstep, I did not create the database user or schema that it was set up to use. (I remembered that I had made this mistake when I first tried out JHipster, a few years ago.)

Cuba Framework: This could not have been easier. The menu has acquired a new top level choice ‘CUBA’ (which I confirmed is only shown in an actual Cuba project, not in any of my other projects). On the menu is ‘Start Application Server’ which I selected. When it couldn’t log in to the database, it told me clearly that the database wasn’t available. Once I fixed that problem, it ran perfectly, giving me a link in the Console window to launch my browser pointing at the UI.

JHipster: This had a few hiccups, some of which are related to the additional power that is available. First, rather than just a new project in my IDE, it has a command line interface that walks me through a dozen choices (many of the same choices in Cuba’s New Project dialog, such as root package name, database provider, etc.). There was a dizzying array of selections, but most had defaults that I know are good choices. These are a few of the options for which Cuba gave its one choice.

Web App Jumpstart Setup & Start Comparison Table

Spoiler Alert: Cuba wins for power in other arenas, specifically the implementation of the data model. If the UI Framework is not a deal breaker, the greatly expanded set of choices for Model implementations might cause the power-hungry to swing back. See future blogs in this series.

Once I had gotten through the application generation, npm reported some vulnerabilities, some of which were not trivially fixed. This is a little concerning.

Vulnerabilities Web App Code

After generation is complete, it finishes with instructions how to launch the server. I was able to point IntelliJ to the pom file and I was also able to launch the Spring Boot Application from there, but it was less obvious how to do it. (Since I already knew how, I’m not sure how much less obvious it was.)

Web App Server Application Generated Successfully Code

JHipster did not do well, however, on the missing database test. It seemed to be running and I was able to bring up the UI, but then it gave a somewhat confusing error message, saying that authentication failed. It was actually referring to the server’s authentication with the database, but that wasn’t clear. At first I thought that I had just forgotten the admin password.

 

Application Comparison

Both tools create an impressive application, with a ton of functionality already working (such as User and Role management, Swagger UI, CRUD UI of all the data, and lots more). However, that is the subject of the next blog in this series.

Share on Facebook
Share on Twitter
Share on LinkedIn