履歴: ソフトウェア/PlayFramework/play2.3のインストール
各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 4 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます
| 日時 | タイトル | 文字数 | 追加 | 削除 | 内容 | 差分 | 基準 |
|---|---|---|---|---|---|---|---|
| 2015/4/23 4:09:25 | ソフトウェア/PlayFramework/play2.3のインストール 最新版 | 8,895 | +98 | -1 | 表示 | 表示中 | — |
| 2015/4/21 14:16:54 | ソフトウェア/PlayFramework/play2.3のインストール | 5,738 | +58 | -1 | 表示 | 差分 | 選択 |
| 2015/4/21 7:01:53 | ソフトウェア/PlayFramework/play2.3のインストール | 4,572 | +29 | -3 | 表示 | 差分 | 基準 |
| 2015/4/21 6:38:26 | ソフトウェア/PlayFramework/play2.3のインストール | 3,955 | — | — | 表示 | — | 選択 |
基準: ソフトウェア/PlayFramework/play2.3のインストール (2015/4/21 7:01:53) → 比較: ソフトウェア/PlayFramework/play2.3のインストール (2015/4/23 4:09:25) 最新版
@@ -1,5 +1,7 @@
[[ソフトウェア/PlayFramework]]
+#contents
+
* 概要 [#gbfcbc8c]
思った以上にいろいろ躓いたので。
@@ -133,7 +135,7 @@
* Hello Scala! を作成 [#k4bc4bcf]
-Hello Scala! を選んで Create
+Hello Scala! を選んで Create すると、
http://127.0.0.1:888/app/hello-scala
@@ -152,3 +154,155 @@
左のメニューで "Run" を押すと、すでに Logs の部分には "Hello, world!!!" が表示されている。
裏でコンパイルしているはずなんだけれど、あまりにシームレスでびっくりする。
+
+あれ?この例は Play Framework に載っていない最低限の物なのか。
+
+* AngularJS Play Mongo というのを試す [#a6ee3cc5]
+
+もっとまともな tutorial を、ということで、これなら
+
+- angularjs
+- coffeescript
+- play
+- guice
+- mongodb
+- reactive-mongo
+- bootstrapui
+- rest
+- scala
+
+のタグが付いていて、一通りのことができそう。
+
+Create 後、Run してから "Open the app: http://localhost:9000" のリンクを踏むと
+"Modern Web Template" というタイトルのページが表示されました。
+ビルドには結構時間がかかる印象。
+
+で、表示されたフォームを試してみると、そのままではデータの更新ができないみたいです?
+
+"Test" メニューでテストを実行しても controllers.UsersIT でエラーが出ます。~
+→ エラーの詳細はどうやったら見られるのだろう???
+
+ソースを見ると UsersIT のテストは json によるデータ更新のテストなので、
+やはり何かがうまく行っていない感じ。
+
+テストのログをどこで見られるのか、結局解らない。
+
+あと、テストにえらく時間がかかるのだけれどこんな物なのだろうか???
+
+** ん? [#va21122e]
+
+"Inspect" メニューの所に、
+
+ No requests found. There could be two reasons for this:
+ either there haven't been any requests to your Play application yet or
+ you're running an unsupported Play version (>2.3.0)
+
+というメッセージが出ていた。
+
+Play2.3.? はサポート外ということらしい orz
+
+* Play Slick Backbone Todo List Example というのを試す [#x4952298]
+
+あれ、これもだ。
+
+ No requests found. There could be two reasons for this:
+ either there haven't been any requests to your Play application yet or
+ you're running an unsupported Play version (>2.3.0)
+
+* バージョンを確かめる [#xd60f5f6]
+
+ということで、[Inspect]-[Incoming Requests] を使うには Play Framework の 2.3.0 以下でないとダメらしい。同様に、[Inspect]-[Actors] なら Akka 2.3.3 以下。
+
+一方、作成されたアプリケーションの build.sbt を見ると、
+
+modern-web-template/build.sbt
+ LANG:scala
+ libraryDependencies ++= Seq(
+ "com.google.inject" % "guice" % "3.0",
+ "javax.inject" % "javax.inject" % "1",
+ "org.reactivemongo" %% "play2-reactivemongo" % "0.10.5.0.akka23",
+ "org.webjars" % "bootstrap" % "3.3.1",
+ "org.webjars" % "angularjs" % "1.3.8",
+ "org.webjars" % "angular-ui-bootstrap" % "0.12.0",
+ "org.mockito" % "mockito-core" % "1.10.17" % "test")
+
+play-scala-backbone-todo/build.sbt
+ LANG:scala
+ libraryDependencies ++= Seq(
+ ws,
+ "org.webjars" % "jquery" % "2.1.1",
+ "org.webjars" % "requirejs" % "2.1.14-1",
+ "org.webjars" % "backbonejs" % "1.1.2-2",
+ "org.webjars" % "underscorejs" % "1.6.0-3",
+ "org.webjars" % "dustjs-linkedin" % "2.4.0-1",
+ "com.typesafe.play" %% "play-slick" % "0.8.0",
+ "org.seleniumhq.selenium" % "selenium-firefox-driver" % "2.34.0"
+ )
+
+等となっていて・・・これじゃバージョン解らないな。
+
+http://stackoverflow.com/questions/26042915/how-can-i-download-play-framework-2-3-3
+
+によれば Play のバージョンは、project/plugins.sbt で指定されているとのこと。
+
+modern-web-template/project/plugins.sbt
+ LANG:scala
+ // Use the Play sbt plugin for Play projects
+ addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.7")
+
+play-scala-backbone-todo/project/plugins.sbt
+ LANG:scala
+ addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.2")
+
+確かに > 2.3.0 になっている。
+
+* git で履歴を取る [#we8e0709]
+
+変更する前に git で履歴を取りたいけれど・・・
+
+と思ったら、ちゃんと .gitignore が作られている。
+
+ LANG:console
+ $ cd play-scala-backbone-todo
+ $ git init
+ $ git add .
+ $ git status
+ On branch master
+
+ Initial commit
+
+ Changes to be committed:
+ (use "git rm --cached <file>..." to unstage)
+
+ new file: .gitignore
+ new file: LICENSE
+ new file: README.md
+ new file: activator
+ new file: activator-launch-1.2.2.jar
+ new file: activator.bat
+ new file: app/Globals.scala
+ new file: app/assets/css/main.less
+ new file: app/assets/js/app.coffee
+ new file: app/assets/js/main.coffee
+ new file: app/assets/js/modules/todo.coffee
+ new file: app/assets/js/router.coffee
+ new file: app/assets/templates/todoitem.tl
+ new file: app/controllers/Application.scala
+ new file: app/controllers/TodoController.scala
+ new file: app/models/Todo.scala
+ new file: app/views/index.scala.html
+ new file: app/views/main.scala.html
+ new file: build.sbt
+ new file: conf/application.conf
+ new file: conf/evolutions/default/1.sql
+ new file: conf/routes
+ new file: project/activator-sbt-eclipse-shim.sbt
+ new file: project/activator-sbt-idea-shim.sbt
+ new file: project/build.properties
+ new file: project/plugins.sbt
+ new file: public/images/favicon.png
+ new file: test/ApplicationSpec.scala
+ new file: test/IntegrationSpec.scala
+ $ git commit -m "initial commit"
+
+こんな感じ。