What is an IDE? Which IDE to choose for Java development?
In the previous lessons, we talked about Java in general and about some tips that hopefully will help you in your learning process.
Now we are moving closer to coding.
To start writing Java code we need two things – JDK which stands for Java Development Kit and IDE – Integrated development environment.
JDK (Java Development Kit) is the software that is used to create and run Java applications.
We will consider it in the next lesson.
In this lesson let’s focus on IDEs.
What is an IDE (Integrated Development Environment)?
First of all, let me shortly explain what is IDE.
It is possible to write Java code in any text editor, or even in the terminal, but most programmers who work with middle or big-size projects use Integrated Development Environments or IDEs because they help to make development way more efficient and fast.
IDE is software that provides tools to programmers for software development.
Any IDE has:
- a convenient source code editor with syntax highlighting;
- tools that help to build applications from your source code;
- debugger – a tool that allows programmers to find bugs in apps.
Also, they have autocompletion functionality, they often help you to improve the formatting and quality of your code, and they may have many more functions, for example, integrations with other tools like GIT and Maven, integrations with web servers, databases, etc.
Differences between IDEs and Code editors
A few words about the differences between IDEs and code editors.
There are programs for writing code that are called “Code editors” and other programs are called Integrated Development Environments.
In short, IDEs are way more powerful than code editors.
An example of a code editor is Visual Studio Code.
- It is mainly oriented around files, not projects.
- It is lightweight and fast.
- You can install plugins to make it support many languages.
- But it has way fewer features if we compare it with IDE.
- To set up a project in a code editor you need to make more steps.
Other examples of code editors are Sublime Text or Atom on Electron.
Examples of Integrated Development Environments for Java are IntelliJ IDEA and Eclipse.
An example of an IDE from the C# world is Visual Studio, which is different from the code editor Visual Studio Code.
IDEs are oriented around projects and it is easier to assemble projects in IDE.
They consume much more resources but at the same time, they provide a lot of functionality.
Often IDE developers try to gather everything a programmer needs to develop an application with a specific technology stack. If you use a commercial version of an IDE you can do almost everything you need inside your IDE, because it has database integrations, a web client, and it supports many programming languages.
Also if you use a commercial version, you will have professional support.
Free versions of IDEs don’t have support and have fewer features, but anyway they are more powerful than code editors.
Online code editors
For the cases when you don’t have admin rights on the computer you are using and cannot install the desktop IDE or code editor, or for the situations when you want to code something simple and you have only a tablet or smartphone there are online Code editors.
Also, this is the option for those who want just to take a look at the language syntax and have limited time.
Reply.it is a good example in my opinion.
Some tips
When I just started to learn programming I tried one of the online courses that proposed to write code in forms built into their course website, because they had tests that could check your code. It was a terrible experience because I could spend a lot of time trying to understand why tests fail and after all the time spent I could find that the reason was an extra space I made or something like that. Don’t repeat my mistake – always write code in a good IDE. A decent IDE will immediately show you any typo that will save a lot of your time.
Also, I saw a course on Coursera which proposed using their custom IDE during the course. In my opinion, you should use only one of the popular IDE. I don’t see any reason to use something that is rarely used.
One caveat here – when you are more experienced in Java you may want to pass the Oracle certification exam for Java developers. In this case, you may need to practice writing code without IDE, because the exam tests your ability to recognize fast why code doesn’t work. Also, maybe writing code without IDE makes sense if you are preparing for a whiteboard coding interview.
Which desktop IDE to choose?
Now let’s consider the most popular desktop IDEs.
According to the “JVM ecosystem report 2021” published by snyk.io IntelliJ IDEA is the most popular IDE used by programmers in the JVM community. JVM community means there that not only Java developers were asked during this survey, but also programmers who use Kotlin, Scala, and other programming languages that are running in Java Virtual Machine (JVM).
72% of respondents said that they prefer IntelliJ IDEA. So it is an absolute leader.
IntelliJ IDEA was created by a company called JetBrains. It has two versions – the free edition called “Community “ and paid “Ultimate” edition.
Many beginners heard about the very popular framework in the Java world – Spring Framework. And they expect to learn it after they become comfortable with the basics of Java.
What are some people confused about – they see that Spring support is available in the Ultimate version of IntelliJ and think that they cannot write Spring applications in a free version.
Spring applications and applications written with other frameworks work just fine in the Community version of IDE, but the Ultimate version just provides more features and makes development a bit faster and more convenient. Anyway, you totally can use the Community version for almost everything, you don’t have to pay for the commercial version if you don’t want to.
I’ll use IntelliJ IDEA in this course. If you want to use any other IDE – that’s also fine. But if you use the same IDE as I use, you will learn some nice shortcuts from the course.