JavaScript Full Stack Node.js Lab Test Grading Rubric
Introduction:
"Simplicity is the soul of efficiency." - Austin Freeman
In grading this test, we're looking for clarity, efficiency, and a solid understanding of Node.js principles. Remember, the beauty of Node.js lies in its simplicity and power. Let's see how well you've harnessed it.
Grading Rubric:
Setup and Initialization (20 points)
Proper initialization of a Node.js project (5 points)
Correct use of npm init and package.json setup.
Correct installation and setup of required packages (15 points)
Proper use of npm install.
Correct versioning and package management.
Database Mock (20 points)
Proper structure of the books array (10 points)
Array initialization and data type consistency.
Correct structure for book objects (10 points)
Proper use of object properties and data types.
Error Handling (15 points)
Proper handling of invalid routes (5 points)
Use of middleware or route handling to catch undefined routes.
Proper handling of invalid methods (5 points)
Handling unsupported HTTP methods for defined routes.
Correct error handling for non-existent books in relevant endpoints (5 points)
Proper status codes and error messages.
Code Quality (5 points)
Readability and clarity of code (2.5 points)
Proper indentation, naming conventions, and comments.
Proper use of asynchronous programming where necessary (2.5 points)
Use of callbacks, promises, or async/await where appropriate.
Duration: 45 minutes
Hand in Format: Zip your node.js Project Directory. Name the Zip file as StudentName_StudentID.zip
I would like to see this done as a full Node.js application.
"The important thing is not to stop questioning. Curiosity has its own reason for existing." - Albert Einstein
In this test, you will be exposed to the core principles and functionalities that Node.js brings to the table.
Your understanding of asynchronous programming, the event-driven architecture, and the power of JavaScript on the backend will be assessed.
Task:
Develop a simple RESTful API using Node.js and Express that interacts with a mock database (an array of objects). The API should be able to perform CRUD operations on a "book" resource.
Requirements:
Setup and Initialization:
Initialize a new Node.js project.
Install necessary packages (like Express).
Database Mock:
Create an array named books to store book objects.
Each book object should have an id, title, and author.
API Endpoints:
GET/books: Fetch all books.
GET/books/:id: Fetch a single book by ID.
POST/books: Add a new book. The body should contain title and author.
PUT/books/:id: Update a book by ID.
DELETE/books/:id: Delete a book by ID.
Error Handling:
Implement error handling for invalid routes and methods.
Handle potential errors like trying to fetch, update, or delete a book that doesn't exist.
Grading Rubric:
Setup and Initialization (10 points)
Proper initialization of a Node.js project (3 points)
Correct installation and setup of required packages (7 points)
Database Mock (10 points)
Proper structure of the books array (3 points)
Correct structure for book objects (7 points)
API Endpoints (40 points)
Correct implementation of the GET/books endpoint (8 points)
Correct implementation of the GET/books/:id endpoint (8 points)
Correct implementation of the POST/books endpoint (8 points)
Correct implementation of the PUT/books/:id endpoint (8 points)
Correct implementation of the DELETE/books/:id endpoint (8 points)
Error Handling (20 points)
Proper handling of invalid routes (5 points)
Proper handling of invalid methods (5 points)
Correct error handling for non-existent books in relevant endpoints (10 points)
Code Quality (20 points)
Readability and clarity of code (10 points)
Proper use of asynchronous programming where necessary (10 points)
Inspirational Quotes:
"Invention is not enough. Tesla invented the electric power we use, but he struggled to get it out to people. You have to combine both things: invention and innovation focus, plus the company that can commercialize things and get them to people." - Larry Page
"What you learn from a life in science is the vastness of our ignorance." - David Eagleman
"The biggest risk is not taking any risk. In a world that is changing quickly, the only strategy that is guaranteed to fail is not taking risks." - Mark Zuckerberg
Closing:
"The more I learn, the more I realize how much I don't know." - Albert Einstein
Remember, the journey of learning and innovation never truly ends. Embrace the challenges and continue to push the boundaries of what you know.
Best of luck! The goal is not just to assess their knowledge but to inspire them to dive deeper into the world of Node.js and full-stack development.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (