Video description
Offers both guidelines and guidance on how to achieve a clear, consistent tone across a larger team.
From the Foreword by Ross Tuck
Objects are the central concept of languages like Java, Python, C#. Applying best practices for object design means that your code will be easy to read, write, and maintain. Object Design Style Guide captures dozens of techniques for creating pro-quality OO code that can stand the test of time. Examples are in an instantly familiar pseudocode, teaching techniques you can apply to any OO language, from C++ to PHP.
Object Design Style Guide presents dozens of professional techniques for writing OO code. In it, veteran developer Matthias Noback lays out design rules for constructing objects, defining methods, changing and exposing state, and much more. All examples use instantly familiar pseudocode, so you can follow along in the language you prefer. You’ll go case by case as you explore important scenarios and challenges for object design and then walk through a simple web application that demonstrates how different types of objects can work together effectively.
about the technology
Well-written OO code is a pleasure to read, modify, and debug. Elevate your coding style by mastering the universal best practices for object design presented in this book. These clearly presented rules, which apply to any OO language, maximize the clarity and durability of your codebase and increase productivity for you and your team.
about the book
Object Design Style Guide presents dozens of professional techniques for writing OO code. In it, veteran developer Matthias Noback lays out design rules for constructing objects, defining methods, changing and exposing state, and much more. All examples use instantly familiar pseudocode, so you can follow along in the language you prefer. You’ll go case by case as you explore important scenarios and challenges for object design and then walk through a simple web application that demonstrates how different types of objects can work together effectively.
what's inside
- Universal design rules for a wide range of objects
- Best practices for testing objects
- A catalog of common object types
- Exercises for each chapter to test your object design skills
about the audience
For developers familiar with an object-oriented language and basic application architecture.
about the author
Matthias Noback is a professional web developer with nearly two decades of experience. He runs his own web development, training, and consultancy company called “Noback’s Office.”
Demystifies OOP and describes how to use it to design truly secure and performant applications.
Charles Soetan, Plum.io
Extremely well-written content for all skill levels in the industry.
Shayn Cornwell, XeroOne Systems
An objective go-to reference for programmers wanting to standardize their OOP procedures.
Joseph T. Lyons, SYSCON International
NARRATED BY SARAH DAWE
Table of Contents
Chapter 1. Programming with objects: A primer
Chapter 1. Dependencies
Chapter 1. Unit testing
Chapter 2. Creating services
Chapter 2. Inject what you need, not where you can get it from
Chapter 2. Make all dependencies explicit
Chapter 2. Don’t allow the behavior of a service to change after it has been instantiated
Chapter 2. Throw an exception when an argument is invalid
Chapter 3. Creating other objects
Chapter 3. Test for specific invalid argument exceptions by analyzing the exception’s message
Chapter 3. Don’t inject dependencies; optionally pass them as method arguments
Chapter 3. Don’t test constructors
Chapter 4. Manipulating objects
Chapter 4. Prefer immutable objects
Chapter 4. On an immutable object, modifier methods should have declarative names
Chapter 4. A modifier method should verify that the requested state change is valid
Chapter 4. Don’t implement fluent interfaces on mutable objects
Chapter 5. Using objects
Chapter 5. Return value
Chapter 6. Retrieving information
Chapter 6. Avoid query methods that expose internal state
Chapter 6. Define an abstraction for queries that cross system boundaries
Chapter 6. Use stubs for test doubles with query methods
Chapter 7. Performing tasks
Chapter 7. When something goes wrong, throw an exception
Chapter 8. Dividing responsibilities
Chapter 8. Create read models directly from their data source
Chapter 9. Changing the behavior of services
Chapter 9. Use notification objects or event listeners for additional behavior
Chapter 9. Mark classes as final by default
Chapter 10. A field guide to objects
Chapter 10. Write model repositories
Chapter 10. Read models and read model repositories
Chapter 11. Epilogue