On Tue, Apr 06, 2004 at 02:49:26PM +0200, Bruno Dumon wrote: > I'm wondering though what the value of this is. > > The main advantage of CForms is to handle the typical problem of HTML > forms: the form needs to be redisplayed in a loop until everything's > valid. This is because the browser is a stupid client which we need to > send a new page after each interaction. > > If you're developing a smarter client using XUL or Flash, you're not > likely going to send a new XUL file or Flash movie to the browser > between each interaction. Rather, all validation logic (and event > handling logic) can be implemented in the client, which can communicate > XML messages with the server. Somehow forcing CForms in between there > seems unnatural to me.
I think there are several "main advantages" of CForms besides just the validation loop. For example, you get to declaratively specify your data model, validation, and binding, and you have an event model to work with. Even if you have a smart client that can do much of the validation, etc. it still helps to have one consistent declarative way to specify your forms. We will just have to create a way to markup which validation rules and event handlers should be duplicated, when possible, on the client and which must call back to be done on the server. This way we keep all of our useful benefits while also getting improvments in reduced server load, fewer round trips, etc. --Tim Larson