Groovy and CFML CFGroovy: Groovy for CFML Developers Barney - - PowerPoint PPT Presentation

groovy and cfml
SMART_READER_LITE
LIVE PREVIEW

Groovy and CFML CFGroovy: Groovy for CFML Developers Barney - - PowerPoint PPT Presentation

Groovy and CFML CFGroovy: Groovy for CFML Developers Barney Boisvert Who Am I? Barney Boisvert Sr. Web Application Developer Mentor Graphics Corp. 10 years of CFML development 2 years of Spring/Hibernate development I try not to read


slide-1
SLIDE 1

Groovy and CFML

CFGroovy: Groovy for CFML Developers Barney Boisvert

slide-2
SLIDE 2

Who Am I?

Barney Boisvert

  • Sr. Web Application Developer

Mentor Graphics Corp. 10 years of CFML development 2 years of Spring/Hibernate development I try not to read slides. I don't always succeed.

slide-3
SLIDE 3

Who Are You?

  • CFML developer
  • Sense there's more out there
  • Curious about other languages
  • Curious about Java Platform technologies
slide-4
SLIDE 4

What We're Talking About

  • Groovy, CFML, and Java
  • Language selection
  • Language integration
  • Why it matters
  • How it can help
  • Billions of tiny magnets spinning around and around
slide-5
SLIDE 5

Java

 JVM based  Java syntax  Static typing  Compiled  Ceremonious  Concise  Huge ecosystem  Widely adopted  Stable

slide-6
SLIDE 6

CFML

 JVM based  CFML syntax  Dynamic typing  “Compiled”  Essential  Verbose  Small ecosystem  Increasing adoption  Cumbersome access

to Java

slide-7
SLIDE 7

Groovy

 JVM based  Extended Java sytax  Dynamic typing  Interpreted or

compiled

 Essential  Concise  Small ecosystem  Increasing adoption  Direct access to Java

slide-8
SLIDE 8

Data Structures

slide-9
SLIDE 9

Java Access

slide-10
SLIDE 10

Groovy Language Features

  • Closures
  • Optional typing
  • Literals (that actually work)
  • Meta programming
  • Inline DSLs
  • Lots of “grease”
  • http://groovy.codehaus.org/Documentation
slide-11
SLIDE 11

CFGroovy (1)

 Created in 2007  Initially a scriptlet focus  Morphed into Hibernate focus

− Largely superseded by CF9's ORM

 Abandon-ware?

slide-12
SLIDE 12

Hibernate Demo

  • Config
  • Entity
  • Saving
  • Recall

– Implicit relationship traversal

slide-13
SLIDE 13

CFGroovy 2

  • Created at cf.objective() 2009
  • One CFM file (an 88 line custom tag)
  • Scriptlet-only
  • Shared output stream
  • Pluggable languages
slide-14
SLIDE 14

Demo

slide-15
SLIDE 15

The Future

  • Hibernate devalued by CF9
  • Return to scriptlet focus (CFGroovy 2)
  • Scriptlet classpath
  • Better CFML integration, where possible
slide-16
SLIDE 16

Groovy Gotchas

  • zero- vs one-based indexing
  • Map key case sensitivity
  • Type ambiguity
  • PermGen (CFGroovy only – not CFGroovy2)
slide-17
SLIDE 17

What's the Point?

  • Use more/better tools
  • Increase your skillset
  • Bridge to Java/JRE piecemeal
slide-18
SLIDE 18

The Punchline!

slide-19
SLIDE 19

Soapbox*

  • If you're not using version control, start.

Before you write another line of code.

  • If you don't use a Front Controller framework,
  • start. (I like FB3Lite, but then I wrote it)
  • Learn about your tools. They're all far more

powerful than you believe.

* I'm going to read this one verbatim. Sorry.

slide-20
SLIDE 20

Links

Preso (w/ example source): http://tinyurl.com/cfunited09-cfgroovy Blog: http://www.barneyb.com Email: bboisvert@gmail.com Twitter: @barneyb CFGroovy Info: http://tinyurl.com/cfgroovy Source: https://ssl.barneyb.com/svn/barneyb/cfgroovy/trunk/demo CFGroovy 2 Info: http://tinyurl.com/cfgroovy2 Source: https://ssl.barneyb.com/svn/barneyb/cfgroovy2/trunk/demo FB3Lite Info: http://tinyurl.com/fb3lite Source: https://ssl.barneyb.com/svn/barneyb/fb3lite/trunk/index.cfm