Java 9 Dependency Injection

Write loosely coupled code with Spring 5 and Guice



Bookstore > Books > Java 9 Dependency Injection

Price$44.99 - $46.27
Rating
AuthorsKrunal Patel, Nilang Patel
PublisherPackt Publishing
Published2018
Pages246
LanguageEnglish
FormatPaper book / ebook (PDF)
ISBN-101788296257
ISBN-139781788296250
EBook Hardcover Paperback

Dependency Injection (DI) is a design pattern that allows us to remove the hard-coded dependencies and make our application loosely coupled, extendable, and maintainable. We can implement DI to move the dependency resolution from compile-time to runtime. This book will be your one stop guide to write loosely coupled code using the latest features of Java 9 with frameworks such as Spring 5 and Google Guice.

We begin by explaining what DI is and teaching you about IoC containers. Then you'll learn about object compositions and their role in DI. You'll find out how to build a modular application and learn how to use DI to focus your efforts on the business logic unique to your application and let the framework handle the infrastructure work to put it all together.

Moving on, you'll gain knowledge of Java 9's new features and modular framework and how DI works in Java 9. Next, we'll explore Spring and Guice, the popular frameworks for DI. You'll see how to define injection keys and configure them at the framework-specific level. After that, you'll find out about the different types of scopes available in both popular frameworks. You'll see how to manage dependency of cross-cutting concerns while writing applications through aspect-oriented programming.

Towards the end, you'll learn to integrate any third-party library in your DI-enabled application and explore common pitfalls and recommendations to build a solid application with the help of best practices, patterns, and anti-patterns in DI.




Similar Books


Dependency Injection Principles, Practices, and Patterns

Dependency Injection Principles, Practices, and Patterns

by Steven van Deursen, Mark Seemann

Dependency Injection Principles, Practices, and Patterns teaches you to use DI to reduce hard-coded dependencies between application components. You'll start by learning what DI is and what types of applications will benefit from it. Then, you'll work through concrete scenarios using C# and the .NET framework to implement DI in ...

Price:  $41.64  |  Publisher:  Manning  |  Release:  2019

Mastering Ninject for Dependency Injection

Mastering Ninject for Dependency Injection

by Daniel Baharestani

Dependency injection is an approach to creating loosely coupled applications. Maintainability, testability, and extensibility are just a few advantages of loose coupling. Ninject is a software library which automates almost everything that we need in order to implement a dependency injection pattern.Mastering Ninject for Dependency Inject...

Price:  $19.99  |  Publisher:  Packt Publishing  |  Release:  2013

Dependency Injection with AngularJS

Dependency Injection with AngularJS

by Alex Knol

Dependency injection facilitates better testing by allowing us to mock dependencies in testing environments so that we only test one thing at a time. It also enables us to write more maintainable code by decoupling our objects from their implementations. The motivation for using it in AngularJS is to make it easier to transparently load m...

Price:  $17.99  |  Publisher:  Packt Publishing  |  Release:  2013

Sams Teach Yourself Java in 24 Hours, 8th Edition

Sams Teach Yourself Java in 24 Hours, 8th Edition

by Rogers Cadenhead

Computer programming with Java is easier than it looks. In just 24 lessons of one hour or less, you can learn to write computer programs in Java. Using a straightforward, step-by-step approach, popular author Rogers Cadenhead helps you master the skills and technology you need to create desktop and web programs, web services, an Android a...

Price:  $17.79  |  Publisher:  SAMS Publishing  |  Release:  2017

Pro JavaFX 9

Pro JavaFX 9

by Johan Vos, Stephen Chin, Weiqi Gao, James Weaver, Dean Iverson

Use the JavaFX platform to create rich-client Java applications and discover how you can use this powerful Java-based UI platform, which is capable of handling large-scale data-driven business applications for PC as well as mobile and embedded devices. The expert authors cover the new more modular JavaFX 9 APIs, development tools, and bes...

Price:  $11.39  |  Publisher:  Apress  |  Release:  2018

Exploring Java 9

Exploring Java 9

by Fu Cheng

Discover all the new features and changes in Java 9, including module systems - JPMS or Project Jigsaw. This book covers the whole Java application development life cycle. You'll review all the important concepts, including module descriptor, unnamed module, automatic module, and command line tools.Exploring Java 9 also serves as a p...

Price:  $17.49  |  Publisher:  Apress  |  Release:  2018

Introducing Jakarta EE CDI

Introducing Jakarta EE CDI

by Luqman Saeed

Discover the Jakarta EE Contexts and Dependency Injection (CDI 2.0) framework which helps you write better code through the use of well-defined enterprise Java-based components and beans (EJBs). If you have ever wanted to write clean Java EE code, this short book is your best guide for doing so: you will pick up valuable tips along the wa...

Price:  $26.35  |  Publisher:  Apress  |  Release:  2020

Java for Absolute Beginners

Java for Absolute Beginners

by Iuliana Cosmina

Write your first code in Java using simple, step-by-step examples that model real-word objects and events, making learning easy. With this book you'll be able to pick up the concepts without fuss. Java for Absolute Beginners teaches Java development in language anyone can understand, giving you the best possible start. You'll se...

Price:  $31.28  |  Publisher:  Apress  |  Release:  2018