One of the classic MVC debates relates to the display of negative numbers which, in typical accounting applications are displayed in red. But which tier is responsible for deciding that? There are good arguments on both sides (especially when you consider desktop applications), and no one right answer.
Validation messages set in the model can be *optionally overridden* in the view. On Apr 22, 1:14 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Just because you have the rm command in Linux doesn't mean that you should > use rm -Rf / without thinking what you are doing. > > Why do you say you need to change two places?? All you have to do is set it > in the view, you *DON'T* have to set it in the model. > > "Validation error msg is not truly view thing": oh yeah? What about if your > client asks you in the future to have *all* messages in your application > multi-lingual? If you had your error message on the view, then that would be > a no-brainer. I suggest you read > overhttp://en.wikipedia.org/wiki/Model-view-controllerto understand more about > what each tier brings in to the system. > > -MI > > --------------------------------------------------------------------------- > > Remember, smart coders answer ten questions for every question they ask. > So be smart, be cool, and share your knowledge. > > BAKE ON! > > blog:http://www.MarianoIglesias.com.ar > > -----Mensaje original----- > De: [email protected] [mailto:[EMAIL PROTECTED] En nombre > de [EMAIL PROTECTED] > Enviado el: Domingo, 22 de Abril de 2007 05:48 a.m. > Para: Cake PHP > Asunto: Re: where to change or add 'This field cannot be left blank' such > validate msg? > > as you said,why there is a way to make msg in model? > > and if I wanna change the validation and relate validation msg ,I > think I should make changes in one place instead of two places. > and in my opinion ,the validation error msg is not truly view thing.it > is more close to model than to view --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
