Learn from Java Champion Matt Raible: JHipster to the rescue

Learn from Java Champion Matt Raible: JHipster to the rescue

March 29, 2021

Matt Raible, dreamix, java, java dailyIn our special Java Daily edition, we would like to introduce you to Matt Raible. He is an Open Source Developer at Okta. There is his short intro: “My name is Matt Raible and I’m a hick from the sticks. I grew up in the backwoods of Montana with no electricity and no running water. I had to walk two miles to the bus stop every day, and it felt like it was uphill both ways. In the winter, we cross-country skied. I live in Denver, Colorado with my beautiful wife, Trish, and our two awesome kids, Abbie and Jack. We have a small petting zoo of cats and dogs. Trish and I are obsessed with the outdoors, skiing, whitewater rafting, and classic VWs.”

Java Daily: How the pandemic situation reflected on you as a speaker for different conferences? Do you think even after the pandemic, the online conferences will continue to be an increasing trend? 

Matt Raible: I was planning on pausing my travel from July 2020 to July 2021 to be home more for my daughter’s last year of high school. The pandemic caused me to start my travel pause earlier. Many conferences went virtual, so I ended up speaking more in the last year than expected. I was still planning to speak, but mostly locally. The pandemic accelerated my home office video setup, but I was already planning on having a nice setup because I record a lot of YouTube videos.

Before the pandemic, conferences, in general, were increasing a lot. I believe this is because people realized it could be a money-making venture and because so many people were doing it successfully. Virtual conferences are likely easier to set up, but I don’t think they make any money, especially since most of them are free for attendees. I think some virtual conferences will continue, but the majority will return to in-person.

Java Daily: Recommend favourite book(s).

Matt Raible: The books that had the biggest impact on my career are:

In the last 10 years, I’ve enjoyed The Well Grounded Java Developerng-book for Angular and Secure by Design. But one of my favorite non-tech books is Zen and the Art of Motorcycle Maintenance.

Java Daily: As an active Java user how do you feel about Kotlin? What are the criteria to choose it over Java?

Matt Raible: I think Kotlin is great and try to use it often in the blog posts I write. I think it makes a lot of sense for Android developers since Android doesn’t support Java 9 or above. For others, I think it’s worth learning it because it’s always nice to learn new technologies. However, if you don’t use it at work, it can be hard to maintain a level of expertise. Choose it over Java if you can get your whole team or company to buy-in. 

Java Daily: We have watched your really cool videos that show the usage of JHipster as a development platform to generate, develop, and deploy Spring Boot + Angular applications. How easy is it to extend these templates and customize them to build your own? For example, a company level blueprints that can be used when starting new projects.

Matt Raible: There are two ways you can extend JHipster itself. You can develop a module that modifies a JHipster project after it’s been generated. This works through a concept called “needles.” Needles are comments in the code that you can replace with your custom code or dependencies. You can also add and remove files from a project. The second technique is blueprints. Blueprints allow you to replace things in JHipster when the app is generated. For example, you can replace Spring Boot with Micronaut or Quarkus. You can also replace Angular with Svelte.

As a project, we’ve had a lot of contributions and I think that’s largely because the generator itself is not too complex. It’s written in JavaScript and uses EJS for its templates.

A company could create their own blueprint for starting new projects, but they might want to just contribute to JHipster core to add the functionality they desire. They can also become a sponsor and influence features and bug fixes through bug bounties.

Java Daily: One challenge when using JHipster can be the complexity of the configuration, that happens automatically and you might not understand all of it initially. Is this an issue?

Matt Raible: Yes, it certainly can be. I started a similar project to JHipster called AppFuse in 2002. It’s a big claim to fame, at the time, was integrating Struts and Hibernate. A year later we added Spring. I always recommended people know Struts, Hibernate, and Spring when using AppFuse so they could diagnose when errors happened. JHipster is very similar. It can help you get started with a plethora of technologies, but if you don’t know how the underlying frameworks work, you can get yourself into a pickle when errors start to happen in production.

I do feel one of the big values of JHipster is as a learning tool. You might not use it on projects, but you can generate projects with it, using the combinations you’d like to see working together. Then, copy that code into your own project. Also, JHipster has really good test coverages so you can copy the tests too!

Java Daily: Can you think of other challenges with using JHipster?

Matt Raible: As a committer to JHipster, it can be difficult to keep it up-to-date. I think this is a challenge for anyone using lots of open source software, especially when some projects do releases every few weeks or months.

If you generate a new JHipster app today, there will be a new version of Spring Boot (v2.5) in a month and you’ll likely be motivated to update because of performance improvements and security fixes. That’s not always easy, as we recently discovered with Spring Boot 2.4. Upgrading wasn’t too difficult, but we found issues with other libraries (e.g. Spring Data Couchbase) that we weren’t able to upgrade.

We use continuous integration extensively to test all the various combinations that JHipster can create.

Java Daily: Which scenarios are not suitable for using JHipster, when starting a new project?

Matt Raible: I write a lot of posts about integrating technologies X and Y, where X is a JS framework like React and Y is a backend framework like Micronaut. These posts tend to be a lot more popular than my JHipster ones. I believe this is because people are often trying to integrate X or Y into their existing codebase, rather than creating a new greenfield application. I’ve found that in large companies, they don’t create a lot of new applications. They’re mostly enhancing and maintaining existing ones.

This doesn’t really answer your question. That’s because you should always consider JHipster when starting a new project. :)

Is there anything else you would like to ask Matt Raible? What is your opinion on the questions asked? Who would you like to see featured next? Let’s give back to the Java community together!

Dreamix Team

Entrepreneurs at heart. Java and Oracle developers by passion. We are Dreamix Team

More Posts - Website

Follow Me:
TwitterFacebookLinkedInPinterestGoogle Plus

Do you want more great blogs like this?

Subscribe for Dreamix Blog now!