News for hackers. Stuff that matters.
Re:How to Design Software Architecture for Startups by bcrosby95 on Monday May 08, 2023 @12:54PM (#35863956)
Is it normal for people to just splat their database across the wire? Because that seems pretty terrible. We wrap every API response in a DTO and are deliberate about picking and choosing which fields we want to expose. Anything else sounds like a recipe for bad times.
Re:How to Design Software Architecture for Startups by mjr00 on Monday May 08, 2023 @01:08PM (#35864149)
I think it is both an awful idea and very common. In the early stages your database looks very similar (if not identical) to what you want your API to look like, so it's very tempting to reduce boilerplate by having your API and database objects use the same data structures internally.
Re:How to Design Software Architecture for Startups by jdkoeck on Monday May 08, 2023 @02:37PM (#35865368)
Yep, it’s a terrible idea but that’s exactly what frameworks like Rais push you to do.