Комментарии:
You’re not talking about the cons of tRPC :
- can’t upload files
- need a monorepo/monolith for types, you can’t separate backend and frontend
- require JavaScript on front and back
Go with NestJS if you are working on a company project, you have an auth system, queues and everything ready for you with REST endpoints.
this is 10x more complicated than SOAP is. plus its 10x less safe than SOAP is. And more complicated. did I mention unsafe? Its stupid!
Ответитьz,string is a good idea to typesafe? really? what's next? sNameOfVariable or strNameOfVariable? or // this is a string z.stringNamedVariable? just drop javascript forever!
ОтветитьSOAP!!! SOA discoverability. Javascript sucks!!!
Ответитьthats why we have soap!!! but you millenials front end (cant code) said its too difficult
ОтветитьI am using REST and just waited for GraphQl to die and now will wait for tRPC to die too
ОтветитьNew video: is RSC and Server Actions the end of tRPC?
ОтветитьI can't pass Date property
ОтветитьMany thanks for explanation! You definitly should try to make RAP))
ОтветитьWhat if the trpc project is a standalone project ? How do we go on getting that type safety across multiple UI apps ?
Is there a way to expose the typing alone ?
Do you use mailgun to send us those weekly newsletters?
Ответитьtrpc loses all appeal once you realize you need to use JavaScript as a backend language to use it - who in their right mind would do such a thing?
ОтветитьThank you
ОтветитьIs Frontend and backend written in TS? Yes: use tRPC else: GraphQL;
ОтветитьReagarding the USER const, using uppercase variables indicates that it is constant. Do not modify the contents of an uppercase variables.
ОтветитьGreat video thanks for help me finally understanding trpc
ОтветитьIt sounds like a lot of overhead for very little benefit tbh, since the problem it solves not only will still exist for any external calls, but also can be solved very easily by running regular contract tests.
ОтветитьThank you for this REST/GraphQL comparison. Super helpful!
ОтветитьHow can we exchange type of AppRouter. I mean by Simply loging the AppRouter and create type in our Front End app?
ОтветитьQwik will make all this obsolete. 😅
ОтветитьCan we just use typescript web assembly in the frontend? Just typescript and skip the zod and use whatever back end you want. Java, python, rust, c++, etc
ОтветитьThis misses the point. This problem has been solved with SDKs.
ОтветитьWhenever I see a video shows up on my recommendations, I already know it's a clickbait. I open it just to dislike. Please stop making useless videos like these.
ОтветитьGreat but not scalable, GraphQL works better in MS ecosystem with different languages and requirements
ОтветитьVery useful video and I watched your tutorial. The problem I see (or haven't been able to solve) is that today, middleware can exist in separate projects and be hooked in app.use quite easily.
app.use(userAuthService.initialize());
app.use(captchaService.initialize())
etc etc.
because middleware depends on
const t = initTRPC.context<Context>().create();
t.middleware( BLAH )
and t can only be defined once, I am struggle to see how you can modularise projects.
Maybe I'm missing something.
You can't compare this to REST or GQL. With both those, the expectation is that the server and client code are decoupled - like if you have an API and a UI. With tRPC, it only works if the client and server code are part of the same application. At least that's how I interpret it.
ОтветитьtRPC depends on typescript so no.
ОтветитьLook kid these day 😢
ОтветитьContent is as usual its Awesome.
I have one suggestion to name your title of videos.
You're such a wonderful experience developer.
Everyday in tech world people introduce lot of technologies.
They put effort and release that technology not downgrade any
existing technologies. Everything is a tool and people should upskil
enough to apply in right problem.
OpenAPI Specs and API generators is the way to go!
Ответитьplease share your guitar link, I wanna purchase it!
ОтветитьVery useful video! Looking forward to viewing more
Ответитьwhy not grpc????
Ответитьtalks a lot without saying anything
ОтветитьOmg, just use simple REST, how many of sh** you need to just a build app. Just try to live with this mess in next 5 years and find a dev to support it. It's like kids in sandbox that will do anything just not to build business logic
ОтветитьTRPC is great for monorepos purely built on TS. I don't see how it can be used in companies with microservices written in different languages. GraphQL is still great for letting dev fetch relational data without having to build an API for each combination of entities they want to fetch.
ОтветитьGood content. Please make your face smaller 😂😭 it takes too much space from the code
ОтветитьI haven't worked with any company that has the server and client both together. Normally, they're on different projects. So, GraphQL or REST is still better.
ОтветитьCheck out Deepkit
ОтветитьYou can put backend and frontend in a monorepo envirement and put types in separate package for both . And second , what if you have backend with different technology . Third , your title is misleading to just get attention which is kinda greedy and not cool
ОтветитьHey Kyle, checkout Webstorm it provides a way more better user guidiance out of the box as VS Code. In combination with jsDoc it achives nearly the same as typescript while using javascript.
But without the extra step building the project.
A mature tech like graphql or rest is never going to die they will always have their own space and will be used for years to come.
Ответитьgraphql has nothing to do with tRPC. They are not meant to solve the same problem...
ОтветитьEveryone has probably noticed that a lot of modern practices are now mostly old patterns and principles being rediscovered and adapted to modern ecosystems: RPC, Server-side rendering, Functional Programming, having Types, modular monoliths...
ОтветитьConsider dart!
ОтветитьOh no. Middleware reminds of CORBA...
ОтветитьThing is, everything you've done is in NodeJS. NodeJS is not the only language of communication or of backend or of the client. Server comes in many forms and languages. What if the server is written Golang? What if the client is in Rust? I see tRPC offers a solution only in NodeJS. This is ... very very bad.
GRPC offers a variety of solutions for all these cases and it's already well integrated in IDEs with many plugins and already offers good solutions for client/server.
GraphQL does too and it's easily lintable and usable by frontend as well with errors when you use it incorrectly too.
edit:
tl;dr; I dont see any advantages over GraphQL or GRPC. Both are much more powerful in everyway I can imagine. More libraries, more capabilities.