model view controller and observer pattern in lazarus