Data operations in tRPC router

Hi guys, I'm wondering if a router is a good place to operate on data. That's a dummy example, it works. But in more complicated calculations is it a good practice?
5 Replies
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
cje
cje16mo ago
split files when it gets difficult to read otherwise i tend to err on the side of big files because unnecessary abstractions also come with a cost regarding breaking the logic out from the router, i don't really do this unless i need to call the logic from somewhere else you could do like a design patterns type architecture where your db calls live in services etc but honestly if you're building an app that needs this sort of complexity then maybe trpc isn't the best choice anymore
cement
cement16mo ago
Thanks a lot guys. @cje at the moment i'm just tryna get into it a bit, but could you please tell me what kind of stuff would be better than tRPC to projects like that?
cje
cje16mo ago
I tend to build small stuff fast so not too knowledgeable on this sort of stuff. But heard good things about C#, Kotlin, and I guess Nest.js if you want to stick with typescript. Just be aware that you’re paying a large cost in agility when you go for these sorts of things
cement
cement16mo ago
@cje i've watched your video, great material, thanks for response
Want results from more Discord servers?
Add your server
More Posts