Giter Club home page Giter Club logo

alura-node-express-mongo's Introduction

Node.js course: creating a Rest API using Express and MongoDB

Links

alura-node-express-mongo's People

Contributors

matheuscardhosoo avatar

Stargazers

Vagner Lucas Gomes avatar

Watchers

 avatar

alura-node-express-mongo's Issues

Add Pagination

Description

Implement pagination functionality to improve the user experience of navigating through large sets of data.

Resources

API Request Validation Solution

Objective

The objective of this task is to study and understand a solution for validating API requests. This includes validating parameters, query strings, request bodies, and headers.

Steps

  1. Research different API request validation libraries or frameworks available for Node.js, such as express-validator, joi, ajv, celebrate, or any other popular solution.
  2. Read the documentation and explore the features and capabilities of each library or framework.
  3. Compare the pros and cons of each solution based on factors such as ease of use, flexibility, performance, and community support.
    • The integration with Express.js should be considered as well.
    • The ability to generate a OpenAPI (Swagger) documentation based on the validation rules should be considered.
  4. Implement the chosen solution into the alura-node-express-mongo project.
  5. Test the API endpoint with different types of requests, including valid and invalid inputs, to verify the validation behavior.
  6. Document your findings, including any challenges faced, lessons learned, and recommendations for using the chosen solution.

Resources

  • Official documentation of the chosen API request validation library or framework.
  • Online tutorials or blog posts related to API request validation.
  • Stack Overflow or other developer forums for troubleshooting and community support.

Submission

Submit your study findings and any code samples or documentation created during the study.

Implement the Use Case concept into de Business Layer

Objective

The objective of this task is to implement the Use Case concept into the Business Layer of the project alura-node-express-mongo.

  • With this implementation, the business logic will be encapsulated in Use Cases, removing business logic from the Adapter Layer (Controllers, Repositories). This will help to separate concerns and make the codebase more maintainable and testable.

Steps

  1. Study the concept of Use Cases in the context of software architecture and design patterns.
    • Use Cases should in a Atomic way represent a single business action that performs a group of related tasks.
  2. Identify the business logic in the existing project that can be encapsulated in Use Cases.
  3. Create Use Cases for the identified business logic, following the principles of encapsulation, single responsibility, and separation of concerns.
  4. Refactor the existing codebase to use the newly created Use Cases.
  5. Test the application to ensure that the business logic is working correctly after the refactoring.
  6. Document the changes made, including any challenges faced, lessons learned, and recommendations for using the Use Case concept in the Business Layer.

Plus

  • Understand how to use Use Cases to manage a chain of independents and asynchronous Use Cases.
    • For this, the Use Cases should be able to work as a Asynchronous Job that can be chained with other Use Cases.

Resources

  • Articles, blog posts, or tutorials on the concept of Use Cases in software architecture.
  • Online courses or documentation on refactoring and code organization.
  • Code examples or open-source projects that demonstrate the use of Use Cases in Node.js applications.

Submission

Submit your implementation of Use Cases in the Business Layer, along with any documentation or code samples created during the task.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.