[My Blog]
All roads lead to JavaRanch
so basically, your jsps, are mainly for display purposes and should do no processing and computation, which should be done in servlets.
database access and queries should be done ine java beans. is that so?
so basically, your jsps, are mainly for display purposes and should do no processing and computation, which should be done in servlets.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
processing and computation are supposed to be done in MODEL. Servlets(CONTROLLER) should only be used to control(calling model components dispatch to the correct view)the web app.
Originally posted by Roger Chung-Wee:
Here's a crude MVC diagram. By CRUD I mean create/update/use/delete.
there's no arrow from the beans or model
i mean, after it goes there, does it pass the crud data to back to the servlets or the jsp?
i'm currently using just jsps and beans.
what happens then if i don't have servlets?
SCJP 1.4, SCWCD 1.4
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |