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

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.

主站蜘蛛池模板: 大庆市| 钟山县| 民勤县| 宁陵县| 周宁县| 陆川县| 苗栗市| 凤阳县| 甘肃省| 简阳市| 浑源县| 江孜县| 繁昌县| 开化县| 曲靖市| 济宁市| 邵东县| 恩平市| 铜川市| 巴东县| 十堰市| 黔江区| 岗巴县| 清丰县| 宁明县| 大城县| 景洪市| 无棣县| 隆化县| 金沙县| 合阳县| 杨浦区| 合作市| 江门市| 兴义市| 长海县| 汶川县| 博客| 石首市| 玛多县| 汾阳市|