In this chapter, we have covered several approaches to deal with relational database persistence. We first went through an example of integration between Scala and traditional JPA-based ORM persistence. The example also illustrated the integration between the Spring framework and a Scala codebase. We then introduced Anorm, the default persistence framework available in the Play Framework that relies on direct SQL queries. Because of some limitations of ORM, mainly related to scalability and performance, and limitations as well of plain SQL queries in terms of lack of type safety and lack of composability, we moved towards the adoption of the Slick framework, a unique approach to persistence that targets a more functional way to persist data in relational databases. Finally, we considered the case where we can generate a full Play web app with basic CRUD functionality out of an existing database as a way of rapidly getting started integrating Slick into Play. The future releases of...
![Book Image](https://content.packt.com/B02949/cover_image_small.jpg)
Scala for Java Developers
By :
![Book Image](https://content.packt.com/B02949/cover_image_small.jpg)
Scala for Java Developers
By:
Overview of this book
Table of Contents (19 chapters)
Scala for Java Developers
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Programming Interactively within Your Project
Code Integration
Understanding the Scala Ecosystem
Getting Started with the Play Framework
Database Access and the Future of ORM
Working with Integration and Web Services
Essential Properties of Modern Applications – Asynchrony and Concurrency
Building Reactive Web Applications
Scala Goodies
Index
Customer Reviews