[Lazarus] Quick Modern Object Pascal Introduction, for Programmers

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Jun 22 23:21:32 CEST 2016

On 2016-06-22 18:57, Travis Ayres wrote:
>  The Observer, MVVM,
> Adapter patterns, whatever - it would be great to find more examples of
> these.

You mean like these... a series of articles I wrote about design
patterns implemented in Object Pascal. ;-)


As for MVVM, I had a different spin on MVP (Model-View-Presenter) and
MVC (Model-View-Controller). Both MVP especially implements everything
from scratch. Instead I implemented MGM (Model-GUI-Mediator) which is
very similar to MVP in concept, except it reuses available widget events
found in all modern GUI toolkit widgets. There is an article on MGM too,
but that was kept simple for the sake of the article. For a much
improved version of MGM, take a look at the code available as part of
the tiOPF project (on SourceForge). The tiOPF implementation of MGM
supports VCL, LCL, fpGUI and FMX (Delphi's Firemonkey) toolkits.

  Design Patterns are meant to be documented as an idea of how to
  solve a commonly found problem. It isn't meant to serve as a
  code template. So there can be many ways of implementing the
  same design pattern. eg: Most books and articles I've read
  implement the Visitor pattern in a very limited way. tiOPF
  implements it in a more generic way, and actually makes it even
  more flexible.

  The tiOPF project is what got me hooked on design patterns. That
  framework uses many different design patterns, and improved the
  quality of the framework tremendously.


fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

My public PGP key:  http://tinyurl.com/graeme-pgp

More information about the Lazarus mailing list