On 10/11/2007, Al Boldi <[EMAIL PROTECTED]> wrote:
> > You don't need to do this. Eg: create a form without code or non-visual
> > components, bind BO attributes and components in a single line, and the
> > MVP will do the rest for you using informations from the model.
>
> Sure, this is great when you are working with a disconnected presentation
> layer like a web interface.  But for native apps, you don't need this,
> because your presentation layer is already connected to your model via
> TForm.

I've lost you there.  Why don't you need something like that?  You
should never be mixing your BOM (business object model) with your
presentation layer.  Borland didn't help this much be DB-aware
components and developers slapping loads of business rules in the
Forms directly.  A GUI is the presentation layer. A Web interface is
another.  Separating the BOM and the presentation layer you can have
one application that can server a standard GUI or Web interface. We
have such a product.  And the business rules are maintained in a
single location. So if we change a text entry validation rule, it gets
automatically applied to both the GUI and Web application. Because we
have not business rules in our forms.  This also makes unit testing
much easier.

I don't use MVP, but instead MGM (Model-GUI-Mediator) which is an
alternative to MVP. I used it extensively with tiOPF in our products.
I wrote mediators for LCL and fpGUI which can make any standard
(non-db) component object aware without sub-classing.

  http://www.atug.com/andypatterns/mgm.htm


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to