Live data from Hacker News

Show HN: Cot: a Rust web framework for lazy developers

mackow.ski

11–20 of 115 posts

Re: Show HN: Cot: a Rust web framework for lazy developers

#11
post #2

> The ORM is very lacking at the moment and the automatic migration generator only works with a small subset of possible operations, I would have hoped that by 2025, new projects would have moved away from ORMs entirely. They really are a useless abstraction layer that always brings tons of trouble and usually makes queries harder to write. Looking at the first example in the docs https://cot.rs/guide/latest/db-model…

As long as it's still possible to also use SQL queries with it it's fine, right? I know some people who prefer using ORMs and some who like writing SQL.

It’s not fine because ORMs never make sense as an abstraction layer. They try to map concepts that are inherently incompatible. Relational databases are designed around set theory and strict schema constraints, while object-oriented programming relies on hierarchical structures and mutable state.

Re: Show HN: Cot: a Rust web framework for lazy developers

#12
post #2

> The ORM is very lacking at the moment and the automatic migration generator only works with a small subset of possible operations, I would have hoped that by 2025, new projects would have moved away from ORMs entirely. They really are a useless abstraction layer that always brings tons of trouble and usually makes queries harder to write. Looking at the first example in the docs https://cot.rs/guide/latest/db-model…

Nah. The query is $slug == LimitedString::new("cot")

Also, people like ORMs. Type safety is nice too without having to map manually. Sqlx is also great

Re: Show HN: Cot: a Rust web framework for lazy developers

#13

What is the competitive landscape looking like these days for Rust web frameworks? I couldn't help but feel a bit insecure last time I was exploring the various options because none of them seemed to have the maturity or longevity of frameworks from other languages (for obvious reasons). Is there one framework that stands out from the rest from an "investment risk" perspective? In other words, if my company is going…

[deleted]

Re: Show HN: Cot: a Rust web framework for lazy developers

#14
post #9
post #2

> The ORM is very lacking at the moment and the automatic migration generator only works with a small subset of possible operations, I would have hoped that by 2025, new projects would have moved away from ORMs entirely. They really are a useless abstraction layer that always brings tons of trouble and usually makes queries harder to write. Looking at the first example in the docs https://cot.rs/guide/latest/db-model…

Composability is the often cited benefit. As an example, I can do the following in Active Record (Ruby): class Account { where.not(active_at: nil) } belongs_to :user end class User (born_on) { where(birthdate: born_on) } end active_users_with_birthdays_today = Account.active.joins(:user).merge(User.born_before(Date.today)) Contrived, of course, but it's not hard to see how you can use these sorts of things to build u…

[deleted]

Re: Show HN: Cot: a Rust web framework for lazy developers

#15
post #8

Earlier quoted context omitted.

As long as it's still possible to also use SQL queries with it it's fine, right? I know some people who prefer using ORMs and some who like writing SQL.

I don't think it's a good idea to have a mix of both in a codebase, because then you'll have to be good at both - kind of defeats the purpose.

That’s up to each user, no?

Re: Show HN: Cot: a Rust web framework for lazy developers

#16
post #12
post #2

> The ORM is very lacking at the moment and the automatic migration generator only works with a small subset of possible operations, I would have hoped that by 2025, new projects would have moved away from ORMs entirely. They really are a useless abstraction layer that always brings tons of trouble and usually makes queries harder to write. Looking at the first example in the docs https://cot.rs/guide/latest/db-model…

Nah. The query is $slug == LimitedString::new("cot") Also, people like ORMs. Type safety is nice too without having to map manually. Sqlx is also great

> Also, people like ORMs. Type safety is nice too without having to map manually. Sqlx is also great

Don't you get type safety anyway with parameterised parameters?

Re: Show HN: Cot: a Rust web framework for lazy developers

#17
post #2

> The ORM is very lacking at the moment and the automatic migration generator only works with a small subset of possible operations, I would have hoped that by 2025, new projects would have moved away from ORMs entirely. They really are a useless abstraction layer that always brings tons of trouble and usually makes queries harder to write. Looking at the first example in the docs https://cot.rs/guide/latest/db-model…

if you can decompose the query, you can unit test the logic against inmemory sets(or language specific equivalent).

Re: Show HN: Cot: a Rust web framework for lazy developers

#18
post #2

> The ORM is very lacking at the moment and the automatic migration generator only works with a small subset of possible operations, I would have hoped that by 2025, new projects would have moved away from ORMs entirely. They really are a useless abstraction layer that always brings tons of trouble and usually makes queries harder to write. Looking at the first example in the docs https://cot.rs/guide/latest/db-model…

I've yet to see an ORM which doesn't just eventually make everything harder. Especially when it comes to automatic migrations, which seldom seem to take into account production necessities like multi-node deployment, downtime considerations and not destroying your production data silently because it doesn't fit.

Re: Show HN: Cot: a Rust web framework for lazy developers

#19
post #8

Earlier quoted context omitted.

As long as it's still possible to also use SQL queries with it it's fine, right? I know some people who prefer using ORMs and some who like writing SQL.

I don't think it's a good idea to have a mix of both in a codebase, because then you'll have to be good at both - kind of defeats the purpose.

> I don't think it's a good idea to have a mix of both in a codebase, because then you'll have to be good at both - kind of defeats the purpose.

When using an ORM you already have to be good at both for any nontrivial query.

Re: Show HN: Cot: a Rust web framework for lazy developers

#20
Lots of “Rails but for X” projects exist in various states, for various languages, but have failed to gain traction and stand abandoned.

…like, a lot.

I thiiiink, fundamentally, it’s a harder-than-it-looks problem space and if you come out with something that’s rough and broken, it never gains enough critical mass for it to become self sustaining.

What’s the “pitch”? It’s can’t be “Django but for rust but it’s kind of not ready yet”, bluntly.

So it needs to have some outstanding feature or accumulation of features that let it stand out from the other 30 rust web frameworks. Is there something here?

You really need to call out the “why another rust web framework” in more than just terms of ambition, imo.

Post reply on HN