I'm having a hard time wrapping my head around this whole Play! Framework-thing and I could really use your help. At this point every answer I find seems to give me five new questions. I would prefer not to read some lengthy tutorial or documentation. Instead, I would like to dive right in but that seems impossible.
Allright, so I downloaded the activator and created a new application with it. Starting the application I get to the main page with my browser:
localhost:9000
(why we are using port 9000 for HTTP and not 80 is beyond me)
Now I naturally want to understand how this main page is generated so that I can directly tweak that html-template and the content providing Java and get on with my life.
The main page tells me that the conf/routes file is calling the index()-method in app/controllers/Application.java. I open up the file to see the line
return ok(index.render("Your new application is ready."));
On the main page it is explained that this calls the file app/views/index.scala.html for the content. I know nothing about Scala or Groovy but I'll have a look at the file. I do not know what the @-characters and brackets do, but the main page is telling me that the following lines
@main("Welcome to Play") {
@play20.welcome(message, style = "Java")
}
are responsible for calling yet another file app/views/main.scala.html. This file is finally giving me some HTML, but only the headers. After that there are only the lines
<body>
@content
</body>
At this point the main page bows and thanks me for my time. The rest is apparently left as an exercise for the reader.
What is this @content doing? Where is it getting its template from? Where is the rest of the almost 200 lines long HTML-source that I am seeing on the main page??
Btw. I am working on a Windows 7 computer and I would like to edit my Java code in Eclipse.
@element is window from html to scala syntax like <% %> tags - Odomontois