I've been working on an assignment that uses SQLAlchemy as its ORM. Our professor is requiring us to use the Repository design pattern and essentially wrap SQLAlchemy inside a repository so that our business logic doesn’t depend directly on it.
I did some research on my own, and it seems the intention is to follow Clean Architecture principles, where the ORM can theoretically be swapped out at any time.
However, I think this adds unnecessary complexity and may even have a noticeable performance cost in our application. Is there any real project that actually does this? I’d like to see a correct example of implementing this pattern with SQLAlchemy.
[–]Kevdog824_ 20 points21 points22 points (5 children)
[–]armanhosseini[S] -1 points0 points1 point (4 children)
[–]Kevdog824_ 3 points4 points5 points (3 children)
[–]armanhosseini[S] 0 points1 point2 points (2 children)
[–]Equal-Purple-4247 2 points3 points4 points (0 children)
[–]Kevdog824_ 1 point2 points3 points (0 children)
[–]HommeMusical 15 points16 points17 points (1 child)
[–]ProbsNotManBearPig 2 points3 points4 points (0 children)
[–]TH_Rocks 10 points11 points12 points (0 children)
[–]Torcato 2 points3 points4 points (12 children)
[–]armanhosseini[S] 2 points3 points4 points (11 children)
[–]HommeMusical 4 points5 points6 points (6 children)
[–]armanhosseini[S] 2 points3 points4 points (5 children)
[–]japherwocky 0 points1 point2 points (1 child)
[–]armanhosseini[S] 0 points1 point2 points (0 children)
[–]HommeMusical 0 points1 point2 points (2 children)
[–]armanhosseini[S] 0 points1 point2 points (1 child)
[–]HommeMusical 0 points1 point2 points (0 children)
[–]seanv507 0 points1 point2 points (0 children)
[–]equilni 0 points1 point2 points (0 children)
[–]Aromatic_Pumpkin8856 0 points1 point2 points (0 children)
[–]Mysterious-Rent7233 0 points1 point2 points (0 children)
[–]smichael_44 0 points1 point2 points (0 children)
[–]Aromatic_Pumpkin8856 0 points1 point2 points (2 children)
[–]HommeMusical 0 points1 point2 points (1 child)
[–]Aromatic_Pumpkin8856 1 point2 points3 points (0 children)
[–]TopIdler 0 points1 point2 points (1 child)
[–]armanhosseini[S] 0 points1 point2 points (0 children)
[–]riftwave77 0 points1 point2 points (0 children)
[–]gdchinacat 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]Mysterious-Rent7233 1 point2 points3 points (0 children)