Article

From:
To:
Rich _
Subject:
Re: MVC/MVP and Delphi
Newsgroup:
embarcadero.public.delphi.oodesign

Re: MVC/MVP and Delphi

Rich _ a __crit :

> I frequently see posts about asking how to implement MVC/MVP in
> Delphi.
> 
> I was talking with DavidI today and we were discussing that Delphi
> has everything you need to visually implement these patterns by
> using:
> 
> Form
> DataSource
> ClientDataSet
> DataSetProvider
> SQLDataSet
 >
 > I've used Delphi since v1 and over the past two years I was coding
 > all my business objects and the wiring to connect the business model
 > to the UI and RDBMS. But, I began to see Delphi provides the
 > framework for all that in the above mentioned components. DavidI
 > solidified my thoughts in just a few minutes.

I'm sorry but, as someone who has spent the past six years or more 
designing MVC/MVP frameworks, first in Delphi and then in C#, I would 
say that your assumptions were wrong.

Yes, you would use forms as views but there are other types of views that are not forms.
The DataSource, ClientDataset approach to connecting UI elements to properties of objects is, at worst crude, at best difficult to achieve.
Neither DatasetProvider not SQLDatatset have any place in the MVP/MVC patterns, they belong solely in an OPF framework.
> The name clientdataset, datasetprovider imply RDBMS work. But, you
> can get the clientdataset to work with various types of data, not
> just what comes out of an RDBMS. So, anyone looking to implement
> their business objects design in Delphi just needs to take some time
> working with the data components on the Tool Pallette. You may need
> to tweak them a bit for a direct implementation from the business
> model. But, you get a bunch of framework extras just from using the
> data components.

Such a solution is far from optimal and is, at best, a major kludge when 
compared with the bindings that are available in .NET for Windows or 
Cocoa for OS X.

Joanna
-- Joanna Carter [TeamB|http://www.teamb.com] Consultant Software Engineer
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 29 Mar 2024 09:43:40 UTC
Copyright © 2009-2024
HREF Tools Corp.