Re: Framework for PHP-GTK app
| From: | Scott Mattocks | Date: | Wed, 03 Aug 2005 13:44:20 +0000 |
| Subject: | Re: Framework for PHP-GTK app | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6141@lists.php.net to get a copy of this message | ||
Pablo Dall'Oglio wrote:
It's a little bit painfull to write a database application in php-gtk
without a set of class wrappers for common stuffs (forms, menus, etc),
and without a set of classes for DB persistence. Of course, it's just a
part of a framework.
* Model:
* An abstraction of some real-world process or system
* Encapsulates data and functions that operate on it
* Notifies observers when data changes * View:
* The system's user interface
* Attaches to the model and renders its contents to the
display surface
* Automatically redraws the affected part when the model
changes
* Controller:
* Controls the application flow
* Accepts input from the user and instructs the model and
the view to perform actions based on that input
The model and view pieces I understand but the controller is what throws me off. I don't understand why you would have all events go through a central location. I don't see the benefit there. With a web application you have lots of user input to verify and clean. With a GUI app there isn't so much. Also the view doesn't change that drastically with every action. I'd like to see an example of MVC being used with a GUI app if anyone has one.
Scott