Board index » delphi » MVC-Pattern

MVC-Pattern


2006-08-21 08:03:36 AM
delphi128
Hi there,
how do I use the MVC-Pattern best in Delphi ?
Are there demo apps out there which show me how
to use that pattern. I understand the mechanism
behind it, but are not capable to produce good
delphi code with it. i get always cycling code
when I update a text-field (stack-overflow)....
who can teach me how to programm MVC ??? :o)
greeting
TSC
 
 

Re:MVC-Pattern

Quote
Hi there,
Hi,
Quote
how do I use the MVC-Pattern best in Delphi ?
Are there demo apps out there which show me how
to use that pattern. I understand the mechanism
behind it, but are not capable to produce good
delphi code with it. i get always cycling code
when I update a text-field (stack-overflow)....
Usually here, we talk about MVP Pattern, a more specialized version,
where P means Presenter, but can be used as controller.
Im write the frameworks for that:
VTF - ValueType Framework - For objects/attributes types - Business
Objects
OPF - Object Persistent Framework
MVP - Model View Presenter
The VTF is 100% ready, OPF 85%, and I have done few parts of MVP, to be
sincere, I have one almost done, but using Objects, and based on DePO
Objects, now Im finishin to rewrite using Interfaces.
The code now is a alpha 2 version, if you have interest you can
download at jazz.liws.com.br/download/jazz_a2.zip
I start a wiki too, www.liws.com.br/wiki, but only few parts is
done and in Portuguese, Ill try to keep the english version up to date,
but I am by my own, so I dont have enough time...
If someone else can expend a little time to look my code and send me
suggests, or want to use, fell free to contact me.... I will be very
happy. :D
I think that in 2 weeks I will have the MVP part working...
Quote
who can teach me how to programm MVC ??? :o)
If you have interest I can help you.
[]s
Cesar Romero
 

Re:MVC-Pattern

<XXXX@XXXXX.COM>a écrit dans le message de news:
XXXX@XXXXX.COM...
| how do I use the MVC-Pattern best in Delphi ?
| Are there demo apps out there which show me how
| to use that pattern. I understand the mechanism
| behind it, but are not capable to produce good
| delphi code with it. i get always cycling code
| when I update a text-field (stack-overflow)....
In addition to Cesar's efforts, I wrote a series of articles on MVP which
seemed to be the start of interest in using it in Delphi. The articles are
on my website www.carterconsulting.org.uk and you can Google this group for
previous discussions on the topic as well.
When you are confused enough :-), feel free to ask more questions here.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer
 

Re:MVC-Pattern

Quote
In addition to Cesar's efforts, I wrote a series of articles on MVP
which seemed to be the start of interest in using it in Delphi. The
articles are on my website www.carterconsulting.org.uk and you can
Google this group for previous discussions on the topic as well.
I started reading Joanna's articles...
[]s
Cesar Romero
blogs.liws.com.br/cesar
www.liws.com.br/wiki/index.php/English
 

Re:MVC-Pattern

User,
The book "Patterns of Enterprise Application Architecture" of Martin Fowler
has the best analysys of the MVC Pattern I have ever seen.
The most important thing is to keep the Model separated from de View.
I have a sort of "template aplication structure" I used succesfully in many
projects. The idea is to have a modelSingleton (TModel.getInstance) from
where you can access your model. This model is observable so when something
chages in your model the observers are notified.
The observers are usually the GUI that gets updated when the model changes.
I have an short article describing it but unfortunately its in spanish.
Esteban Calabria
<XXXX@XXXXX.COM>escribi?en el mensaje
Quote
Hi there,

how do I use the MVC-Pattern best in Delphi ?
Are there demo apps out there which show me how
to use that pattern. I understand the mechanism
behind it, but are not capable to produce good
delphi code with it. i get always cycling code
when I update a text-field (stack-overflow)....

who can teach me how to programm MVC ??? :o)

greeting

TSC
 

Re:MVC-Pattern

You can also look at Andy Bulka's website. Google should give you a
link. He implemented a MGM (model-gui-mediator), which is very similar
to MVC. I have also created most of the mediators I require for an
application using the MGM. The code is available in the tiOPF (version
2) project on SourceForge in the Demos section.
Regards,
- Graeme -
XXXX@XXXXX.COM writes:
Quote
Hi there,

how do I use the MVC-Pattern best in Delphi ?
Are there demo apps out there which show me how
to use that pattern. I understand the mechanism
behind it, but are not capable to produce good
delphi code with it. i get always cycling code
when I update a text-field (stack-overflow)....

who can teach me how to programm MVC ??? :o)

greeting

TSC
 

Re:MVC-Pattern

Quote
I have a sort of "template aplication structure" I used succesfully
in many
Quote
projects. The idea is to have a modelSingleton (TModel.getInstance) from
where you can access your model. This model is observable so when
something
Quote
chages in your model the observers are notified.

The observers are usually the GUI that gets updated when the model
changes.
Quote

I have an short article describing it but unfortunately its in spanish.

Esteban Calabria
¿Podés enviarme la url del artículo?
Leonardo M. Ram?
leonardorame.blogspot.com