3

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 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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 :-)

2 Comments

there is a big gap in documentarion for play with scala :) link very well organized. But seems to me that for plat with scala there is no documentation. link
yup the documentation is indeed a bit out of date. You can certainly use JPA with scala and also the play java framework. let me know if you need any specific help. like i said before, you can try the scalagen module, it will give you a good start and do some of the basic plumbing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.