- Scala for Java Developers
- Thomas Alexandre
- 195字
- 2021-07-16 11:58:37
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.
- Oracle從入門到精通(第3版)
- Node.js 10實戰
- C語言程序設計習題解析與上機指導(第4版)
- Mastering Selenium WebDriver
- 算法精粹:經典計算機科學問題的Java實現
- C和C++安全編碼(原書第2版)
- 營銷數據科學:用R和Python進行預測分析的建模技術
- Processing互動編程藝術
- PHP+MySQL網站開發項目式教程
- JavaCAPS基礎、應用與案例
- Tableau 10 Bootcamp
- Python Data Science Cookbook
- Django 5企業級Web應用開發實戰(視頻教學版)
- OpenCV Android Programming By Example
- 零基礎輕松學C++:青少年趣味編程(全彩版)