官术网_书友最值得收藏!

Chapter 2. Code Integration

Being able to make Java and Scala cooperate on the same code base is a prerequisite to guarantee a smooth transition between the two languages.

In this chapter, we are going to quickly create a small Java web application in which we will show you how to add Scala code to it. Then, we will cover some of the most common integration points between Java and Scala and how programming styles differ so that programmers who want to refactor and extend their Java application can do it according to some guidelines.

To avoid spending too much time on creating, understanding, and documenting a sample Java project, we are going to use a small database that is already available as part of the Oracle's NetBeans IDE distribution and create a JPA persistence layer as well as a REST API from it using the code generation features of the IDE.

Tip

Download the sample Java project

If you are impatient to directly jump into the Scala code integration features of this chapter, you may skip the following section and download the ready-to-use maven Java project instead from Packt's website at www.packtpub.com.

主站蜘蛛池模板: 宣威市| 长泰县| 珲春市| 合川市| 内黄县| 射阳县| 万荣县| 临西县| 丽江市| 邵东县| 四子王旗| 伊宁县| 海伦市| 湟中县| 鄂托克前旗| 浦江县| 类乌齐县| 临清市| 天祝| 南城县| 攀枝花市| 伊春市| 成安县| 多伦县| 周宁县| 汉源县| 沈阳市| 固镇县| 德化县| 阜阳市| 土默特右旗| 黑龙江省| 本溪| 全椒县| 浑源县| 什邡市| 桐城市| 彰化市| 三穗县| 沁水县| 通化市|