20091226 名古屋sggae/j勉強会発表資料『lift on gae/j』
TRANSCRIPT
![Page 1: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/1.jpg)
Lift on GAE/J
Get Lift on Google App Engine for Java.
- KITAMURA Ryo2009/12/26(Fri.)
![Page 2: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/2.jpg)
Self-Introduce
● KITAMURA Ryo(@RKTM)● Wake up in Mie● Work at Nagoya
● Programmer● Ruby!!! Scala!!
– VB6, VB.NET, ASP.NET
![Page 3: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/3.jpg)
Self-Introduce
● Love● Trekking
![Page 4: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/4.jpg)
Self-Introduce
● Love● Photography
![Page 5: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/5.jpg)
Talk about ...
● What's Scala?● What's Lift?● What's Google App Engine for
Java(GAE/J)?● How to get Lift on GAE/J● Any Question?
![Page 6: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/6.jpg)
What's Scala?
● Scala● Is a general purpose programming
language.● stands for "scalable language”
– is designed to grow with the demands of its users.
![Page 7: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/7.jpg)
What's Scala?
● Scala● Runs on Java VM.
– You can call Scala from Java– and you can call Java from Scala.
● whose compiler produces– byte code that performs every
bit as good as comparable Java code.
![Page 8: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/8.jpg)
What's Scala?
● James Gosling:● "Which Programming Language
would you use *now* on top of JVM, except Java?"
● James Gosling:”Scala.”● http://www.adam-
bien.com/roller/abien/entry/java_net_javaone_which_programming
![Page 9: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/9.jpg)
What's Scala?
● James Strachan: ● “I can honestly say if someone had
shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy.”
● http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html
![Page 10: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/10.jpg)
What's Scala?
● Charles Nutter:– “Scala, it must be stated, is the
current heir apparent to the Java throne. No other language on the JVM seems as capable of being a "replacement for Java" as Scala.”
– http://blog.headius.com/2009/04/future-part-one.html
![Page 11: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/11.jpg)
What's Scala?
● Scala● Is a pure object-oriented language.
– Type inference– Static typing– Every value is an object.
val a = 12345a.toString
![Page 12: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/12.jpg)
What's Scala?
● Scala● Is a pure object-oriented language.
– Classes and traits.– Extend by subclassing and mixin-
based composition.
![Page 13: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/13.jpg)
What's Scala?
● Scala● Is functional.
– Every function is a value.val func = (x : Int) => x + 1func(1)
![Page 14: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/14.jpg)
What's Scala?
● Scala● Is functional.
– Higher-order functions– Nesting functions– Currying
![Page 15: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/15.jpg)
What's Scala?
● Scala● Is functional.
– Case classes and built-in support for pattern matching
– Built-in support for XML processing!
![Page 16: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/16.jpg)
What's Scala?
● XML Sampleval html = <html><head>foo</head><body>hoge</body></html>
println(html)
![Page 17: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/17.jpg)
Sir, More Scala,Sir!!
Join “Nagoya Scala”!!http://groups.google.co.jp/group/NagoyaScala
![Page 18: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/18.jpg)
What's Scala?
● More Info For Scala Beginners– http://www.impressjapan.jp/boo
ks/2745– http://github.com/yuroyoro/scal
a-hackathon– http://itpro.nikkeibp.co.jp/articl
e/COLUMN/20080613/307981/?ST=develop
![Page 19: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/19.jpg)
What's Lift?
● Lift● Scala-based Web App F/W.● has cherry-picked the best ideas
from a number of other frameworks,
● while creating some novel ideas of its own.
![Page 20: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/20.jpg)
What's Lift?
● Lift● Full stack
– AP Srv, ORM● Convention over Configuration● MVC● template system like Wicket
– built on the XML processing capabilities of Scala
![Page 21: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/21.jpg)
What's Lift?
● Lift● Runs on Java VM.
– Many Java libraries● Powerful support for
– AJAX– Commet
![Page 22: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/22.jpg)
What's Lift?
● More Info about Lift– http://codezine.jp/article/detail
/4310– http://codezine.jp/article/detail
/4512
![Page 23: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/23.jpg)
GAE/J?
● What is Google App Engine?● What is Google App Engine for
Java?
![Page 24: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/24.jpg)
GAE/J?
●Tantack did it!–I guess :)
![Page 25: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/25.jpg)
Get Lift on GAE/J
● * Skip installing.● Development environment
● Windows XP SP3● Java version: 1.6.0_14● Apache maven: 2.2.0● Scala 2.7.7 final● Appengine SDK: 1.3.0
![Page 26: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/26.jpg)
Get Lift on GAE/J
● mavenmvn archetype:generate -U -DarchetypeGroupId=net.liftweb -DarchetypeArtifactId=lift-archetype-blank -DarchetypeVersion=1.1-SNAPSHOT -DremoteRepositories=http://scala-tools.org/repo-snapshots -DgroupId=com.mylift -DartifactId=liftgaej
![Page 27: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/27.jpg)
Get Lift on GAE/J
● Create– src/main/webapp/WEB-
INF/appengine-web.xml
![Page 28: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/28.jpg)
Get Lift on GAE/J
● appengine-web.xml<?xml version="1.0" encoding="utf-8"?><appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>liftgaej</application> <version>1</version> <system-properties> <property name="in.gae.j" value="true" /> </system-properties> <sessions-enabled>true</sessions-enabled> <static-files> <exclude path="/**" /> </static-files></appengine-web-app>
![Page 29: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/29.jpg)
Get Lift on GAE/J
● compilemvn package
![Page 30: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/30.jpg)
Get Lift on GAE/J
● Run on local machine
[SDK dir]\dev_appserver.cmd target/liftgaej-1.0-SNAPSHOT
![Page 31: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/31.jpg)
Get Lift on GAE/J
● Deploy!
[SDK dir]\appcfg.cmd update target/liftgaej-1.0-SNAPSHOT
![Page 32: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/32.jpg)
Get Lift on GAE/J
● Datastore?● JPA sample:
● http://github.com/ymnk/lift-gae-jpa
● JDO sample:● http://github.com/ymnk/lift-gae-jdo
* I haven't tried them : (
![Page 33: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/33.jpg)
References
● Scala– http://www.scala-lang.org/– http://dl.dropbox.com/u/261418
/scala-hackathon/index.html● Lift
– http://www.liftweb.com/– http://groups.google.com/group/
the-lift-book/files
![Page 34: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/34.jpg)
References
● Lift on GAE/J– http://d.hatena.ne.jp/yuroyoro/
20090701/1246448458
![Page 35: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/35.jpg)
Q?
● Do you have any Questions?
![Page 36: 20091226 名古屋SGGAE/J勉強会発表資料『Lift on GAE/J』](https://reader035.vdocuments.mx/reader035/viewer/2022081400/554f3bd6b4c905471e8b4a54/html5/thumbnails/36.jpg)
Done!
● Thank you!● Join “ Nagoya Scala”
● @2010/01/22(Fri.)