On 2013-05-02 20:26, Michal Wallace wrote: > > I was experimenting with using some of FPC's features together and came up > with this: > > https://github.com/tangentstorm/lazmvc/blob/master/umodel.pas
Just curious. If you use interfaces already, then why use message methods for notifications? Why not simply stick to "designing to a interface" theory, and use the interface support you already have? You might also find Model-GUI-Mediator (MGM) interesting. I wrote an article about it some years back. You can get a copy of the artile with sources here: http://opensoft.homeip.net/articles/ tiOPF (a Object Persistence Framework) has a much more advanced Model-GUI-Mediator implementation that currently works with VCL, LCL, fpGUI and FireMonkey. See the tiBaseMediator, tiModelMediator, tiMediators and tiListMediators units, or simply compile Demo 21 (available for VCL, LCL or fpGUI), which is a simple Address Book demo using only MGM to build and manage the whole UI. http://www.tiopf.com Also an interesting read - especially if you are into Interface usage and model design. Some years back Joanna Carter (well known in the Delphi circles) wrote several articles building a basic Model-View-Presenter (MVP) framework, using interfaces extensively. This has taught me so much about using interfaces. http://www.carterconsulting.org.uk/MVP.htm Anyway, thanks for sharing your code. It is nice seeing others also interested in better data and UI modelling - compare to the crappy db-ware design Borland forced onto the world. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal