img

Needed help to refactor my code

suppose i'm following controller->service->repo structure, what if service of one domain calls the repo of another domain, can we do this? for examle there is a repo that basically deals with gold prices fetching the latest gold price from the dB, and it has it's own service layer and then i have another class called as Payment Service that deals with creating payment request so in order to get the latest gold price can my payment service call gold repo, or i should create an entry inside the payment repo that basically calls the goldPrice repo and then gives the data to payment service class. Needed help on this.

img

Kafkaa

Uber

8 months ago

img

eleCtrik

SAP

8 months ago

img

Kafkaa

Uber

8 months ago

img

RedbullMax

Microsoft

8 months ago

img

eleCtrik

SAP

8 months ago

img

RedbullMax

Microsoft

8 months ago

See more comments
img

grapewinegpt

Publicis Sapient

8 months ago

img

grapewinegpt

Publicis Sapient

8 months ago

img

eleCtrik

SAP

8 months ago

Sign in to a Grapevine account for the full experience.

Discover More

Curated from across

img

Software Engineers on

by SpydrJug10

SaaS

Getting overshadowed in tech team

I work in a small startup, we have 10 people in Frontend Team. 2 SDE-2, rest all SDE-1. I joined as Sde-1, when I joined them, we were 4(2 SDE-2 and 2 SDE-1). At the time of joining, they had a messy codebase, nobody cared about writing good, optimized code etc. Whenever I got chance to work on old feature, I used to re-write entire code from scratch, made reusable functions, components and moved common functionalities there, all these made the UI better, platform stable. Worked on optimization and performance. These folks never cared about all these things. Also started peer reviewing everyone's PRs, explained them various design patterns and made them write re-usable components, optimized, bug-free code and other things. Now I came to know, all these efforts of my mine never reached my manager to due manipulation by one of the SDE-2. My manager likes this guy and allowed him to handle the FE team. This guy has shown that he's the one who took all these initiative and he got all these things done by the team. He involved the other SDE-2 in this game. Fast forward 1 year, I see most of my code has been slightly modified by him, moved to new file and my actual file is deleted. He has done this in order to remove my GitHub history. I'm now getting frustrated and don't know how to handle this. Resigning is not an option and raising with manager won't help as he's slightly biased and won't believe me. Any help would be appreciated. TIA