#Vaadin V10 - Demo application - Issuetracker
In this example we are using the database first approach. Mostly older environments will have a database or some kind of storage that you have to deal with. Here we are using a relational database as source of data.
- Check if for every DB Entry ( UserRole) the is a corresponding enum
Maven Modules for
- persistence mapping from database to JPA Entities
- JPA Entities to Business Pojos
- UI infrastructure
build.sh
The connection between Annotations (static) and Values inside the database. For example the UserRole. Let´s assume the UserRole is modelled as ENUM. This makes it easy to use inside Code. The developer can only use existing values, refactoring will change Names or Values immediately. But how to make this coherent to the values inside the database. Mapping the Enum to a String as embedded Value of an Entity is only the half truth.
Why? The database could introduce additional values and this would not reflect into the webapp. How to deal with changes on the Sourcecode side? The embedded values inside the database are out of sync.
What could be done? Every module will provide a ValidationService. This Service should be used during application startup to make sure everything is in a valid and coherent state.
Here in this system the User that is able to login is at the same time the Assignee. If the Module Administration and BugTracker would be independent, the would be a mapping between the class User and Assignee/Reporter/Watcher
If it is needed to be a valid System user to be an Assignee, the Module should be able to map. How to deal with System Users that are assigned to an issue but not able to login anymore?
Happy Coding.
if you have any questions: ping me on Twitter https://twitter.com/SvenRuppert or via mail.