Your SlideShare is downloading. ×
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
"G"はGrapeのG
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

"G"はGrapeのG

2,023

Published on

JGGUG新春LT大会2010で使った資料

JGGUG新春LT大会2010で使った資料

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,023
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. “G” Grape G “G” IS FOR GRAPE JGGUG New Year LT Party / Jan 27th, 2010
  • 2. “The Groovy Adaptable / Advanced Packaging Engine”
  • 3. Grape? ✤ Maven/Ivy ✤ jar ✤ ✤ Groovy 1.6 1.7
  • 4. > groovy .groovy Groovy 1.6 RC1 grape http://d.hatena.ne.jp/masanobuimai/20081224/1230123639
  • 5. Grape Derby SqlPortable http://d.hatena.ne.jp/kiy0taka/20090308/1236459204 kiy0taka grape groovy & grape http://genzou-postit.blogspot.com/2009/05/groovy-grape.html commons-net jar Groovy FTP by grape http://d.hatena.ne.jp/fumokmm/20090607/1244391071 Grape Twitter4j jar Groovy Twitter (@Grab ) http://d.hatena.ne.jp/nobusue/20090703/p1 nobusue
  • 6. Java Groovy “G” Gandalf G?
  • 7. In Groovy 1.6 ✤ ✤ @Grab(group=’gid’, module=’aid’, version=’ver’) ✤ ✤ Grape.grab(group:’gid’, module:’aid’, version=’ver’) ✤ ✤ grape <install|list|resolve>
  • 8. In Groovy 1.7 ✤ ✤ import package ✤ @Grab ✤ @Grab(‘gid:aid:ver’) ✤ ✤ @GrabResolver(name=’repository’, root=’url’)
  • 9. ✤ Grape ‣ http://groovy.codehaus.org/Japanese+Grape ✤ Groovy 1.7 ‣ http://groovy.codehaus.org/Japanese+Groovy+1.7+release+notes
  • 10. Groovy Web
  • 11. @Grab('org.eclipse.jetty:jetty-server:7.0.1.v20091125') @Grab('org.eclipse.jetty:jetty-servlet:7.0.1.v20091125') import org.eclipse.jetty.server.* import org.eclipse.jetty.server.handler.* import org.eclipse.jetty.servlet.* import groovy.servlet.* server = new Server(8080) servletHandler = new ServletContextHandler(ServletContextHandler.SESSIONS) servletHandler.with { resourceBase = '.' contextPath = '/' addServlet(GroovyServlet, '*.groovy') addServlet(TemplateServlet, '*.gtpl') } resourceHandler = new ResourceHandler( resourceBase:".", welcomeFiles:['index.html'], directoriesListed:true) server.handler = new HandlerList(handlers:[servletHandler, resourceHandler]) server.start()
  • 12. GitHub
  • 13. @GrabResolver(name='HiveDB', root='http://www.hivedb.org/maven/') @Grab('org.hivedb:github-api:1.0') import org.hivedb.github.* hub = new GitHub('glaforge', 'gaelyk') println "Recent commits in ${hub.userName}/${hub.repository}:" hub.commits.each { c -> println """ ${c.authorDate} by ${c.author.name} ${c.message} ${c.url}""" }
  • 14. Smack Google Talk
  • 15. @Grab('jivesoftware:smack:3.0.4') @Grab('jivesoftware:smackx:3.0.4') import org.jivesoftware.smack.* (username, password) = [' ', ' '] to = ' @gmail.com' con = new XMPPConnection( new ConnectionConfiguration('talk.google.com', 5222, 'gmail.com')) con.connect() con.login(username, password) chat = con.chatManager.createChat(to, { chat, msg -> chat.sendMessage(msg.body) } as MessageListener) chat.sendMessage("Say something to me. I'll echo it.") while(true) { sleep 1000 }
  • 16. @Grab Grape =
  • 17. Let’s get Groovy!

×