Of course, you should read all you can about SOLID, Design patterns, Patterns of Enterprise Application Architecture, etc. Once you have a basic understanding of these topics you still have to write that code though, and write it well too! What is good code? Are there some guidelines, or rules of thumb, which you can follow while making your everyday coding decisions?
In this talk I’ll cover many of these coding guidelines, which aren’t usually covered by patterns or principles books. They should help you write better code and give you a richer vocabulary for reviewing other people’s code. Some of the subjects that we’ll discuss are: state, mutability, CQS, one-method objects, domain-first, API-driven, functional programming influences, object boundaries, (de)serialization, and many more!
85. EVERYTHING IS AN OBJECT
OBJECTS ENCAPSULATE STATE AND BEHAVIOR
SERVICES SHOULD BE MODELLED AS FUNCTIONS
OBJECTS SHOULD BE EXPLICIT ABOUT SIDE-EFFECTS
ALMOST ALL OBJECTS SHOULD BE IMMUTABLE
TREAT YOUR APPLICATION AS AN OBJECT
(AND VICE VERSA)
ONLY VALID VALUES SHOULD CROSS OBJECT BOUNDARIES
OBJECTS SHOULD ONLY EXIST IN A VALID STATE
OBJECTS SHOULD COMMUNICATE USING WELL-DEFINED MESSAGES