Book Image

Kotlin for Enterprise Applications using Java EE

By : Raghavendra Rao K
Book Image

Kotlin for Enterprise Applications using Java EE

By: Raghavendra Rao K

Overview of this book

Kotlin was developed with a view to solving programmers’ difficulties and operational challenges. This book guides you in making Kotlin and Java EE work in unison to build enterprise-grade applications. Together, they can be used to create services of any size with just a few lines of code and let you focus on the business logic. Kotlin for Enterprise Applications using Java EE begins with a brief tour of Kotlin and helps you understand what makes it a popular and reasonable choice of programming language for application development, followed by its incorporation in the Java EE platform. We will then learn how to build applications using the Java Persistence API (JPA) and Enterprise JavaBeans (EJB), as well as develop RESTful web services and MicroServices. As we work our way through the chapters, we’ll use various performance improvement and monitoring tools for your application and see how they optimize real-world applications. At each step along the way, we will see how easy it is to develop enterprise applications in Kotlin. By the end of this book, we will have learned design patterns and how to implement them using Kotlin.
Table of Contents (13 chapters)

To get the most out of this book

To run examples from this book, you will need a computer running Windows, Linux, or macOS. You will also need IntelliJ IDEA (preferably IntelliJ Ultimate edition) or Eclipse. You will need a basic knowledge of GitHub and Git to clone project samples discussed in the book.

To run examples and programs covered in the book requires Kotlin 1.3 and Java 1.6 or higher. Most of the examples will also work with the earlier version of the Kotlin. The instructions to download necessary software and tools are provided in technical requirements of the each chapter.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Kotlin-for-Enterprise-Applications-using-Java-EE. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used in the book

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "We will create a message Producer class."

A block of code is set as follows:

class Producer {
@Inject
private lateinit var initialContext: InitialContext
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

class Producer {
@Inject
private lateinit var initialContext: InitialContext
}

Any command-line input or output is written as follows:

> kotlinc -script 14c_SecondaryConstructor.kts

Bold: Indicates a new term, an important word, or words that you see on screen. For example: "The Java Messaging System (JMS) is the standard API for messaging systems."

Warnings or important notes appear like this.
Tips and tricks appear like this.