I am trying to build a java program for user login but I am not sure if my MVC design is accurate. I have the following classes:
- LoginControl - servlet
- LoginBean - data holder java class with private variables getters and setters
- LoginDAO - concrete java class where I am running my SQL queries and doing rest of the logical work.
- Connection class - java class just to connect to the database
- view - jsp to display the results
- html - used for form
Is this how you design a java program based on MVC design pattern? Please provide some suggestions?
Connection
class for the part of MVC. From the MVC view, you just access the DAO for the persistence operations. The fact that the DAO internally uses aConnection
class (or not) is an "implementation detail" of the DAO. – SJuan76 Jun 1 at 23:25