Copyright
Brief Table of Contents
Table of Contents
Foreword
Preface
Acknowledgments
About this Book
About the Author
About the Cover Illustration
Chapter 1. Programming with objects: A primer
1.1. Classes and objects
1.2. State
1.3. Behavior
1.4. Dependencies
1.5. Inheritance
1.6. Polymorphism
1.7. Composition
1.8. Class organization
1.9. Return statements and exceptions
1.10. Unit testing
1.11. Dynamic arrays
Summary
Chapter 2. Creating services
2.1. Two types of objects
2.2. Inject dependencies and configuration values as constructor arguments
2.2.1. Keeping together configuration values that belong together
2.3. Inject what you need, not where you can get it from
2.4. All constructor arguments should be required
2.5. Only use constructor injection
2.6. There’s no such thing as an optional dependency
2.7. Make all dependencies explicit
2.7.1. Turn static dependencies into object dependencies
2.7.2. Turn complicated functions into object dependencies
2.7.3. Make system calls explicit