Learning Google Guice

Develop your Java applications faster and more efficiently by learning dependency injection using Google Guice. This guide is the perfect introduction, covering both basic and advanced topics with a user-friendly approach.
Preview in Mapt

Learning Google Guice

Hussain Pithawala

1 customer reviews
Develop your Java applications faster and more efficiently by learning dependency injection using Google Guice. This guide is the perfect introduction, covering both basic and advanced topics with a user-friendly approach.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$12.60
RRP $17.99
Save 29%
Print + eBook
$29.99
RRP $29.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$12.60
$29.99
$29.99p/m after trial
RRP $17.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning Google Guice Book Cover
Learning Google Guice
$ 17.99
$ 12.60
Machine Learning: End-to-End guide for Java developers Book Cover
Machine Learning: End-to-End guide for Java developers
$ 75.99
$ 53.20
Buy 2 for $30.10
Save $63.88
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781783281893
Paperback126 pages

Book Description

Google Guice is an open source software framework for the Java platform released by Google under the Apache License. It provides support for dependency injection using annotations to configure Java objects.

Learning Google Guice is a concise, hands-on book that covers the various areas of dependency injection using the features provided by the latest version of Google Guice. It focuses on core functionalities as well as the various extensions surrounding Guice that make it useful in other areas like web development, integration with frameworks for web development, and persistence.

Learning Google Guice covers Guice extensions which avoid complex API usage. You will start by developing a trivial application and managing dependencies using Guice. As the book gradually progresses, you will continue adding complexity to the application while simultaneously learning how to use Guice features such as the Injector, Provider, Bindings, Scopes, and so on. Finally, you will retrofit the application for the Web, using Guice not only to manage dependencies, but also to solve configuration related problems.

Table of Contents

Chapter 1: Getting Started with Guice
Wiring dependencies
Comparing two approaches
Building and Running the examples
Summary
Chapter 2: Exploring Google Guice
Meet the injector
Configuring a module to write bindings
Static injection
Summary
Chapter 3: Diving Deeper in Guice
Going the extra mile with Providers
AssistedInject
Binding collections
Scoping
Summary
Chapter 4: Guice in Web Development
Structure of flightsweb application
Using GuiceFilter
Rolling out our ServletContextListener interface
ServletModule – the entry point for configurations
Binding language
Web scopes
Summary
Chapter 5: Integrating Guice with Struts 2
Introducing Struts 2
Summary
Chapter 6: Integrating Guice with JPA 2
Introduction to JPA 2 and Hibernate 3
Guice 3 with JPA 2
FlightSearch application with JPA 2 and Hibernate 3
Summary
Chapter 7: Developing Plugins and Extensions using Guice
Developing a plugin
Guice SPI (Service Provider Interface)
Exploring a custom extension, guice-multibinder
Summary
Chapter 8: AOP with Guice
What is AOP?
How AOP works?
How Guice supports AOP?
Concerns related to performance
Summary

What You Will Learn

  • Optimize dependency injection using Guice as a solution
  • Develop a fictitious application harnessing the advanced features of Guice
  • Learn the intricacies of Binding, Scoping, and Injection
  • Master the various aspects of Guice pertaining to different areas of application development in Java
  • Learn how to harness the Guice-servlet extension for web development using Struts 2, JSP, Servlets, and Hibernate 3
  • Leverage AOP using Guice implementation of aopalliance.
  • Learn how to develop extensions using the Guice SPI

Authors

Table of Contents

Chapter 1: Getting Started with Guice
Wiring dependencies
Comparing two approaches
Building and Running the examples
Summary
Chapter 2: Exploring Google Guice
Meet the injector
Configuring a module to write bindings
Static injection
Summary
Chapter 3: Diving Deeper in Guice
Going the extra mile with Providers
AssistedInject
Binding collections
Scoping
Summary
Chapter 4: Guice in Web Development
Structure of flightsweb application
Using GuiceFilter
Rolling out our ServletContextListener interface
ServletModule – the entry point for configurations
Binding language
Web scopes
Summary
Chapter 5: Integrating Guice with Struts 2
Introducing Struts 2
Summary
Chapter 6: Integrating Guice with JPA 2
Introduction to JPA 2 and Hibernate 3
Guice 3 with JPA 2
FlightSearch application with JPA 2 and Hibernate 3
Summary
Chapter 7: Developing Plugins and Extensions using Guice
Developing a plugin
Guice SPI (Service Provider Interface)
Exploring a custom extension, guice-multibinder
Summary
Chapter 8: AOP with Guice
What is AOP?
How AOP works?
How Guice supports AOP?
Concerns related to performance
Summary

Book Details

ISBN 139781783281893
Paperback126 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Getting Started with Google Guava Book Cover
Getting Started with Google Guava
$ 14.99
$ 10.50
Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Apache Maven 3 Cookbook Book Cover
Apache Maven 3 Cookbook
$ 23.99
$ 16.80
Gradle Effective Implementation Guide Book Cover
Gradle Effective Implementation Guide
$ 26.99
$ 18.90
Java EE 7 Developer Handbook Book Cover
Java EE 7 Developer Handbook
$ 35.99
$ 25.20
Mastering Concurrency Programming with Java 8 Book Cover
Mastering Concurrency Programming with Java 8
$ 43.99
$ 30.80