This assessment requires you to build a RESTful API, using all you've learned about software development using Java and Spring Boot.
You can build any API of your choosing, but it must include the following:
- At least one GET endpoint that can have its results filtered using a Spring Data JPA query method (custom or derived)
- Unit tests for at least one class
- Data storage in a MySQL database
- Exception handling
- Evidence of inheritance
- Good use of HTTP Protocols - methods, request and response, have full CRUD operations supported
- Documentation
By the end of this assessment, you should be able to:
- Design and Architect APIs: Get to grips with the nitty-gritty of curating a top-quality API, focusing on data flow and endpoint interactions.
- Implement Best Practices: Showcase your adherence to Java and Spring Boot coding standards, error handling, and optimal project structure.
- Code Integration: Seamlessly combine your custom code with the Spring Initializr project.
- Exception Management: Efficiently handle exceptions, ensuring your API remains sturdy and dependable.
Onward with this assessment, you're set for a deep dive into API development with Java and Spring Boot.
- API Flow: Map out your API's progression, from endpoints to their functionalities.
- Core: Make use of Java and Spring Boot.
- Endpoints: Ensure they are detailed and fully operational.
- Error Handling: Your API should handle mishaps gracefully and return informative feedback.
- Acknowledge the pivotal role of a focused design in APIs.
- See firsthand how a detailed requirements list can pave the way for successful development.
- Consistent Commits: Commit often, capturing your progress and thought process.
- README: Not just an afterthought. Fill it with the essence of your API, setup instructions, and other salient details.
- Hone your skills in effective version control.
- Recognise the value of a well-curated repository.
- Best Practices: Stick to Java and Spring Boot best practices and conventions.
- Modularity: Your code should be modular, reusable, and easily comprehensible.
- Craft clean, efficient, and maintainable code.
- Harness Java and Spring Boot to the fullest.
Before you begin, make sure you have the following installed:
Also make sure you have accounts for the following:
- Create a new repository on GitHub and clone it to your local machine.
- Create a new Spring Boot project using Spring Initializr. Choose the appropriate options for your project, such as the programming language, framework, and dependencies. Unzip the downloaded archive into your repository.
- Implement the functionality of your API to fulfill the requirements.
Ensure that your work is merged to the main
branch of your GitHub repository by the specified deadline (original or extended). Your solution will assessed based on the state of that branch at that point in time; any feature branches or later commits will not be taken into account.
To ensure that your project can be assessed correctly, you must include a database dump file that can be used to restore a usable database and document the file's location in your README.md
file.
You can generate a dump file using the command line or MySQL Workbench:
Execute the following command to export the database:
mysqldump -u [username] -p --databases [database_name] > [dump_file.sql]
Replace [username]
, [database_name]
, and [dump_file.sql]
with your MySQL username, the name of the database you want to dump, and the desired filename for the dump file, respectively. Remove the -p
flag if you don't have a password set for your MySQL user.
- Open MySQL Workbench.
- Connect to your MySQL server.
- Go to the "Server" menu and select "Data Export".
- Select the database you want to export:
- In the "Data Export" tab, check the box next to the database you want to export.
- Choose the Export Options:
- Select "Dump Structure and Data" to include both the database schema and the data.
- Choose "Export to Self-Contained File" and provide a filename for the dump file.
- Include the Create Database Statement:
- In the "Advanced Options" section, ensure that the "Add DROP DATABASE" and "Add CREATE DATABASE" options are checked. This ensures that the dump file will contain statements to drop and create the database.
- Start the Export:
- Click the "Start Export" button to generate the dump file.
- πΈ Commit frequently and use meaningful commit messages. A granular, well-labelled history becomes an increasingly valuable asset over time.
- π΅ Use feature branches. Build the habit of isolating your changes for specific tasks and merging them into your default branch when complete.
- π¦ Use consistent naming conventions. Choose easily understandable names and naming patterns for your classes, functions and variables.
- π Keep your code tidy. Using the built-in formatting of VS Code or other IDEs makes your code easier to read and mistakes easier to spot.
- π Read the docs. Whether via Intellisense in your IDE, or browsing online documentation, build a clear understanding of the libraries your code leverages.
- π Don't wait until the last minute. Plan your work early and make the most of the time available to complete the assessment and avoid pre-deadline palpitations.
- π Ask. π For. π Help! π Your mentors, instructors and assistants are literally here to support you, so make use of them - don't sit and struggle in silence.
Best of luck! Remember, it's not just about the destination; it's the journey. Happy coding! π