Semicolon & Sons
X
About
Contact & Support
Code Diary
Episodes
Blog
Subscribe
Sign in
Semicolon & Sons
About
Screencasts
Code Diary
Blog
Contact & Support
Subscribe
Sign In
Object oriented programming Code Diary Entries
This is part of the Semicolon&Sons
Code Diary
- consisting of lessons learned on the job.
Be careful calling constructors on subclasses without super
Be careful with attributes that are only available during parts of the lifecycle of an object
Constructors should assign parameters before generated values
Harmonize whether job code deserializes objects or just accepts ids
Have consistent return values for an object type
Keep consistent return types with your interfaces
Watch out when calling methods that trigger lifecycle events when inside lifecycle events
When working with subclasses ensure methods called are available on all possible instances