top | item 31531149

(no title)

colbyhub | 3 years ago

Lately, I've been wanting to explore the DOD pattern in the world of full-stack web development to see if there would be similar benefits. Might put together a proof-of-concept this weekend!

Has anyone else explored this?

discuss

order

wswope|3 years ago

I've been doing something in this vein for a big personal project, using this python library: https://nackjicholson.github.io/aiosql/.

In short, I'm using a run of the mill stack (Caddy/Gunicorn/Flask/Postgres) - but with the twist that all my core logic is defined in plaintext SQL files, which get bound into namespaced Python methods by aiosql. Routing, error handling, templating, etc. are all done in Python - but data manipulation and processing are outsourced to the DB level. All database object definitions are laid out in a massive, idempotent "init_db" method that gets called at launch, so I can essentially point the app at a fresh instance of Postgres and rebuild from scratch. The design is primarily driven by my personal distaste for ORMs, but I've found it extremely beneficial in terms of rigid typing, integrity checks, and performance.

evilturnip|3 years ago

If it's just to serve CRUD apps or run web sites, bottleneck is network time and browser rendering time, unless you're doing actual data processing.

And if you are doing data processing, easier to use a data science library like Pandas for Python which implicitly have DOD built-in.