in reply to Re: Why I dislike the MVC implementations in Web
in thread Why I dislike the MVC implementations in Web

The question is that if you have a template to represent the entire page (including the inputs), you can't actually reuse complex inputs. Because something is missing *before* the validator to put the pieces together of the complex input. Think in a datetime field splitted in:

___/___/___ __:__:__

This means six input fields representing a single value. The validator (AFAIK) expects a complete value, not the tiny bits of it.

  • Comment on Re^2: Why I dislike the MVC implementations in Web

Replies are listed 'Best First'.
Re^3: Why I dislike the MVC implementations in Web
by perrin (Chancellor) on Jun 07, 2005 at 23:27 UTC
    Of course you can reuse them. There is a certain amount of coordination required between the HTML and the code that parses the input. Your component model will not change that.

      Actually, I didn't understand. The component model is just about creating a Class (called component here for following a bigger pattern) that puts together both the rendering and the processing of the input.

      An example of the version 1 of the Perl Oak (which doesn't use template yet, but it just could use) demonstrates that. The following component just encapsulates the render and the processing together....

      Code for Oak::Web::HTML::Input

Re^3: Why I dislike the MVC implementations in Web
by cees (Curate) on Jun 07, 2005 at 23:07 UTC

    If you wanted to you could do that bit in JavaScript and send it as a 7th parameter, so the code would still be part of the view...

      Yes, but that would solve just this example, not the problem at all...