Jason Miesionczek
Jason Miesionczek

Reputation: 14448

Sharing data models among separate but related sites

I am working on the design for a series of websites built on the Play! Framework and Scala. Each site will have its own data models, but they will also need to share a few user related tables with each other.

Whats the best way to organize those user table models so that the code can be easily shared among the different web site projects?

I am currently using IntelliJ so any solutions that target that IDE specifically would be greatly appreciated.

Upvotes: 1

Views: 333

Answers (1)

niels
niels

Reputation: 7309

The preferred way to handle such problem in play are modules, see How does one create a Play Module?. So you put the common models in a modul and refer it from your applications. If you do this by adding a relative path in application.conf it should be easily to work on this.

Upvotes: 2

Related Questions