Book Image

Learning Google Guice

By : Hussain Pithawala
Book Image

Learning Google Guice

By: Hussain Pithawala

Overview of this book

<p>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.</p> <p>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.</p> <p>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.</p>
Table of Contents (17 chapters)
Learning Google Guice
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing Struts 2


Struts 2 is an action-oriented MVC framework for web application development. It is based on the philosophy that framework should be action-oriented and loosely coupled with application logic. For example, a request handling should be an action itself and need not involve interacting with pieces which are a part of the framework. Unlike other frameworks, which impose conditions like extending from a class or implementing an interface to handle requests, Struts 2 defies such behavior. Instead, it provides various convenient interfaces or classes that could be used as per our application requirements and upfront coupling is not required. Struts 2 also defies the use of special classes, which are used to convey the result objects from model to view. Against this, Struts 2 provides the OGNL and ValueStack, which help to make available the member of Action class variables in the view.

Note

ValueStack is a ThreadLocal object created to cater a request. For every request a different...