Re: Confusing model with controller

2010-05-25 Thread Antonio Petrelli
2010/5/25 Robert Graf-Waczenski : > My intuition for the "model" is "that which is serialized to disk" (or, more > generally: "to persistent storage"). This means that such a class does not > contain any business logic but only has getters and/or setters. No, domain objects do not need to be anemi

Re: Confusing model with controller

2010-05-25 Thread Robert Graf-Waczenski
My intuition for the "model" is "that which is serialized to disk" (or, more generally: "to persistent storage"). This means that such a class does not contain any business logic but only has getters and/or setters. In reality (and in many nontrivial projects) the distinction is not as strict,

Re: Confusing model with controller

2010-05-25 Thread Antonio Petrelli
2010/5/25 Fabio Perfetti : > so? what is the model? the beans? > > public class Employee{ >   private String name; >   private String surname; >   public setter/getter ... > } I'd call them "domain objects", it's a more appropriate term. So yes they are. And services, DAO, EJBs (if present) are pa

Re: Confusing model with controller

2010-05-25 Thread Fabio Perfetti
so? what is the model? the beans? public class Employee{ private String name; private String surname; public setter/getter ... } 2010/5/25 Antonio Petrelli > 2010/5/25 Fabio Perfetti : > > I am wondering if the actions belongs to the model layer or to the > > controller layer. > > Act

Re: Confusing model with controller

2010-05-25 Thread Antonio Petrelli
2010/5/25 Fabio Perfetti : > I am wondering if the actions belongs to the model layer or to the > controller layer. Actions are by definition part of the controller. > All the example on the web are simple! > Anyone can explain me? (with an example please) No example but a simple argument: the m