多治見IT勉強会 Groovy Grails
Upcoming SlideShare
Loading in...5
×
 

多治見IT勉強会 Groovy Grails

on

  • 1,982 views

地元、多治見市で、Groovy/grailsな話をしてきた。

地元、多治見市で、Groovy/grailsな話をしてきた。

Statistics

Views

Total Views
1,982
Views on SlideShare
1,981
Embed Views
1

Actions

Likes
0
Downloads
5
Comments
0

1 Embed 1

http://yali-ld1.linkedin.biz 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

多治見IT勉強会 Groovy Grails 多治見IT勉強会 Groovy Grails Presentation Transcript

  • 2010.10.14 at Tajimi def speaker = new Cast(name:”T.Yamamoto”,version:”TI-2010-10-14”)
  • def name='World' def list = ["Hello", " ", "World"] println "Hello $name!" list.each{ print it } class Greet { def name Greet(who) { name = who[0].toUpperCase() +who[1..-1] } def salute() { println "Hello $name!" } } def g = new Greet('world') // create object g.salute()
  • import java.util.Date; } return this.black; public Integer getColorId() { } public class Color { return this.colorId; public void setBlack(String black) { private Integer colorId; } this.black = black; private String colorName; public void setColorId(Integer colorId) { } private String cyan; this.colorId = colorId; public String getRgb() { private String magenta; } return this.rgb; private String yellow; public String getColorName() { } private String black; return this.colorName; public void setRgb(String rgb) { private String rgb; } this.rgb = rgb; private String sysIpaddress; public void setColorName(String } private Date sysLastmodified; colorName) { public String getSysIpaddress() { private Integer sysUid; this.colorName = colorName; return this.sysIpaddress; public Color(Integer colorId, String } } colorName, String cyan, public String getCyan() { public void setSysIpaddress(String String magenta, String yellow, String return this.cyan; sysIpaddress) { black, String rgb, } this.sysIpaddress = sysIpaddress; String sysIpaddress, Date public void setCyan(String cyan) { } sysLastmodified, Integer sysUid) { this.cyan = cyan; public Date getSysLastmodified() { this.colorId = colorId; } return this.sysLastmodified; this.colorName = colorName; public String getMagenta() { } this.cyan = cyan; return this.magenta; public void setSysLastmodified(Date this.magenta = magenta; } sysLastmodified) { this.yellow = yellow; public void setMagenta(String magenta) { this.sysLastmodified = sysLastmodified; this.black = black; this.magenta = magenta; } this.rgb = rgb; } public Integer getSysUid() { this.sysIpaddress = sysIpaddress; public String getYellow() { return this.sysUid; this.sysLastmodified = sysLastmodified; return this.yellow; } this.sysUid = sysUid; } public void setSysUid(Integer sysUid) { } public void setYellow(String yellow) { this.sysUid = sysUid; public Color() {} this.yellow = yellow; } public Color(Integer colorId) { } } this.colorId = colorId; public String getBlack() {
  • class Color { Integer colorId String colorName String cyan,magenta,yellow,black,rgb String sysIpaddress Date sysLastmodified Integer sysUid } class Color { Integer colorId, sysUid String colorName,cyan,magenta,yellow,black,rgb,sysIpaddress Date sysLastmodified }
  • public class HelloWorld { String name; public void setName(String name){ this.name = name; } public String getName(){ return name; } public String greet(){ return "Hello "+name; } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld(); helloWorld.setName("Groovy"); System.out.println(helloWorld.greet()); } }
  • public class HelloWorld { String name; public void setName(String name){ this.name = name; } public String getName(){ return name; } public String greet(){ return "Hello "+name; } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld(); helloWorld.setName("Groovy"); System.out.println(helloWorld.greet()); } }
  • public class HelloWorld { String name public void setName(String name){ this.name = name } public String getName(){ return name } public String greet(){ return "Hello "+name } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld() helloWorld.setName("Groovy") System.out.println(helloWorld.greet()) } }
  • public class HelloWorld { String name public String greet(){ return "Hello "+name } public static void main(String[] args){ HelloWorld helloWorld = new HelloWorld() helloWorld.setName("Groovy") System.out.println(helloWorld.greet()) } }
  • public class HelloWorld { String name public String greet(){ return "Hello "+name } } HelloWorld helloWorld = new HelloWorld() helloWorld.setName("Groovy") System.out.println(helloWorld.greet())
  • class HelloWorld { String name def greet(){ return "Hello "+name } } def helloWorld = new HelloWorld() helloWorld.setName("Groovy") println(helloWorld.greet())
  • class HelloWorld { String name def greet(){ return "Hello "+name } } def helloWorld = new HelloWorld() helloWorld.name = "Groovy" println helloWorld.greet()
  • class HelloWorld { String name def greet(){ "Hello $name"} } def helloWorld = new HelloWorld() helloWorld.name = "Groovy" println helloWorld.greet()
  • class HelloWorld { String name def greet(){ "Hello $name"} } def helloWorld = new HelloWorld(name: "Groovy") println helloWorld.greet()
  • @Grab('com.google.code.jcouchdb:jcouchdb:1.0.1-1') import org.jcouchdb.db.Database Database db = new Database(     "localhost", "example_xmldo"   ) db.createDocument(     [name:' ',comment:' '])
  • Groovy G*( )
  • mailService.send to: 'foobar@gmail.com', subject: 'Hello World', htmlBody: '<bold>Hello</bold>'
  • import com.google.appengine.api.datastore.Entity def person = new Entity("person") person['name'] = " " person.age = 18 println person.name person.save() def q = new Query('person') def list = datastoreService.prepare(q).asList( Builder.withLimit(20).offset(0) ) person.delete()
  • 29
  • 30
  • 31
  • % grails run-app 38
  • class Chat { String message Date dateCreated Date lastUpdated class ChatController { static constraints = { static scaffold = true message nullable:false } dateCreated() lastUpdated() } }
  • Q&A
  • 43