전체 페이지뷰

2015년 3월 26일 목요일

play Framework 1st

Play Framework (ver3.0)

full stack framework : ui db all in one development 
live coding : just in time development
sbt : Scala Build Tool 
netty  module : netty server
https://www.playframework.com/documentation/2.2.x/api/scala/index.html#play.core.server.netty.package

download : playframework.com
activator new play-test play-java : create project play-java 
activator eclipse : eclipse usage rebuild :  create .classpath 
activator run
activator ui
activator clean complile run

why play framework ?
didn't use servlet   :  don't restricted the servlet specification
build in scala langauage
type-safe compile level error check 
java convention not apply
don't based on java enterprise edition api 
live coding

play framework architecture
template engine ? not jsp based on scala template engine 
akka ? 

https://www.playframework.com/documentation/2.3.x/Home   (EBook)
playframwork essentials
reactive  web application with play
play for java , play for scala
learning play framework 2

scala martin odersky  create jvml in order to break the java  jeneric
play framework don't use servlet , connect direct via the http protocol
use maven repository ivy repository 

http://akka.io/docs/ : concurrency division tool kit 
http://netty.io/wiki/

eclipse  build automatically uncheck 

basic development print web helloWorld
eclipse  activator eclipse source package import
/conf/route   GET /hello controllers.HelloWorld.index() 
                            / controllers.HelloWorld.index(name: String) scala type

create app/controller/HelloWorld.java 

package controllers;

import play.mvc.Controller;
import play.mvc.Result;

public class HelloWorld extends Controller {

   public static Result index() {
       return ok("hello world");
   }
}

http://localhost:9000/hello

create view/ hello.scala.html
ok(views.html.hello.render("hasun", 35))
return status ok() 200 TODO 500

activator 
console
scala> import package
scala> helloworld.index("Kin" , 25);

play maven dependency setting ? later namoo.club example
 https://orrsella.com/2014/02/25/integrating-play-framework-and-maven/

댓글 없음:

댓글 쓰기