component based software design observer pattern project