Hey Joe! Thanks for, sharing yet another revelant opinion! Joe Kepley wrote: > > > > I consider it to be very important for clean code to separate the input > > validation from any action or logic. This can be best reached by having > > different methods for this two tasks. > > > > The actual controller action method should be invoked only with verified > > data and should not have to care whether the data is clean. This could > > be reached by putting the input data in individual request objects which > > are guarentied to contain only verified data: > > > > class myBookingDataConfirmationController > > { > > public function run( myBookingDataStruct $data ) > > } > > > This would be a good thing to do as a subclass, but I don't know if I'd want > to see this on the base interfaces. The stick issue is that what determines > whether or not the data is 'clean' is highly application-specific. There > would need to be an additional layer that defines what data should be > accepted for each controller action. > > Given the current spec, though, I think that it would be pretty each to > write custom subclasses for RequestParser, Controller, and an input filter > that implements this behavior. Actually, the spirit of eZ Components is to not dictate the way you should do things, or implement your controllers.
Of course, you are free to implement a lower level interface. I think that we want to keep only what is required in the interfaces, for the whole pattern to work, but no dictature. Regards, James. -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components