Hi
@Hansvb: Your uploaded example, /is/ a /very/ simple example, on which you can't really build something serious.
1) Take a look, at how the observer pattern is implemented in "TPersistent" and hence present in all lcl-components as a "Subject" to observe. You literally have to write 3 lines of code in a class, to be able to observe any component you like
2) Read the book, it also provides a simplified example, but _way_ better than your first one. If need be, I have ported it to lazarus, could make it available to you.
3) Basically you have 3 objects/components that work together:
3,1) Model ~ your data-layer (database, textfiles, web-requests, etc)
3,2) Presenter ~ your controller, sits in the middle and controls communication and data access + it provides the view/form(s) with data when they ask for them, typically via the observer pattern.
3,3) View ~ what the user sees and touches, (as dumb as you can make it), it sends user actions to the presenter, which talks to/with the model and fetches data, makes them pretty and sends them through the "Observed/Subject" to the attached view(s), so the user can see them.
Of course there's a learning curve, but it's not too steap
...And when you get used to "Compartementalizing" it makes a lot of tasks easier...
HTH
Regards Benny