Hi! I've done some extensive work with servlets. Now i'm doing jsp. The jsp model 2 architecture specifies that use jsp for presentation servlet as the controller java bean for business logic. My question is what if i put all business logic in servlet and do not use java beans?? Can we do away with java beans?
posted 15 years ago
Of course it depends on what you want to do. The important thing is (and I think you got it) the clear separation of presentation (JSP) and logic or as I call them, calculations needed by the Web Application. Your bean vs. servlet question is hard to answer if we don't know the complexity of the "calculations". Of course a Servlet can do it. The question is "Reusability". If you need it, then beans are the answer. IF not, maybe the servlet can do a one-time processing of data. My experience says that reUsability is more important
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD