Yegor's Elegant Objects Posts
In Elegant Objects Vol 1 most chapters have an associated blog post.
I've read the book and as clear by my review, I'm a big fan.
A lot of co-workers and colleagues want to borrow one of my copies. To help give some insight into the contents of the book; I've compiled the links to the blog posts here.
With this post, linking to all of Yegor's posts, it'll give a simpler, quicker, hopefully easier, insight into what Elegant Objects is about.
Chapter 1
Chapter 2
- Encapsulate as little as possible - No Link
- Encapsulate something at the very least
- Always user interfaces
- Choose method names carefully
- Don't use public constants
- Be immutable
- Don't mock; use fakes
- Keep interfaces short; use smarts
Chapter 3
- Expose Fewer than five public methods - No Link
- Don't use static methods
- Never accept
NULL
arguments - Be loyal and immutable or constant
- Never use getters and setters
- Don't use
new
outside of secondary ctors - No Link - Avoid type introspection and casting
Chapter 4
- Never return
NULL
- Throw only checked exceptions
- Be either final or abstract
- Use RAII - No Link
That's the high level of Elegant Objects Volume 1. I hope this shows how great the book is, or at least can open some discussion around these topics.