Thursday, March 26, 2015

Play - Java - Video Tutorial

I found this to be a good start in Play (Java) and Activator

https://www.youtube.com/watch?v=bLrmnjPQsZc

For some reason the final coffee script part was not working for me, but that was of less interest than seeing an overview of Play and CRUD in Play.

FYI
What was happening for me was the .js was being generated and could be seen
http://localhost:9000/assets/js/index.js

But for some reason if I tried to debug in chrome it would always break in the index.coffee and then fail on the first line
$ ->

I found out this is because jQuery was not being included, I had to add the following line in main.scala.html
<script src=" https://code.jquery.com/jquery-1.11.2.js")" type="text/javascript"></script>


A great follow up is the exact same video but now using Scala in place of Java.

https://www.youtube.com/watch?v=eNCerkVyQdc

This time the sorm ORM was missing and the following line had to be added to build.sbt
libraryDependencies += "org.sorm-framework" % "sorm" % "0.3.16"


No comments:

Post a Comment