Scripting languages in Java Andrey Duka, System Architect andrey'dukaexigenservices'com - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Scripting languages in Java Andrey Duka, System Architect andrey'dukaexigenservices'com

Description:

'A scripting language is a form of programming language that is usually ... James Gosling. 9. XML ??????. groovy.xml.MarkupBuilder. def myXMLDoc = new MarkupBuilder ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 22
Provided by: KMZ
Category:

less

Transcript and Presenter's Notes

Title: Scripting languages in Java Andrey Duka, System Architect andrey'dukaexigenservices'com


1
Scripting languages in Java Andrey Duka, System
Architectandrey.duka_at_exigenservices.com
2
  • Java ! Java platform

3
  • Agile Web Development with Java

4
??????? ???????????
  • A scripting language is a form of programming
    language that is usually interpreted rather than
    compiled
  • - whatis.com

5
  • Groovy, Ruby, Python, PHP

6
??????? ???????????? ??????????
  • 1997 - Jim Hugunin created Jython
  • 2000 - BeanShell and Dynamic Java Patrick
    Niemeyer
  • 2001 - Jan Arne Petersen created JRuby
  • 2004 - JSR 241 Groovy programming language
  • 2005 - Sun releases alpha of Coyote
  • 2006 - JSR 223 Scripting for the JavaTM Platform
  • 2007 - Groovy 1.0
  • 2008 - Grails 1.0

7
????????? ?????? ??????
  • BeanShell Frink Groovy Hecl
  • Jacl JavaScript Jelly
  • Joy Jruby Judoscript Jython
  • JavaFX Script ObjectScript Pnuts Scala Sleep V
    Yoix

8
???????? ??????
  • All configuration files eventually become
    programming languages
  • - James Gosling

9
XML ??????
  • groovy.xml.MarkupBuilder
  • def myXMLDoc new MarkupBuilder()
  • myXMLDoc.workbook
  • worksheet(caption"Employees")
  • row(fname"John", lname"McDoe")
  • row(fname"Nancy", lname"Davolio")
  • worksheet(caption"Products")
  • row(name"Veeblefeetzer",
    id"sku34510")
  • row(name"Prune Unit Zappa",
    id"sku3a550")
  • println myXMLDocuages

10
?????? ?? ?????????
  • DSL

11
??? ???? ???????????
  • A Domain Specific Language (DSL) is a computer
    programming language of limited expressiveness
    focused on a particular domain.
  • - Martin Fowler

12
DSL ?????? / ???????
  • write 'readme.txt'.contents()

13
DSL ?????? (???????????)
  • String.metaClass.contents
  • this.class.getResourceAsStream(delegate).getText(
    )
  • def write file -gt
  • println file
  • write 'readme.txt'.contents()

14
??????? ????????????? ?????????????
  • BEA Weblogic wslt
  • IBM WebSphere wsadmin
  • Eclipse GroovyMonkey
  • JavaFX - JavaFX Script

15
Web ?????????? GRails
  • For me, Grails is the natural next step for Java
    EE developers. If Spring and Hibernate provided
    an abstraction over Java EE and simplified
    development, then Grails is an abstraction over
    Spring, Hibernate, and Java EE that can take you,
    the developer, to the next level.
  • - Christopher M. Judd, Judd Solutions

16
??????? ??????? ?????
  • ?????? ??????? ??????? ????/???????????????
    ?????? ????? ????? ??????? on-line ????????
    ?????? ??????50, 100, 500 ?

17
?????
  • 38

18
????? ???????? ??????
  • PROS vs. CONS

19
???????
20
????? ???????? ??????
  • https//scripting.dev.java.net/
  • JSR 223 Scripting for the JavaTM Platform
  • JSR 241 The Groovy Programming Language
  • Bean Scripting Framework
  • http//grails.org
  • http//groovy.codehaus.org
  • http//jruby.codehaus.org

21
  • ?
Write a Comment
User Comments (0)
About PowerShow.com