Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Congratulations on shipping. The demo looks great.

I see views and controllers in the documentation, but the only mention of model is that "model" is a reserved directory. What are your plans for models and persistence?



Thanks for your comment and question @onionisfruit. Top-notch handle too!

>> What are your plans for models and persistence?

I haven't worked out all the details, but it's going to be some blend of https://github.com/xo/xo and https://sqlc.dev/.

Design goals:

1. High-level, type-safe "ORM" that's generated from your database schema.

2. sqlc as a fallback to cover the more complex SQL queries in a type-safe way.

The hard part is going to figuring out how to support extending the ORM with your own custom methods, hooks, computed fields etc.

What do you think?


Your design goals look good to me. I think this will be one of the hardest parts to get right, so it's probably wise to save it for later so you can learn from implementing the rest of your design first.


First steps can be to use git diff and select what’s changed. Bulk of the heavy lifting will still be responsibility of ORM (sqlc). Later on this experience can be streamlined.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: