3
votes

Some questions:

  1. Why when I generare a new play app with scala is there no model folder?
  2. Can I use JPA instead of Anorm?
  3. I saw some similarities between Ruby on Rails and Play. So are there any helper methods in Play Framework (form helper, link helper, etc)?
  4. Is it possible to use the Play Java Framework with Scala?
2

2 Answers

2
votes

Why when I generare a new play app with scala is there no model folder?

For simple apps, you just define one models.scala file. You don't necessarily need a folder, even when you're using the modelspackage. Less visual clutter so to speak. When your app grows bigger you can refactor and put everything in a separate folder.

Can I use JPA instead of Anorm?

Of course. But you should definitely check out Anorm, or Squeryl, or ...

I saw some similarities between Ruby on Rails and Play. So are there any helper methods in Play Framework (form helper, link helper, etc)?

There are some special shortcut tags, especially in the Groovy markup (checkout out the cheat sheet). Creating your own partial components is simple enough, however. The concept of helper doesn't really exist AFAIK.

Is it possible to use the Play Java Framework with Scala?

Haven't tried it for myself but I've read that you can mix Java and Scala classes, the compiler will compile everything you throw at him.

1
votes

I would recommend implementing the tutorial on play website. Also, you may want to try the scalagen module - it would give you an easy way to generate code while you are learning at least. A quick disclaimer - I wrote the module :-)