Closed vitaly-t closed 7 years ago
@vitaly-t it seems that in the demo the db structure is tightly coupled with the application models? Also the drop/create statements accessible from the application code do not look nice :-)
Apart from the a nice demo ;-)
P.S. using GET for all operations is not clean.
@OrKoN
it seems that in the demo the db structure is tightly coupled with the application models
It is not.
the drop/create statements accessible from the application code do not look nice
Those are simply examples of implementing database repositories, so it is not relevant.
using GET for all operations is not clean
From the demo code:
// NOTE: We implement only GET handlers here, because:
// 1. This demo is to be tested by typing URL-s manually in the browser;
// 2. The demo's focus is on a proper database layer, not a web server.
Why not use the pattern suggested in pg-promise-demo?
It provides a much cleaner approach to implementing the database layer. :wink: