Book Image

JBoss Weld CDI for Java Platform

By : Kenneth Finnigan
Book Image

JBoss Weld CDI for Java Platform

By: Kenneth Finnigan

Overview of this book

CDI simplifies dependency injection for modern application developers by taking advantage of Java annotations and moving away from complex XML, while at the same time providing an extensible and powerful programming model. "JBoss Weld CDI for Java Platform" is a practical guide to CDI's dependency injection concepts using clear and easy-to-follow examples. This will help you take advantage of the power behind CDI, as well as providing a firm understanding of how to use it within your applications. "JBoss Weld CDI for Java Platform" covers all the major aspects of CDI, breaking it down into understandable pieces. This book will take you through many examples of how these concepts can be utilized, helping you get up and running quickly and painlessly. "JBoss Weld CDI for Java Platform" gives you an insight into the different scopes provided by CDI and the use cases for which each has been designed. You will learn everything about dependency injection, scopes, events, producers, and more from JBoss Weld CDI, as well as how producers can create new beans for consumption within your application. You will also learn how to build a real world application with CDI using JSF and AngularJS for different web interfaces.
Table of Contents (17 chapters)
JBoss Weld CDI for Java Platform
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

The history of beans


Beans have been used to refer to many different kinds of Java classes over the years. The oldest use of a bean is from 1996, when Sun introduced JavaBeans as a term for a reusable software component for Java that defined a series of rules as to how a Java class should be developed. Those original rules have become ubiquitous to the point that the term JavaBeans is rarely, if ever, used anymore.

Since that initial use of the bean in 1996, there have been many uses of the term in third-party frameworks such as Seam and Spring. The term was also used in EE specifications for Enterprise JavaBeans (EJBs) and Java Server Faces (JSF) where they were called Managed Beans . Even though the term "bean" had been used by various specifications within the Java EE platform, there was never a consistent or clear definition of what a bean is made of and how it could be utilized.

With the release of Java EE 6 in December 2009, for the first time the Managed Bean specification brought a common standard and definition of a bean to the entire Java EE platform. This definition was expanded upon within the EJB and CDI companion specifications of Java EE 6 and will continue to be utilized as more EE specifications continue to adopt the definition of a managed bean.