Earlier quoted context omitted.
You shouldn't need breakpoints 98% of the time. Use flex box and grid. Failing that, try container queries. A really good form is still a PITA. I've been trying to perfect it for years but haven't found anything to sync frontend and backend validation that doesn't suck/involve a lot of boilerplate.
Have you checked out https://kirimase.dev ?
FastUI: Build Better UIs Faster
181–190 of 230 posts
Re: FastUI: Build Better UIs Faster
#182Earlier quoted context omitted.
Well FastAPI was originally based on pydantic 1.x, which was extremely slow (so slow in fact that they removed the benchmarks from the website). I am the author of typedload, a similar library written in pure python. Mostly for fun I started to see how much I could improve performances, benchmarking against other libraries. I was very surprised to find out that pydantic2, despite the rewrite in rust, wasn't overwhelm…
Not the first time I see you try to use any thread related to pydantic or fastapi to market your own library, it’s getting boring.
I maintain an open source library in my spare time for free, that you are welcome to ignore if you find better alternatives.
Re: FastUI: Build Better UIs Faster
#183Earlier quoted context omitted.
You shouldn't need breakpoints 98% of the time. Use flex box and grid. Failing that, try container queries. A really good form is still a PITA. I've been trying to perfect it for years but haven't found anything to sync frontend and backend validation that doesn't suck/involve a lot of boilerplate.
Have you checked out https://kirimase.dev ?
Error: {JSON.stringify(mutation.error.data.zodError, null, 2)}
Formik (https://formik.org/docs/api/errormessage) does OK with the "touched" and "errors" objects, that helps you render out the error messages nicely, next to the inputs, but for my very first use-case I wanted to validate a File input and it seems to struggle with that a bit. Can't do it without suppressing some TS errors but maybe it's an edge case. And it of course doesn't handle the server half of the equation. So.. yeah.Re: FastUI: Build Better UIs Faster
#184Earlier quoted context omitted.
ORMs are bad and I say that as a veteran of Hibernate, Entity Framework (almost every version, including code-first and db-first), E Bean, NHibernate and, worst of all by far, ActiveRecord.
And yeah, you are just reinforcing the GP's point, because all of those are atrocious. I am at the ORMs are bad club, but if you try any of the systems that encode the logic paradigm into their interface, they are a completely different kind of beast. (MS has brought some of it into C# with linq so you can use with the Entity Framework. It's not a fully logic system, and has so many attrition points with the Entity F…
Re: FastUI: Build Better UIs Faster
#185Earlier quoted context omitted.
That's the elevator pitch, but as someone with a middle-tier Android phone and in an area with not that stable mobile connection, those supposely "optimized" pages work much worse than plain old HTML. It's even funny how my phone struggles to even render the home pages of these projects. Developers always find ways to down-compensate gains due to Moore's law and its infrastructure equivalents.
Of course it's slower than plain HTML being delivered from the server. That's not what we're comparing to, and frankly if that approach fits the needs of your project then go ahead and use it. The real comparison point is client rendered SPAs, which is the status quo in web app development that SSR frameworks are competing with. If that's your starting point, SSR is a strict optimization and a significant improvement…
Re: FastUI: Build Better UIs Faster
#186Earlier quoted context omitted.
Why not Python? I've never seen huge differences between Jinja, Razor, or Blade. Is there something about it you find extra annoying?
In Jinja, Razor, or Blade, you write, HTML that you enrich. With FastUI, you write Python.
Jinja:
{% for item in items %}
{{ item }}
{% endfor %}
Blade:
@foreach(var item in items)
{
@item
}
Re: FastUI: Build Better UIs Faster
#187Flet ( https://flet.dev ) might be easier for backend devs as it doesn't assume any web experience at all. You use controls (aka widgets) with events (not request/response) and can build not only web, but desktop and mobile apps - all with a single codebase. Disclaimer: I'm Flet developer.
Thanks for your work on it, and (shameless nudge!) I'm really looking forward to iOS camera access, and easy iOS deployment!
Re: FastUI: Build Better UIs Faster
#188Earlier quoted context omitted.
I think you might be colored by having used a bad system. It's like all those people who say ORMs are bad and evil, and somehow almost all of them have been forced to use Hibernate :P You might want to try (my project) iommi https://docs.iommi.rocks/ It's very different.
ORMs are bad and I say that as a veteran of Hibernate, Entity Framework (almost every version, including code-first and db-first), E Bean, NHibernate and, worst of all by far, ActiveRecord.
Re: FastUI: Build Better UIs Faster
#189Earlier quoted context omitted.
And yeah, you are just reinforcing the GP's point, because all of those are atrocious. I am at the ORMs are bad club, but if you try any of the systems that encode the logic paradigm into their interface, they are a completely different kind of beast. (MS has brought some of it into C# with linq so you can use with the Entity Framework. It's not a fully logic system, and has so many attrition points with the Entity F…
I'm very familiar with Linq and Linq to SQL. It's as close as any ORM got to being "good enough" and was abandoned by Microsoft very early in its lifecycle. Linq in Entity Framework is a minefield of N+1's and excessive eager loading.
1. keeping a log of queries per request with stack traces
2. at the end, checking if there are N+1 problems
3. print a big warning with example SQL and stack trace to the console
During dev if I miss a prefetch_related/select_related the console will start to print gigantic stack traces telling me where the problem is. I don't have these problems in production because I get alerted to them in dev.
These are not only solvable problems but EASILY solvable problems!
(Also, in iommi tables, most of the times it can automatically figure out and do the prefetch/select related for you, further diminishing the problem)