DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Google Guava for Cleaner Code

Google Guava for Cleaner Code

Mite Mitreski user avatar by
Mite Mitreski
·
Aug. 02, 12 · Java Zone · Interview
Like (0)
Save
Tweet
23.23K Views

Join the DZone community and get the full member experience.

Join For Free
Some time ago I did a short talk on Google Guava for our local JUG. It was a basic intro into Guava and how it makes stuff simpler, better and cleaner.

It is true that there is an overlap with Apache commons but Guava is build with expectation that there is a Function and a Predicate class as well as various builders which makes it really cool and simple for many use cases.
The talked covered most of the com.google.common.base.* classes  and basic use of functions in collection and Google collections  and few other features that are part of Guava and I find them very useful.
Source code of the examples can be found on github and here is the actual presentation:
Google Guava for cleaner code

Note one last recommendation that is not just mine but  also part of Guava's wiki :
Excessive use of Guava's functional programming idioms can lead to verbose, confusing, unreadable, and inefficient code. These are by far the most easily (and most commonly) abused parts of Guava, and when you go to preposterous lengths to make your code "a one-liner," the Guava team weeps.
 


Related links 
  • http://code.google.com/p/guava-libraries/
  • http://code.google.com/p/guava-libraries/wiki/UseGuavaInYourBuild
  • https://github.com/mitemitreski/guava-examples
  • http://stackoverflow.com/questions/tagged/guava
  • http://www.tfnico.com/presentations/google-guava#TOC-Presentation
  • http://gdg-krakow.github.com/google-io-ext-2012-guava/
Google Guava Google (verb)

Published at DZone with permission of Mite Mitreski, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Applying Domain-Driven Design Principles to Microservice Architectures
  • Which Backend Frameworks Are Impacting Web App Development Immensely?
  • SQL CTE: How to Master It in One Sitting With Easy Examples
  • Low Code and No Code: The Security Challenge

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo