Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Type-driven development has been a big win for me as well, specifically when writing web front ends. Whether its client side rendering (sometimes a necessary evil) or on the server with a tool like Astro, I try really hard to start by defining types and UI components totally separately.

I'll actually build out the full data flow and UI components in complete isolation, leaving the glue code for the final step. Its kind of a weird pattern from what I've seen, I have gotten some interesting code reviews over the years, but it really is nice focusing on one concern at a time. At the end its also fun watching a bit of glue code wire up the entire app.



I think this is definitely the best way. It feels like you're violating DRY, but you're not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: