I am using the MVC pattern.Lets say I want to create a new object and add it to my database.Where is it better to create the new object:View:Boo boo = new Boo(awesomness);Controller.AddDB(boo);Controller:public void AddDB(string name){   Boo boo = new Boo(name);   addtodb(boo);}
MVC sending information from view to controller
mvc
The view never directly acts on the model layer. It only uses objects provided by the controller for display. It should not even run read queries, by no means it should ever do anything itself that changes the state of the database.I use MVC in a web environment where ctrl.Add(new Customer(name, age)) would not be an option anyway. But the view should really have no knowledge about models. Assume it would not only be name and age but you would also want to provide an address. For now all of this is stored in a single customer table. Later you decide that you want to have addresses stored separately. That would be one example why you would not want to have the view to decide what objects to create.Depending on language and environment the question of object ownership and lifetime would be relevant too. You don't want to spread this over several places where it is not really needed. This especially in languages that do not have garbage collection and the decision when and where to free the objects memory becomes relevant too.