Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] 1. Add Data transfer object(DTOs) 2. use builder pattern #52

Closed
1 task done
anishmu20 opened this issue Oct 2, 2024 · 9 comments
Closed
1 task done
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers gssoc GirlScript Summer Of Code gssoc-ext hacktoberfest hacktoberfest-accepted level2 GirlScript Summer Of Code - 25 points status: ready for dev You can asked for this issue to be assigned (if not already assigned)

Comments

@anishmu20
Copy link
Contributor

Is this feature already requested?

  • I have checked "open" and "closed" issues, and this is not a duplicate.

Problem or Missing Functionality

When an API is requested, the controller receives the request and calls the corresponding method in the service layer. The service layer contains the business logic and interacts with the repository to fetch or modify data. In this process, instead of directly exposing the entity (which represents the database structure), it is a good practice to use DTOs Data Transfer Objects to handle the data that is sent back to the client. This ensures that the internal structure of the entity is not exposed directly, enhancing security and flexibility in modifying the API's output structure without affecting the database layer.

Feature Description

Workflow
1.Controller:Receives API requests from the client.
2.Controller -> Service Layer: The controller delegates the logic execution to the service layer.
3.Service Layer: Applies business logic and interacts with the repository to modify or fetch data.
4.Repository: Interacts with the database to perform data operations.
5.DTO (Data Transfer Object): Instead of exposing the database entity directly, the service layer converts entities to DTOs, ensuring that the internal database structure is not exposed to the client.
6.Entity -> Database: The entity represents the database structure, but it's used internally without being directly exposed.
Assign me this task under gssoc-ext tag

Screenshots

No response

Would you like to work on this feature?

Yes

Implementation Plan

The plan is to first create Data Transfer Object (DTO) classes to decouple the entity from the exposed API structure. Then, modify the service layer logic to work with these DTOs, ensuring clean data handling between layers. Finally, the service layer will be refactored to use the Builder Pattern for constructing DTOs, improving flexibility and readability in object creation.

@anishmu20 anishmu20 added the status: awaiting triage Waiting for maintainers to verify (please do not start work on this yet) label Oct 2, 2024
@ajaynegi45 ajaynegi45 changed the title [FEATURE] <brief description> 1. Add Data transfer object(DTOs) 2. use builder pattern [FEATURE] 1. Add Data transfer object(DTOs) 2. use builder pattern Oct 2, 2024
@ajaynegi45
Copy link
Owner

Hi @anishmu20,

Thank you for expressing your interest in working on the "1. Add Data transfer object(DTOs) 2. use builder pattern" issue. I'm delighted to inform you that I have assigned this issue to you. Your willingness to contribute to our project is much appreciated.

Feel free to start working, and if you have any questions or need assistance during the process, please don't hesitate to reach out.

@anishmu20
Copy link
Contributor Author

will this task consider under gssoc-ext ?

@ajaynegi45 ajaynegi45 added enhancement New feature or request good first issue Good for newcomers hacktoberfest-accepted hacktoberfest status: ready for dev You can asked for this issue to be assigned (if not already assigned) gssoc GirlScript Summer Of Code gssoc-ext and removed status: awaiting triage Waiting for maintainers to verify (please do not start work on this yet) labels Oct 2, 2024
@ajaynegi45
Copy link
Owner

will this task consider under gssoc-ext ?

Yes

@ajaynegi45 ajaynegi45 added the level1 GirlScript Summer Of Code - 15 points label Oct 2, 2024
@andrade-filipe
Copy link

i'd like to work on this issue! i also requested on Optimize Database Queries to Reduce the Number of Calls #24 , i want to help both issues

@andrade-filipe
Copy link

@anishmu20 i need to contact you, so we can work together and not on 2 different branches

@ajaynegi45 ajaynegi45 added level2 GirlScript Summer Of Code - 25 points and removed level1 GirlScript Summer Of Code - 15 points labels Oct 2, 2024
@anishmu20
Copy link
Contributor Author

anishmu20 commented Oct 4, 2024

task done PULL REQUEST done i have doubt related to the project i need to discuss @ajaynegi45 .

@ajaynegi45
Copy link
Owner

task done PULL REQUEST done

contact me on linkedin

@shubham7151
Copy link

HI there, Hope you all are well,
I found this repo under hacktoberfest , project seem interesting and actively growing would like to share my views and contribute towards this issue.
looking forward to hear back
Thanks!!
@ajaynegi45

ajaynegi45 added a commit that referenced this issue Oct 7, 2024
@ajaynegi45
Copy link
Owner

project seem interesting and actively growing would like to share my views and contribute towards this issue.

This is solved and you can contribute other issues or projects.

all project: https://bento.me/codiescoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers gssoc GirlScript Summer Of Code gssoc-ext hacktoberfest hacktoberfest-accepted level2 GirlScript Summer Of Code - 25 points status: ready for dev You can asked for this issue to be assigned (if not already assigned)
Projects
None yet
Development

No branches or pull requests

4 participants