• 2 Posts
  • 126 Comments
Joined 1 year ago
cake
Cake day: July 22nd, 2023

help-circle



    1. See GetOffMyLan’s comment. An application will have a finite set of queries it needs to make. Depending on the complexity you may have to enumerate them, but sometimes you can build them up dynamically, or even come up with SQL that will cover multiple cases depending on parameter values.
    2. I think GetOffMyLan’s advice applies here too.

    When you’re creating a layered architecture you want to limit a lower layer from knowing what’s above it. If you tightly couple your data layer to the view then you lose flexibility. Imagine having to implement some batch processing features that don’t involve the web.

    A lot of this is overkill for a small app so if some it seems pointless it may be because there isn’t a team of devs working on the same codebase.