Learning Objectives
- Explain what needs to be donde to achieve the Level 2 on a RESTFUL API on the Richardson Maturity Model.
- Implement a Level 2 Tasks RESTFUL API Microservice.
- User dependencies injections to create a decoupled architecture.
"Individuals who believe their talents can be developed (through hard work, good strategies, and input from others) have a growth mindset. They tend to achieve more than those with a more fixed mindset (those who believe their talents are innate gifts)" What Having a "Growth Mindset" Actually means - Harvard Business Review
Main Topics
- Microservices.
- RESTFUL API.
- Richardson Maturity Model.
- Dependencies Injection.
🗣️ "I hear and I forget I see and I remember I do and I understand." Confucius
- Create a new project using the Spring Initializr
- Use either Java as programming language.
- Use Gradle as project option(if your computer is slow then use Maven)
- Add Spring Web dependency before generating the project.
- Create a new repository on Github and commit the files generated in 1.
- Create a new package called dto and inside define your TaskDto object with at least the following fields:
- name.
- description.
- status [TODO, DOING, REVIEW and DONE].
- assignedTo.
- dueDate.
- created.
- Create a new package called data and inside define your Task data object with at least the following fields:
- id.
- name.
- description.
- status [TODO, DOING, REVIEW and DONE].
- assignedTo.
- dueDate.
- created.
- Create a new package called service an inside create the following interface:
Java:
public interface TaskService
{
Task create( Task task );
Task findById( String id );
List<Task> all();
void deleteById( String id );
Task update( Task task, String id );
}
- Create an implementation of the TaskService using a HashMap data structure inside.
- Make your service implementation TaskServiceHashMap injectable using the @Service annotation.
- Implement you TaskController (try to avoid copy paste, use the User Microservice as reference but try doing it consciously).
- Test ALL the endpoints of your API using PostMan or any other tool of your preference.
- Java 13
- JUnit
- Maven - Dependency manager
- Paula Andrea Guevara Sánchez
This project is licensed under the GNU General Public License - LICENSE