3 ms·
On my company’s latest project we are using Spring Boot on the backend with Typescript and React on the front-end. We are using Swagger for API specs which mean
by JoeyJoJoJr 2y ago
On my company’s latest project we are using Spring Boot on the backend with Typescript and React on the front-end. We are using Swagger for API specs which means we can generate type safe Typescript code for the front-end, including schemas for Zod and Tanstack query functions. With this codegen I can’t see many benefits to using Typescript on the backend, although the project is a rather standard CRUD app. I can understand why you might not want to use Java, but surely there are better backend choices than Java or Node?
I am curious - could you explain how you are benefiting from using Typescript on both back and front end?
- hn_throwaway_99 2y agoI replied in another comment here, https://news.ycombinator.com/item?id=43009065 https://news.ycombinator.com/item?id=43009065. When I've posted this before, the main objections I've got have usually been from the perspective on individual developers, or stuff like "you can't actually share a ton of code between front-end and back-end". That's not my primary point (though there are some places where it is nice to share code, e.g. input validation that you may want to run on the client for user experience/performance reasons but then that you also need to run on the backend for security reasons). The biggest benefit I've seen is in team dynamics which results in bugs getting fixed faster and new features getting added faster because it's easier for team members to "cross" backend/frontend boundaries.