It responsible to provide the data.
- Entity - a class that provide table schema
- Entity Repository - an interface for several query statement
- Entity Service - a class that provide action for reading and writing the certain data that requested by Data Provider
Responsible to presenting the view layout of the application.
- Data Provider - to parse data provided from Entity Service that needed by View
- View - any component or presenter that want to read/write the data using Data Provider helper
Combine Vaadin access route within Spring Boot security class.
- Setup User Entity
- Define User Repository to get the information of the user by email or username. It depend on your privacy policy for how the user can signin
- Create custom Spring Boot configuration to setup the url permission and determine where the url address should be used to hendle the login action
- Create custom UserDetailService to build custom login validation and register the Roles of the logged in user to Spring Boot
- When you registering the roles of the current user, that roles has been saved in the security class and will be used to validate the page that implementing @Secured annotation and determine does there is a matched roles that is permitted to access the page
- For more information about security in spring boot, please read the example guide at https://spring.io/guides/gs/securing-web/
The Bakery Demo App is using MVP pattern instead of MVC.
- Model - is Service layer that provide the data
- View - is a UI layer that used to display the application layout. For component with simple logic operation
- Presenter - is a UI layer that splitted up from View and contain abstract methods that will be implemented by View to get additional data/instance of other class. For component with much or complex logic operation (event listeners, service-layer calls, etc.)
MVC:
+--------------------+
+-----------| View | <-------+
| +--------------------+ |
v v
+-----------------------+ +-----------------------+
| Model | <------------- | Controller |
+-----------------------+ +-----------------------+
MVP:
+--------------------+
| View | <-------+
+--------------------+ |
v
+-----------------------+ +-----------------------+
| Model | <------------- | Presenter |
+-----------------------+ +-----------------------+
Here is useful link references that relevant to learn: