Hacker News new | ask | show | jobs
by pc2g4d 3263 days ago
I'm a Rocket fan and glad to see this big slate of improvements. On the other hand, I do want to register a bit of concern regarding the plan to add "first-class database support" for 0.4. I hope that doesn't result in a close coupling to any particular database, or to using a database in general.
2 comments

Database support will live outside of Rocket's core in Rocket's contrib [0] library. Everything in contrib is implemented independently of Rocket and is entirely optional to use. The implementation will be database agnostic and extensible to any database. I'm a big believer in pluggable, optional components with no forced decisions [1], and database support will follow the same philosophy.

[0]: https://api.rocket.rs/rocket_contrib/index.html

[1]: https://rocket.rs/guide/introduction/#foreword

That's great to hear!
Isn't Postgres worth coupling to? SQLite is a close favorite, for different reasons.
Web servers and database management are two vastly different domains. I'm wary of frameworks that attempt to impose an opinion on both.
Rocket isn't a web server, it's a web framework. That's what frameworks should do, impose opinions on things to get all the best practices sorted.
As someone who only uses Postgres and SQLite: No. It's not.

People inevitably have to deal with preexisting systems they can't modify for their needs.

Should a framework optimize for the vanishingly rare case?
Integrating with legacy systems (that one cannot, or is difficult to modify) a vanishingly rare case? Thats... quite an assumption.
Is it the majority of cases?