Show HN: Cot: a Rust web framework for lazy developers
1–10 of 115 posts
Re: Show HN: Cot: a Rust web framework for lazy developers
#2I 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-models/#retrieving-models
let link = query!(Link, $slug == LimitedString::new("cot").unwrap()).get(request.db()).await?;
I really don't get the point, and that'll certainly get worse with any somewhat non-trivial query.Why go through all the trouble of reinventing a new DSL when the SQL equivalent would be so much cleaner?
SELECT * FROM link WHERE slug = 'cot';Re: Show HN: Cot: a Rust web framework for lazy developers
#3Re: Show HN: Cot: a Rust web framework for lazy developers
#4Blog post date says 18th February 2024. Is this a 1yr anniversary post, or a typo? :)
Re: Show HN: Cot: a Rust web framework for lazy developers
#5Blog post date says 18th February 2024. Is this a 1yr anniversary post, or a typo? :)
Re: Show HN: Cot: a Rust web framework for lazy developers
#6I wonder how this par with something like https://loco.rs/
Re: Show HN: Cot: a Rust web framework for lazy developers
#7> 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…
Re: Show HN: Cot: a Rust web framework for lazy developers
#8> 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.
Re: Show HN: Cot: a Rust web framework for lazy developers
#9> 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…
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 up record sorting, filtering, etc. Doing this by hand wouldn't be very fun.Re: Show HN: Cot: a Rust web framework for lazy developers
#10Is there one framework that stands out from the rest from an "investment risk" perspective? In other words, if my company is going to choose a framework to build a website, which one has the lowest odds of burning me by becoming abandoned or unsupported?