Slide 1

Slide 1 text

Improve your Java applications in IntelliJ IDEA @anabneri

Slide 2

Slide 2 text

Ana Beatriz Neri Software Engineer - Itaú Bank @anabneri /in/anabeatrizdev anabneri.github.io

Slide 3

Slide 3 text

Spoilers(); Compilation Process What is JVM? JVM Architecture Memory Manager JVM inside of IntelliJ MVN Verify #VM Properties #TODO files #Refactoring #Rename Types #GIT #Tests #Maven Dependencies #Generated.. @anabneri

Slide 4

Slide 4 text

Wait… What I need to know all of this???

Slide 5

Slide 5 text

ALERT! This talk have concepts for Junior, Intermediate and Advanced Developers :p I love memes, so sometimes I put some gifs :D Make questions, enjoy and let’s have learning together

Slide 6

Slide 6 text

Compilation Process

Slide 7

Slide 7 text

C 0101010101 0101010011 0100101010 0101010101 0101010101 0100101010 0101010101 0101010011 0100101010 0101010101 0101010101 0100101010 @anabneri

Slide 8

Slide 8 text

JavaC JVM JAVA BYTECO DE @anabneri

Slide 9

Slide 9 text

What is JVM?

Slide 10

Slide 10 text

What is JVM? JVM ≠ JDK ≠ JRE JDK (Java Development Kit), and the java development kit, which is responsible for compiling .java code for bytecode @anabneri

Slide 11

Slide 11 text

What is JVM? JVM ≠ JDK ≠ JRE JRE (Java Runtime Environment), Java execution environment, in which it provides Java libraries for the JDK to compile your code and the JVM to run your program @anabneri

Slide 12

Slide 12 text

What is JVM? JVM ≠ JDK ≠ JRE JVM (Java Virtual Machine), java virtual machine responsible for executing the .byetcode file @anabneri

Slide 13

Slide 13 text

JDK Java Virtual Machine JRE Basics Libraries (Java API) Execution Engines Development Tools @anabneri

Slide 14

Slide 14 text

JVM Architecture

Slide 15

Slide 15 text

Class loader subsystem Method area Heap Java stacks PC Registers Native Method Stacks Execution engine Native Method Interface Native Methods libraries Runtime data areas Class files @anabneri

Slide 16

Slide 16 text

Memory Manager

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

EDEN SO SO1 TENURED PERMANENT New Memory (Young Generation) Survival space Old Memory Garbage Collector @anabneri

Slide 19

Slide 19 text

JVM inside of IntelliJ @anabneri

Slide 20

Slide 20 text

JVM inside of IntelliJ We can improve: .VM properties JVM options Memory Large LET’S SEE HOW EASY IT’S @anabneri

Slide 21

Slide 21 text

VM properties Configuring the VM in your development IDE is essential for your code to run in a way that doesn’t impact anything, we will see later on how everything around the JVM makes everything as responsive as possible. @anabneri When it’s necessary change?

Slide 22

Slide 22 text

MVN Verify It’s like: mvn clean & mvn install We can use in situations of build java projects, it’s not a thing it’s not a feature of intellij but it’s a form of build that can help us improve our applications @anabneri

Slide 23

Slide 23 text

Generated You can Generate: - Getters and Setters - Hash() and Equals() methods - toString() - Generate custom templates for codes @anabneri

Slide 24

Slide 24 text

TODO files IntelliJ IDEA allows you to add special types of comments highlighted in the editor, indexed and listed in the TODO tool window. @anabneri

Slide 25

Slide 25 text

TODO files TODO and FIXME in both lower and upper case. These patterns can be used inside line and block comments of any supported file type. You can modify the default patterns or add your own patterns if necessary. @anabneri

Slide 26

Slide 26 text

Refactoring Rename TODO and FIXME in both lower and upper case. These patterns can be used inside line and block comments of any supported file type. You can modify the default patterns or add your own patterns if necessary. @anabneri

Slide 27

Slide 27 text

Refactoring Rename Use the Rename refactoring to change names of symbols, files, directories, packages, modules and all the references to them throughout code. When you rename methods that are declared in interfaces, you can also review and rename their implementations as well. The refactoring changes are displayed on the Refactoring Preview tab in the Find tool window. @anabneri

Slide 28

Slide 28 text

GIT✨ You use for default, don’t need to install any plugin Selecting the src file to adding all the dependencies necessary @anabneri

Slide 29

Slide 29 text

Maven Dependencies If you create some project from zero, you can adding a dependency in: project structure > libraries > click in “+” > and type the name of some dependencies if you need to add and DONE @anabneri

Slide 30

Slide 30 text

Let’s keep in touch! @anabneri all the social medias /in/anabeatrizdev anabneri.github.io