Live data from Hacker News

FastHTML – Modern web applications in pure Python

fastht.ml

141–150 of 229 posts

Re: FastHTML – Modern web applications in pure Python

#141

Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…

This is fantastic and exactly what I wanted! A very neat idea about how you separate attributes and children.

How does the performance side of this thing look like?

Re: FastHTML – Modern web applications in pure Python

#144
I have no interest on magical sugary functions that make something quick. The modern reactive concept doesn't impress me. What I want is a very well thought-out set of tools that allow me to do anything and everything, because I will be refactoring and fine-tuning my functions a lot, and I will do it my own way, I don't need some automatic shortcut which is not going to help me if I can't modify its full functionality. (I don't mind decorators if they make sense)

I want to see how I can manually wire and create anything I want, is what I'm saying and this demo felt like it capitalized on how fast you can do very simple functionality with a couple of functions, which was a let down.

I want to see how I can route (GET/POST), create a database schema, use the database, use CSS (this is very important) yet what I saw was a simple calls to some database store, and no CSS examples. And "a single python file" sounds unrealistic since anything complex enough is going to be split into a series of files. Maybe I'm not the target audience.

I felt very comfortable using Flask recently because it allowed me to do anything I needed.

I do like the idea of building and manipulating HTML elements through python, so hopefully something good comes out of this.

Re: FastHTML – Modern web applications in pure Python

#146
post #141

Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…

This is fantastic and exactly what I wanted! A very neat idea about how you separate attributes and children. How does the performance side of this thing look like?

I did not measure performance yet, but I definitely will! My hunch is that it's faster than any templating library, because those are compiling from their own DSL, but it's completely ommitted here.

Re: FastHTML – Modern web applications in pure Python

#147
post #123

Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…

At the risk of being ignorant/heretical: Why use this over "raw" templating (e.g. jinja2) at this point?

My suggestion is to just try writing React for a week or two and experience the component based development. You never want to go back to templates again.

Re: FastHTML – Modern web applications in pure Python

#148

Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…

That's why I like django-ninja: it's django with fastapi like features.

But it's fully django compact.

Re: FastHTML – Modern web applications in pure Python

#149

Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…

> Frameworks like this are really next-gen,

How is this next-gen? It looks exactly like all current frameworks in various languages, but with more default functionality thrown in.

Something like Postgrest would, to me, be "next-gen".

I have a private/proprietary backend-based framework that I used for a few clients that has both less "magic" while simultaneously allowing more functionality with even less code than any of the examples in any current framework, including this one.

I find it hard to get impressed these days.

Re: FastHTML – Modern web applications in pure Python

#150
post #123

Earlier quoted context omitted.

At the risk of being ignorant/heretical: Why use this over "raw" templating (e.g. jinja2) at this point?

My suggestion is to just try writing React for a week or two and experience the component based development. You never want to go back to templates again.

I've been writing react for years, and going back to templates, I wish I could never have to write a react rendering function again.

Components are overrated.

Their best feature is that they help build a fantastic ecosystem, which is the biggest react strength.

But for your own website?

Their cons and pros balance each other out, and all that is left is the terrible API that react exposes.

Eventually, you gain locally some reusability (provided you actually need it in your project, because there are not that many components that need reusability, and even less that couldn't be a template tag in django), but every single dev writes react code differently.

So you get a heterogeneous mess anyway.

My last SPA project (in vue), we had one component that was worth making reusable.

One. For a month and a half of work.

Turns out vanilla functions are quite reusable themselves already.

Post reply on HN