SlideShare a Scribd company logo
1 of 16
NLJUG J-Fall 2011
    Nils Breunese (VPRO)
    N.Breunese@vpro.nl
Java 7 Director’s Cut

Tomas Nilsson (Product Manager Java SE, Oracle)
Oracle heeft veel regels
   Over security bugs wordt niet gesproken, niet changelogs
In tegenstelling tot Sun: veel bereikt, actually shipping
Oracle heeft 100.000+ manjaar geïnvesteerd in Java
Java EE 7: for the cloud
Arun Gupta (Java EE & GlassFish Evangelist, Oracle)
IaaS, PaaS, SaaS? Vendor lock-in!
Java EE 6 provides services, Java EE 7 is a service
Service provisioning op basis van annotaties
Dynamic service provisioning, auto-scaling, high availability
Demo: http://glassfish.org/javaone2011
Don’t call us, we’ll push
Lucas Jellema (Technical Architect, AMIS)
Comet (AJAX push, reverse AJAX, streaming, etc.)
Push: realtime en lagere systeembelasting
Oplossing: Websockets (HTML5, nieuwe spec)
Niet alleen naar browser, ook sommige DB’s kunnen pushen
Gebruik een framework, dat zal t.z.t. wel overstappen
Java op Windows Azure

Virtuele Windows Server 2008 instanties
Failover, high availability, maar geen sticky sessions
Zelf Java runtime en servlet container meeleveren
Eigenlijk dus geen specifieke ondersteuning voor Java
Remote desktop toegang voor de liefhebber
iOS, HTML5 en Andriod CI
Robert van Loghem (Mobile Development Consultant, Xebia)
Gebruik Unit en UI tests
Realistisch testomgevingen zijn lastig, veldtesten belangrijk
Jenkins met Android Emulator plugin, Jasmine, Selenium
Web Driver, Robotium, GHUnit (test op device), KIF, WaxSim
iOS: onsamenhangende tooling, Testflight is wel te gek
Looking at Groovy 1.8


Hubert Klein Ikkink a.k.a. mrhaki (VX Company)
GPars, closures, JSON, command chain expressions, AST
transformations
GPars
GParsPool.withPool {
  def selfPortraits = images.findAllParallel { it.contains me }
                            .collectParallel { it.resize() }

    // a map-reduce functional style
    def smallestSelfPortrait = images.parallel
                                     .filter{ it.contains me }
                                     .map{ it.resize() }
                                     .main{ it.sizeInMB }
}
Closures

Closures als annotation parameters
Closure composition (closures samenstellen tot nieuwe)
Closure trampoline (voorkom stack overflow)
Closure memoization (caching van resultaten)
JSON: JsonSlurper
import groovy.json.*

def payload = new URL(“http://example.com/commits”).text
def slurper = new JsonSlurper()
def doc = slurper.parseText(payload)

doc.commits.message.each { println it }
JSON: JsonBuilder
import groovy.json.*
def json = new JsonBuilder()
json.person {
   name “Guillaume”
   age 33
   pets “Hector”, “Felix”
}
println json.toString()
// {“person”:{“name”:”Guillaume”,”age”:33,”pets”:
[“Hector”,”Felix”]}}
Command chains
show = { println it }
square_root = { Math.sqrt(it) }
def please(action) {
  [the: { what ->
     [of: { n -> action(what(n)) }]
  }]
}

please show the square_root of 100
// equivalent: please(show).the(square_root).of(100)
AST Transformations
Injecteer logger: @Log, @Commons, @Log4j, @Slf4j
Maak variabele in script beschikbaar in methodes: @Field
@ToString, @EqualsAndHashCode, @TupleConstructor
   Of alledrie tegelijk: @Canonical
En nog véél meer: @AutoClone, @InheritConstructors,
@WithReadLock, @WithWriteLock, @ListenerList, etc.
String to Enum coercion

String to Enum coercion:
   enum Color { red, green, blue }
   def r = “red” as Color
   Color b = “blue”
Misc
Diamond operator (Java 7):
   List<List<String>> list1 = new ArrayList<>()
assert [2,4,2,1,3,5,2,4,3].count({ it % 2 == 0}) == 5
assert [1,2,2,2,3].toSet() == [1,2,3] as Set
Slashy strings, dollar slashy strings (multi-line regex)
Er is meer, maar dit is wel even genoeg...
Java Tuning Puzzlers
Gebruik AppDynamics Lite!
Findbugs heeft altijd gelijk!
   Checkstyle, PMD, etc. is vaak een beetje gezeur
HotSpot profiler, voor simpele applicaties: -Xprof
VisualVM
Gratis Java-monitoring: http://java-monitor.com/

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

NLJUG J-Fall 2011

  • 1. NLJUG J-Fall 2011 Nils Breunese (VPRO) N.Breunese@vpro.nl
  • 2. Java 7 Director’s Cut Tomas Nilsson (Product Manager Java SE, Oracle) Oracle heeft veel regels Over security bugs wordt niet gesproken, niet changelogs In tegenstelling tot Sun: veel bereikt, actually shipping Oracle heeft 100.000+ manjaar geïnvesteerd in Java
  • 3. Java EE 7: for the cloud Arun Gupta (Java EE & GlassFish Evangelist, Oracle) IaaS, PaaS, SaaS? Vendor lock-in! Java EE 6 provides services, Java EE 7 is a service Service provisioning op basis van annotaties Dynamic service provisioning, auto-scaling, high availability Demo: http://glassfish.org/javaone2011
  • 4. Don’t call us, we’ll push Lucas Jellema (Technical Architect, AMIS) Comet (AJAX push, reverse AJAX, streaming, etc.) Push: realtime en lagere systeembelasting Oplossing: Websockets (HTML5, nieuwe spec) Niet alleen naar browser, ook sommige DB’s kunnen pushen Gebruik een framework, dat zal t.z.t. wel overstappen
  • 5. Java op Windows Azure Virtuele Windows Server 2008 instanties Failover, high availability, maar geen sticky sessions Zelf Java runtime en servlet container meeleveren Eigenlijk dus geen specifieke ondersteuning voor Java Remote desktop toegang voor de liefhebber
  • 6. iOS, HTML5 en Andriod CI Robert van Loghem (Mobile Development Consultant, Xebia) Gebruik Unit en UI tests Realistisch testomgevingen zijn lastig, veldtesten belangrijk Jenkins met Android Emulator plugin, Jasmine, Selenium Web Driver, Robotium, GHUnit (test op device), KIF, WaxSim iOS: onsamenhangende tooling, Testflight is wel te gek
  • 7. Looking at Groovy 1.8 Hubert Klein Ikkink a.k.a. mrhaki (VX Company) GPars, closures, JSON, command chain expressions, AST transformations
  • 8. GPars GParsPool.withPool { def selfPortraits = images.findAllParallel { it.contains me } .collectParallel { it.resize() } // a map-reduce functional style def smallestSelfPortrait = images.parallel .filter{ it.contains me } .map{ it.resize() } .main{ it.sizeInMB } }
  • 9. Closures Closures als annotation parameters Closure composition (closures samenstellen tot nieuwe) Closure trampoline (voorkom stack overflow) Closure memoization (caching van resultaten)
  • 10. JSON: JsonSlurper import groovy.json.* def payload = new URL(“http://example.com/commits”).text def slurper = new JsonSlurper() def doc = slurper.parseText(payload) doc.commits.message.each { println it }
  • 11. JSON: JsonBuilder import groovy.json.* def json = new JsonBuilder() json.person { name “Guillaume” age 33 pets “Hector”, “Felix” } println json.toString() // {“person”:{“name”:”Guillaume”,”age”:33,”pets”: [“Hector”,”Felix”]}}
  • 12. Command chains show = { println it } square_root = { Math.sqrt(it) } def please(action) { [the: { what -> [of: { n -> action(what(n)) }] }] } please show the square_root of 100 // equivalent: please(show).the(square_root).of(100)
  • 13. AST Transformations Injecteer logger: @Log, @Commons, @Log4j, @Slf4j Maak variabele in script beschikbaar in methodes: @Field @ToString, @EqualsAndHashCode, @TupleConstructor Of alledrie tegelijk: @Canonical En nog véél meer: @AutoClone, @InheritConstructors, @WithReadLock, @WithWriteLock, @ListenerList, etc.
  • 14. String to Enum coercion String to Enum coercion: enum Color { red, green, blue } def r = “red” as Color Color b = “blue”
  • 15. Misc Diamond operator (Java 7): List<List<String>> list1 = new ArrayList<>() assert [2,4,2,1,3,5,2,4,3].count({ it % 2 == 0}) == 5 assert [1,2,2,2,3].toSet() == [1,2,3] as Set Slashy strings, dollar slashy strings (multi-line regex) Er is meer, maar dit is wel even genoeg...
  • 16. Java Tuning Puzzlers Gebruik AppDynamics Lite! Findbugs heeft altijd gelijk! Checkstyle, PMD, etc. is vaak een beetje gezeur HotSpot profiler, voor simpele applicaties: -Xprof VisualVM Gratis Java-monitoring: http://java-monitor.com/

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n