On 10/11/2007, Al Boldi <[EMAIL PROTECTED]> wrote:
>
> This is a big misconception.  The fact that TForm has the ability to host
> business rules and whatever else does not mean that you have to do it this
> way.  You can maintain whatever model you like with TForm, for the mere fact
> that it's event-driven.

And that's where the problem comes in.  Borland gave developers
DB-Aware components with all these great events to hook into.  They
simply guide the developer into adding code into the forms, mixing
business rules with the presentation layer.  I've maintained enough
Delphi code from multiple projects in my career and every app designed
with DB-Aware components have business rules embedded in the forms.
>From specific filters to calculated fields, hard coded SQL etc...  Not
to mention all these DB-Aware components tie you into a specify
database structure due to hard coded field names used in the
components + tying you to a specific component vendor.  DB-Aware
components are great for quick prototyping, but that's about it.

But hey, this is a totally separate topic that can go on forever....
OPF's vs DB-Aware components.

> Yes, if your requirements are such that they call for a disconnected
> presentation layer, then you have a case to use an MVP.

Business rules should *always* be disconnected from the presentation
layer! They are separate layers to start with.

> the presentation layer.  You don't have to use this layer if you don't like
> to, and you could conceivably create a disconnected model based on TForms

Yes it might be possible, but in my career I am still waiting to see a
DB-Aware based application where the layers are neatly separated.

>
> Sounds interesting.  Does it feature a WebPresentation proxy?

Mediators are very easy to implement. Unfortunately I cannot share
more code than I have in the tiOPF project due to IP held by my
employer.  My MGM implementation as show in tiOPF uses RTTI
extensively so is slightly different to the design mentioned in Andy's
article.  The end result is the same.  To me, MGM sits somewhere
between MVC and MVP. A nice middle ground and very easy to implement.


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