Object Oriented Design Tips

Here is an assortment of tips to keep in mind when using object oriented design in embedded systems:
  • Stay close to problem domain
  • Object discovery vs. object invention
  • Pick nouns or noun phrases as classes
  • Method names should contain a verb
  • Prefix adjectives when naming inheriting classes
  • Do not add suffixes to class names
  • Avoid one-to-one mapping from structured design
  • Replace multiple get-set methods with operations
  • Model classes that handle messages as state machines
  • Use const whenever possible
  • Restrict header file level dependency
  • Don't reinvent the wheel; use STL

View Entire Paper | Previous Page | White Papers Search

If you found this page useful, bookmark and share it on:

 
Embedded Star Newsletter
Don't have time to visit Embedded Star everyday? Then sign up for our free newsletter. We'll send you an email when we have something to share with you. Your email address will be kept confidential and we will not share, sell, or rent it to anyone. You can unsubscribe at any time by clicking a link in the email.

Enter your email address to sign up for our free newsletter:   

If you are familiar with RSS feeds, you can also sign up for our free blog feed. Our RSS feed is updated in real-time while our newsletter is updated daily.