Jay Snellings

User Device Management System Project

Languages/Tools Used: MySQL, Java, JavaScript, HTML, and Apache TomCat

In collaboration with a classmate, we developed a web-based user device management system. This system allows users to interact with a MySQL database through a front-end interface built with Java servlets. Users can perform various operations such as searching for existing users, creating new users, updating current user information, deleting users, and updating device usage information. To start, we set up a MySQL database and created a schema to store information in three tables: Users, Uses, and DeviceType. We were provided with data to populate these tables as part of the project. We then created Java classes for each table (Users, Uses, and DeviceType) that included constructors, getters, and setters for their respective fields, such as userIds and deviceIds. For functionality, we implemented Java servlets for each operation (e.g., adding users, deleting users). These servlets connect the database to the front end and execute SQL statements based on user requests. The front end features a simple UI with textboxes that allow users to interact with the database. JavaScript captures user input and sends it to the appropriate Java servlet, where a prepared SQL statement is executed on the database.

How it Works

When a user connects to our web app, they are presented with text boxes for various actions: searching for existing users, creating a new user, updating current user information, deleting users, and updating device usage information. For example, if a user wants to add someone to the database, the JavaScript file first ensures that all necessary fields (such as UserID, UserName, and UserType) are filled in. Once validated, the inputted information is sent to the Java servlet responsible for adding users to the database. This servlet then executes a prepared statement like "INSERT INTO Users (UserID, UserName, UserType) VALUES (?, ?, ?)," with the placeholders being replaced by the values provided from the JavaScript file. This process successfully adds a new user to the database. Each function in our web app follows a similar workflow, ensuring a consistent and efficient user experience.

Skills Learned

I learned how to set up and manage a MySQL database, use Apache Tomcat to deploy a web app, capture user inputs with JavaScript, and utilize Java servlets to execute prepared SQL statements on the database.

User management photo
John Doe
John Doe 2