Table of ContentsPart 1: Introduction and Functional Specs
Part 2: Java classes
Part 3: HTML and jqGrid
Part 4: XML configuration
Part 5: Running the Application
- Spring core 3.1.0.RELEASE
- Spring Data JPA 1.1.0 RC1
- jQuery 1.6.4
- jqGrid 4.3.1
- See pom.xml for details
To access the source code, please visit the project's Github repository (click here)
Functional SpecsBefore we start, let's define our application's specs as follows:
- A CRUD page for managing users
- Use AJAX to avoid page refresh
- Display reports in an interactive table
- Users have roles. They are either admin or regular (default)
- Everyone can create new users and edit existing ones
- When editing, users can only edit first name, last name, and role fields
- A username is assumed to be unique
Here's our Use Case diagram:
DatabaseOur database contains two tables: user and role tables.
User tableThe user table contains personal information of each user. Notice the password values are hashed using Md5.
Role tableThe role table contains role values of each user. We define a role value of 1 as an admin, while a role value of 2 as a regular user.
ScreenshotsBefore we start with the actual development, let's preview how our application should look like by providing screenshots. This is also a good way to clarify further the application's specs.
The entry page is the primary page that users will see. It contains an interactive table where users can view, add, edit, and delete records on the same page.
Create new record form
This form is used for adding new records. It is displayed when the user clicks on the Add button.
Edit existing record form
This form is used for editing existing records. It is displayed when the user clicks on the Edit button. When editing, the form is pre-populated with the selected record's data.
You must select a record first alert is displayed whenever a user tries to edit or delete an existing record without selecting first that record.
Entry has been edited successfully alert is displayed whenever a successful action has been done, for example editing of an existing record.
Records can be filtered by typing keywords on the menu toolbar.
NextIn the next section, we will discuss the project's structure and write the Java classes. Click here to proceed.
Share the joy:
Subscribe by reader Subscribe by email Share