252 karma · joined Mar 24, 2015 (11y ago) · 78 submissions
31.
Comparison of Mesop with Streamlit and Gradio(google.github.io ↗)
3 points · by willchen · 2y ago · 1 comment
comment 2y ago · link · parent
I guess one funny thing is that I actually identify as a FE developer more than a Python developer :) I've been doing FE for much longer than Python and agree that there's warts on both sides (and no language/ecosystem is perfect). For me, a lot of the FE fatigue comes from all the inherent challenges with developing client-side applications (e.g. the necessity of bundling/minifying for optimizing performance, transpiling for legacy browsers) so I don't say this to throw stones at the other side but simply to point out my own fatigue having dealt with this complexity for years.
Right now Mesop is definitely more focused on the demo use cases, but we're also trying to push the limits of the kinds of apps you can build in Python so it doesn't have to be something you throwaway when you want to deploy a scalable app.
[1] https://google.github.io/mesop/internal/architecture/#life-o...
comment 2y ago · link · parent
Since then, we've made a lot of updates to Mesop, including adding support for web components which allows you to write custom JS and wrap existing JS libraries.
We've also fully re-designed our home page at https://google.github.io/mesop - with many more code examples and demo, which hopefully shows how Mesop is different than some of the other Python UI frameworks out there.
As always, appreciate any feedback about the project. Thanks!
35.
Is Mesop and Web Components the cure to Front-end fatigue?(google.github.io ↗)
12 points · by willchen · 2y ago · 12 comments
comment 2y ago · link · parent
What helped me the most was looking at other projects using Bazel with similar tech stacks and then assembling it together, e.g. :
- https://github.com/angular/components - https://github.com/tensorflow/tensorboard
Alex Eagle of https://www.aspect.build/ has a lot of great resources on using Bazel - both on YouTube and the aspect website.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
Mesop also drew inspiration from frameworks like LiveView (for Elixir/Phoenix) https://hexdocs.pm/phoenix_live_view/welcome.html which have demonstrated the viability of building server-driven web UIs for a number of years now.
comment 2y ago · link · parent
Where I think Mesop shines is that you get a lot of flexibility, just by writing your UI in Python. For example, Mesop has an out-of-the-box [chat component](https://google.github.io/mesop/demo/), but if you need to customize it, you can actually just copy the [chat.py file](https://github.com/google/mesop/blob/main/mesop/labs/chat.py) and customize it however you want.
In comparison, Streamlit is great to get started with, but once you're trying to do some complex customizations, you'll often need to write your own React/TypeScript component.
I think the other thing is that Mesop has a [different philosophy for building UIs](https://google.github.io/mesop/blog/2024/05/13/why-mesop/) (e.g. based on functions) which results in a distinctly different developer experience. This is, of course, subjective, but I think the Mesop approach scales well as your app grows (e.g. thousands of lines), which even internal tools and demos oftentimes do.
comment 2y ago · link · parent
If you like tailwind, I think you will like this as it's essentially like writing inline styles, but with a Pythonic, strongly-typed API.
comment 2y ago · link · parent
comment 2y ago · link · parent
I think supporting Python -> WASM could be one of the options we support, but there's probably always a need to support Python on the server, simply due to the ecosystem (e.g. dependencies) that's around it.
[1] https://pyodide.org/en/stable/project/roadmap.html#reducing-...
comment 2y ago · link · parent
Re: flet - flet intentionally takes a more imperative approach whereas Mesop embraces a declarative UI approach (as popularized by React, et al). I think the declarative UI approach scales better as apps get more complex, but I think the best way to see the difference is to look at some of the examples and see which approach you like more.
Re: nicegui - at the high level, there's definitely some similarities with the component-centric UI model. The data binding/state management works quite a bit differently and Mesop's approach provides stronger type-safety and, IMO, is more Pythonic, but that said, there's a lot of good options in this space and I think it's neat to look at all the innovation that's happening here, and ultimately, some of this is based on aesthetics and how you like to code your UIs.
comment 2y ago · link · parent
I haven't used it personally (this is separate from mesop), but it looks like a way to program desktop guis (among other platforms ( in Python
comment 2y ago · link · parent
If you take a look at the "table" example on the demo gallery: https://google.github.io/mesop/demo/ it shows how to use Pandas w/ Mesop, so I'm not sure what's going on.
comment 2y ago · link · parent
Take a look at https://google.github.io/mesop/internal/architecture/ for an explainer on how the client-server interaction works and let me know if you have any questions!
comment 2y ago · link · parent
For example, the demo gallery (https://google.github.io/mesop/demo/) itself is a Mesop app which is hosted on Cloud Run
52.
Show HN: Mesop – Open-source Python UI framework(google.github.io ↗)
130 points · by willchen · 2y ago · 54 comments
comment 8y ago · link · parent
If everyone contributes their pet UI feature (e.g. custom theme, use XYZ monospace font), then there will be dozens of features that only 0.01% of users use, but it increases the overall complexity of the product and maintenance burden.
58.
Prettier now supports Typescript(github.com ↗)
2 points · by willchen · 9y ago · discuss
59.
Expo for React Native SDK v17.0.0 is now available(blog.expo.io ↗)
2 points · by willchen · 9y ago · discuss
comment 9y ago · link · parent
https://docs.microsoft.com/en-us/azure/documentdb/documentdb...