flexxui / flexx

Write desktop and web apps in pure Python
http://flexx.readthedocs.io
BSD 2-Clause "Simplified" License
3.25k stars 258 forks source link

Flexx lacks of a lot of features #735

Open NolanG241 opened 1 year ago

NolanG241 commented 1 year ago

hi,

after doing some tests and creating classes of my own to try and build a saas/spa with flexx, i come to the conclusion that flexx lacks of a lot of features to archieve that for me.

here are some points:

in the past i worked with Qooxdoo do build rich web interfaces, but the development structure (having a javascript frontend (gui) and some server routines in a different language) drove me to flexx.

having one framework for both server and frontend is really nice and i love python :)

greetings nolan

almarklein commented 1 year ago

Thanks for the suggestions 👍

jrversteegh commented 1 year ago

@NolanG241 Good suggestions. With respect to "data binding": I've worked a lot with Delphi, which has very extensive data binding options and I found these options tempt you into bad practice. In particular, they'll lure you into mixing UI functionality with business logic thus preventing you from for example implementing a more robust pattern like MVC. The same is true for validations: should preferably be done server side imho, because validations typically are part of your model's requirements which should not be implemented by the UI. Historically this was done a lot, because communication between web client and server was either expensive/slow or hard to implement, but this is often no longer true these days. flexx' event handling system is extremely good at doing server side validation i.e. validation outside the context of the widget itself.

NolanG241 commented 1 year ago

okay,

i see the point. but then we need a validation procedure/handling on the python side to trigger events on which the form listens to display some errors.

while fiddling a litte bit more, i stumbled on the multi inheritance problem / missing feature. it would be nice to somehow make mixins work, so it would be easier to add new functionality to existing flexx classes, eg the possibility to hide or show widgets.

greetings nolan

NolanG241 commented 1 year ago

hi,

i setup a repo of my own for testing different python gui web frameworks.

https://github.com/NolanG241/python_gui

my_flexx.app contains a dragable window test.

in common.flexx there are some form-model binding tests.

greetings nolan