I am trying to learn Scala and Play Framework at the same time. Scala looks like it has a lot of really cool ideas, but one of my disappointments is trying to understand all the different syntaxes for methods / functions / lambdas / anonymous functions, etc.
So, I have my main application controller:
object Application extends Controller {
def index = Action {
Ok(views.html.index("Your new application is ready."))
}
}
This tells me that I have a singleton Applicationthat has one method index, which returns which type? I expected indexto have a more important definition:
def index(req: Request) : Result = { ... }
Looking at the documentation for the Play Framework, it looks like it Actionis a sign that converts the query to the result, I can hardly understand what this line says:
def index = Action { ... }
Java, , ? ( , "method index = [some interface Action]", , , - , , ;))