I am developing a web application using servlets, JSP and MVC framework.
So my servlet calls the appropriate model depending on the work and dispatches the response according to the result from the model.
i have a Servlet to perform view, edit and add product .\
Should i write a single model say ProductModel and write all the 3 methods inside it or should i write 3 different models for viewing, adding and editing.
(please correct me if i am wrong) I feel if i write all the 3 models in the same class and suppose i want to edit the product, i instantiate the ProductModel and all the 3 methods get loaded in the memory occupying unnecessary space.
SCJP 1.5, SCWCD 1.4.
Hanging between Web Services and EJB