Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a MUST COVER in my Groovy presentation? [closed]

Tags:

java

groovy

I'm working on getting an Introduction to Groovy presentation ready for my local Java User's Group and I've pretty much got it together. What I'd like to see is what you all think I just have to cover.

Remember, this is an introductory presentation. Most of the people are experienced Java developers, but I'm pretty sure they have little to no Groovy knowledge. I won't poison the well by mentioning what I've already got down to cover as I want to see what the community has to offer.

What are the best things I can cover (in a 1 hour time frame) that will help me effectively communicate to these Java developers how useful Groovy could be to them?

p.s. I'll share my presentation here later for anyone interested.

as promised now that my presentation has been presented here it is

like image 449
codeLes Avatar asked Aug 27 '08 03:08

codeLes


3 Answers

I don't know anything about groovy so in a sense I've qualified to answer this...

I would want you to:

  • Tell me why I would want to use Scripting (in general) as opposed to Java-- what does it let me do quicker (as in development time), what does it make more readable. Give tantalising examples of ways I can use chunks of scripting in my mostly Java app. You want to make this relevant to Java devs moreso than tech-junkies.
  • With that out of the way, why Groovy? Why not Ruby, Python or whatever (which are all runnable on the JVM).
  • Don't show me syntax that Java can already do (if statements, loops etc) or if you do make it quick. It's as boring as hell to watch someone walk through language syntax 101 for 20min.
    • For syntax that has a comparible feature in Java maybe show them side by side quickly.
    • For syntax that is not in Java (closures etc) you can talk to them in a bit more detail.
  • Remember those examples from the first point. Show me one, fully working (or at least looking like it is).
  • At the end have question time. That is crazy important, and with that comes a burden on you to be a psuedo-guru :P.

I'm not sure about how the Java6 scripting support works but I'm fairly sure it can be made secure. I remember something about defining the API the script can use before it's run.

If this is the case then an example you could show would be some thick-client application (e.g. a music player) where users can write their own scripts with an API you provide them in Groovy which allows them to script their app in interesting and secure ways (e.g. creating custom columns in the playlist)

like image 135
SCdF Avatar answered Sep 29 '22 23:09

SCdF


I'd go for:

  1. Closures
  2. Duck typing
  3. Builders (XML builder and slurper)
  4. GStrings
  5. Grails
like image 28
Rich Lawrence Avatar answered Sep 29 '22 22:09

Rich Lawrence


I'd mention the following things in addition to what has already been stated:

  • GDK - extensions/additions to existing JDK classes
  • Interaction between Groovy and Java code (basically a non-issue)
  • Compiling Groovy code to Java .class files
  • XML parsing and mechanisms for accessing document content

One thing I like doing with Groovy is implementing an interface defined in Java as a map from method names to closures. It's a cool thing you can do with Groovy, but probably well beyond an introductory presentation though.

like image 34
Anthony Cramp Avatar answered Sep 29 '22 22:09

Anthony Cramp