As a developer, I get to work on various projects, and therefore accumulate different tools. I now face a problem: I have many versions of the same tool installed on my computer. For instance, I have two versions of PostgreSQL. When I switch projects, I need to deactivate one version and activate the other. I lose precious time doing that, and I am never sure I have uninstalled everything correctly if I decide to delete one of them.
Using a containerized database solves my problem: it is easy to install and use, and I am certain I have correctly deleted…
Docker is super useful for the development environment for primary 3 reasons :
If you have correctly dockerized your app and it runs without problems on your machine, 99% of the time, it will run smoothly anywhere: on your friend’s device, on the staging environment, and also on production too.
Years ago, before Docker, when a new team member joins, he spent more than a day setting up the machine with the right OS, set up the language, add a database on top of it. 2 or 3 days are wasted on just getting the environment set up correctly.
It’s well known That developers want to optimize and simplify repetitive tasks. We like to make shortcuts, type fewer characters to run this or that command. With this aim in mind, I suggest some git aliases.
The default display of the log is complicated, difficult to use.
$ git log
Security isn’t an afterthought. It has to be an integral part of any development project and also for REST APIs. HTTPS has become a norm as a part of securing applications. Therefore, we’re going to understand HTTPS before enabling HTTPS in a Spring Boot application.
HTTPS ensures there is a level of security involved in communication between two parties. In contrast, HTTP is insecure, and an attacker of type “man-in-the-middle” can breach the security.
Since Java 8 is released, we can have another view on the legacy Plain Ordinary Java Objects (or short “POJO”) and work with them in a completely new way. Happy Reading!
Consider the following simple class that models a City:
we can easily create cities like this:
This is all old school, but what is really a getter and a setter in a Java 8 functional context?
How can you model different constructors in Java 8?
A getter is something that can take a POJO and convert it into something else.
This corresponds to a Java 8 Function…
Since his creation, Spring Boot has caused a sensation in the industry.
Today, more and more companies are choosing to adopt Spring Boot framework in their projects. So Spring Boot has become one of the unavoidable questions that must be asked during the interview.
Q1: What is the difference between Spring and Spring Boot?
The Spring Framework provides several features that make web application development easier. These features include dependency injection, data binding, aspect-oriented programming, data access, and more.
As the Spring community grew, Spring slowly became more complex and no longer as lightweight as it began to…
A few of the most important features for consuming an API are:
Moving to Java 8 adopt the new approach pretty easily, and the resulting code tends to be shorter and easier to follow unless you have to deal with exceptions in a stream.
Let’s consider the case of John, who was a developer. He’s been told by his boss that the customer wants to migrate this code to Java 8 :
John is thinking: Ah, I get it now I can change the for-loop by a stream, and I catch the exception. So easy!
This works but makes the code harder to read and understand.
Ideally, you would like…