Challenge
The code is getting messy. In this challenge, you will refactor it.
Open the challenge
Task 1
Place the datastore and every CRUD operation inside the Repository
layer.
Task 2
- Place business and decision-making logic inside the
Service
layer. - Make the
Service
layer the middleman. Because theService
layer handles the business logic, it should make calls to theRepository
.
Task 3
Make sure the controller's only concern is managing the model and presenting the view.
Task 4
Run your code to make sure everything still works.
Good Luck!
Feedback Summary
5.0
4 students
5
100%
4
0%
3
0%
2
0%
1
0%
Written Reviews
There are no written reviews yet.