versions of Java Posse 101:
main
| yours | all
Summary
Terms and technologies mentioned in
http://www.javaposse.com/index.php?post_id=175667
of The Java Posse podcast.
Interviewees
| Question (memorize) | Answer (memorize) |
| Names (of interviewees) | Dr Paul King, Jon Skeet |
| Paul's job | Managing Director and Principal Consultant (at ASERT) |
| Jon's job | Software engineer (and inveterate technological dabbler) |
| Book they're writing | Groovy in Action (Manning) |
| Other authors (of book) | Dierk Koenig, Guillaume Laforge, Andrew Glover |
Talking points
| Question (memorize) | Answer (memorize) |
| Groovy has features from... | Perl, Python, Ruby |
| Groovy is a... | dynamically typed language |
| Plans for generics? (in Groovy) | currently none |
| Can variables be strongly-typed? (in Groovy) | yes, but checked at runtime |
| Can you extend groovy classes with Java? | yes (and vise-versa) |
More
| Question (memorize) | Answer (memorize) |
| Speed of Groovy | between 3-4 times slower than Java to the same speed (rough estimate) |
| Does Groovy support annotations? | not yet |
| Can you embed Groovy code in ant? | yes |
| Do closures exist it C#? | yes, but with more typing (than Groovy) |
| Some shortcuts Groovy provides | XML, SQL, Regular Expressions, Servlets, Swing, Ant, COM Scripting |
Groovy features
| Feature (memorize) | Description (memorize) |
| Closures | anonamous block of code (passable as a parameter) |
| Builders (Groovy feature) | consistent way of building tree structures |
| Some Groovy builders | AntBuilder, SwingBuilder, SAXBuilder, MarkupBuilder (xml) |
| GPath | path language for accessing parts of tree structures |
Tools
| Tool (memorize) | Description (memorize) |
| Grails | Groovy-based web framework (inspired by Ruby on Rails) |
| GORM | (Grails Object-Relational Mapping) framework to access a DB |
| Groovy SOAP | Run and call SOAP servers |
| GSP | Groovy Server Pages |
| Groovlets | simplified Groovy version of servlets |
| LINQ | Microsoft framework for accessing a DB(not yet released) |
Relevant code examples
| Feature (memorize) | Working Groovy Code (memorize) |
| Run closure on a list | [1, 2, 3].collect( { println it*2 } ) Prints "2 4 6" |
| Optional typing | String t = "Hi" x = 123 |
| Http and GPath | xml = new URL("http://feeds.feedburner.com/javaposse").text println new XmlSlurper().parseText( xml ).channel.description.text() Prints "Java News and Interviews" |
| Builder | new AntBuilder().delete() { fileset( dir:".", includes:"**/*.txt" ) } Deletes all *.txt files, recursively |
| Sql select | sql.eachRow("select * from t") { println it.foo } Prints 'foo' field of each record |
See also
http://www.javaposse.com/index.php?post_id=175667
|
|