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

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.

主站蜘蛛池模板: 色达县| 邵阳市| 定陶县| 辰溪县| 安塞县| 孝昌县| 灌南县| 宝坻区| 宜川县| 舒城县| 吉木乃县| 裕民县| 老河口市| 浏阳市| 博湖县| 湖北省| 平谷区| 盐边县| 福清市| 彭山县| 开原市| 营口市| 玉林市| 左贡县| 徐闻县| 阜康市| 福安市| 西平县| 吴旗县| 镇巴县| 贵定县| 吴堡县| 炉霍县| 贵德县| 灵寿县| 富源县| 手游| 如东县| 洛浦县| 墨竹工卡县| 内丘县|