On Fri, 2005-10-14 at 08:31 +0100, Aaron Trevena wrote: > On 10/13/05, Dave Howorth <[EMAIL PROTECTED]> wrote: > > In thinking about overall design, one thing that has pretty much > > crystallized for me is that validation is a property of the > > data/object/business model, not the presentation/view system. If I call > > some model method from elsewhere (e.g. a command-line script), I still > > need validation to run, even though the args didn't come from a form. So > > validation should be either freestanding or part of the CDBI family, not > > part of Maypole or form-generation, IMHO. > > It is either business logic or data integrity (or possibly both) I'd > think that business logic would be set in the controller (and > therefore via Maypole) while data integrity logic is the business of > the model.
Ah, we have a fundamentally different viewpoint then. The business logic is the model. A database interface, data integrity & validation are parts of that. Going back to my example, if a command-line script is updating the model, it still needs to run validation to ensure data integrity but Maypole's nowhere to be seen. To me, the Maypole controller is what determines the workflow for a [HTTP] request. I'm now coming to think that Maypole's model class is actually part of the "Presentation" and is not part of the "Model" at all. It both isolates and links my "Model" and the "View" together. That is, in principle the Model knows nothing about the View and the View knows nothing about the Model. There's something between them (Presentation, or Maypole-model) that bridges data between them. In reality it gets complicated when templates start calling object methods. > > That does throw open the question of what style of form-generation I > > should use again :( > > I'd like to use Maypole::Form in the sense of user input/output - a Yeah, that makes sense. The difficulty for me now is that since I don't see validation as part of the user input any longer, the input side of form-processing should stop short of that. That means FormBuilder's not looking as attractive to me as it did, since it bundles everything together :( So I'll probably re-examine my DFV stuff and is also why I'm keen to see what Maypole's standard form-handling looks like in future. > form is where you write or read information on paper - Form has > secondary meaning in HTML/WWW which could make that confusing but I > can't think of a better word. Cheers, Dave ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Maypole-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maypole-devel
