Java 9 Dependency Injection

Write loosely coupled code with Spring 5 and Guice



Bookstore > Books > Java 9 Dependency Injection

Price$35.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


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

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:  $31.94  |  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 practi...

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

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:  $24.65  |  Publisher:  SAMS Publishing  |  Release:  2017

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 see clear co...

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

Learning Google Guice

Learning Google Guice

by Hussain Pithawala

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...

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

Java 9: Building Robust Modular Applications

Java 9: Building Robust Modular Applications

by Dr. Edward Lavieri, Peter Verhas, Jason Lee

Java 9 and its new features add to the richness of the language; Java is one of the languages most used by developers to build robust software applications. Java 9 comes with a special emphasis on modularity with its integration with Jigsaw. This course is your one-stop guide to mastering the language.You'll be provided with an overview a...

Price:  $79.99  |  Publisher:  Packt Publishing  |  Release:  2018