gui2py a simple & powerful GUI framework (wxpython "wrapper" pythoncard "fork"), alpha released

FYI

I'm working on a PythonCard “fork” (a software construction kit based
on wxpython), trying to enhance it with a more modern look & feel
(improved visual designer, property grid, drag & drop toolbox, etc.)
but keeping it simple and powerful (i.e. adding MVC List, Tree, Grid,
Notebook, Sizers, etc.):

https://code.google.com/p/gui2py/

It was based initially on PythonCard, but also includes a lot of my
experience and personal needs (I'm planning to write a simple ERP-like
system with gui2py).

It is also aimed for teaching in introductory and intermediate
programming courses (prior web development assignments), so it was
simplified even further and adopted some HTML/Javascript features.

As it is not backwards compatible with PythonCard, a lot of code was
changed or removed), I decided to fork it in a new project to not
cause any confusions.

Comments are welcome, and of course, if you are interested, I've
created a separate mailing list where anyone can participate:

http://groups.google.com/group/gui2py

Special thanks to all of the PythonCard's and wxPython's developers

Best regards

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com

I'm working on a PythonCard “fork” (a software construction kit based
on wxpython), trying to enhance it with a more modern look & feel
(improved visual designer, property grid, drag & drop toolbox, etc.)
but keeping it simple and powerful (i.e. adding MVC List, Tree, Grid,
Notebook, Sizers, etc.):

Google Code Archive - Long-term storage for Google Code Project Hosting.

Just a few questions:

- Does the framework only support the "active record" pattern?
- Does it support composite primary (and foreign) keys?
- Does it care/provide for resolution of conflicts between concurrent
updates/inserts/deletes by different clients or does it follow a
"philosophy" like "the last client that commits wins"?
- How about internationalisation?
- On which OSes does it get actually used/tested by the developers?

TIA,

Sincerely,

Wolfgang

I'm working on a PythonCard “fork” (a software construction kit based
on wxpython), trying to enhance it with a more modern look & feel
(improved visual designer, property grid, drag & drop toolbox, etc.)
but keeping it simple and powerful (i.e. adding MVC List, Tree, Grid,
Notebook, Sizers, etc.):

Google Code Archive - Long-term storage for Google Code Project Hosting.

Just a few questions:

- Does the framework only support the "active record" pattern?

Yes, it supports web2py's Data Access Layer (similar to an ORM but
more relational/sql-oriented).
You can see the old example (the one included in the web2py coockbook
packt book) here:

https://code.google.com/p/gui2py/wiki/Web2pyExample

The updated forms exaple is in the repo:

https://code.google.com/p/gui2py/source/browse/forms_example.py

I've to update and polish the html forms support (like better controls
for numeric/date inputs, enhanced validation pop-up messages, etc.)

- Does it support composite primary (and foreign) keys?

Yes, web2py DAL support composite and non autonumeric primary keys,
altought some restrictions apply, but for queries and forms it works
very nice (even with legacy databases).

- Does it care/provide for resolution of conflicts between concurrent
updates/inserts/deletes by different clients or does it follow a
"philosophy" like "the last client that commits wins"?

Yes, web2py DAL Form processing funtions can handle that kind of
issues (for example, checking field values to see if they have been
updated)

- How about internationalisation?

I'm in doubt about using web2py's Translation mechanism (T helper),
wxPython localization featues or Python's one (gettext).
I think I'll use web2py T helper as it is the easiest and already well
supported on web2py.
Anyway, I think it could be done transparently, in labels and text
specs of controls (under the hood).

- On which OSes does it get actually used/tested by the developers?

I've tested it in the OS listed in the quick start guide (WinXP, Win7,
Win8, Ubuntu 12.04+, Mac OS x 10.6):

https://code.google.com/p/gui2py/wiki/QuickStart

Also I provide there some unofficial packages to ease the installation
of wxPython 2.9 on Ubuntu.

Best regards and thanks for the interest,

Mariano Reingart
http://www.sistemasagiles.com.ar

···

On Mon, Apr 8, 2013 at 3:49 PM, Wolfgang Keller <feliphil@gmx.net> wrote:

> - Does the framework only support the "active record" pattern?

Yes,

Note the word "only" - I assume that it would not support complex
mappings between "business objects" and database schema?

> - Does it support composite primary (and foreign) keys?

Yes, web2py DAL support composite and non autonumeric primary keys,
altought some restrictions apply,

Which ones? I have to work with somewhat non-trivial schemas, involving
hundreds of tables with composite primary and foreign keys up to more
then 10 columns of arbitrary types.

> - Does it care/provide for resolution of conflicts between
> concurrent updates/inserts/deletes by different clients or does it
> follow a "philosophy" like "the last client that commits wins"?

Yes,

Hey, that was an "either or" question, not a "yes/no" question. >;->

web2py DAL Form processing funtions can handle that kind of
issues (for example, checking field values to see if they have been
updated)

The question was more about how "automatic" such functionality would
be.

PostgreSQL, for example, provides a notification system for the
clients. As does Firebird. It would be nice if a framework would allow
to declare some model class or GUI view to be "always up to date" in a
simple way.

Since I'm coming from the end-user/domain expert side, I have a serious
aversion against GUIs that display outdated information and/or require
me to "poll" the application to update the GUI. Such behaviour is a
stone-age un-feature. And don't tell me about the application "polling"
the database itself.

Sincerely,

Wolfgang

> - Does the framework only support the "active record" pattern?

Yes,

Note the word "only" - I assume that it would not support complex
mappings between "business objects" and database schema?

Yes, I don't plan any complex "business objects" support.
web2py's models are simple mappings to the database schema (using
python objects btw), where you can enforce validations, set the widget
to be displayed, create virtual fields (computed) or define actions on
updates, just to name a few features.
I think it is enough, and I will not reinvent the wheel, there are
other ORMs and GUI libraries for python to accomplish other use cases.

In fact, gui2py controls can work without any database, just like pythoncard.

The framework data-model layer goes above.

> - Does it support composite primary (and foreign) keys?

Yes, web2py DAL support composite and non autonumeric primary keys,
altought some restrictions apply,

Which ones? I have to work with somewhat non-trivial schemas, involving
hundreds of tables with composite primary and foreign keys up to more
then 10 columns of arbitrary types.

Any combination should work if supported by the database;

http://web2py.com/books/default/chapter/29/06#Legacy-databases-and-keyed-tables

> - Does it care/provide for resolution of conflicts between
> concurrent updates/inserts/deletes by different clients or does it
> follow a "philosophy" like "the last client that commits wins"?

Yes,

Hey, that was an "either or" question, not a "yes/no" question. >;->

http://web2py.com/books/default/chapter/29/07#Detect-record-change

But, in a GUI application, it should be wise to lock the records instead.

web2py DAL Form processing funtions can handle that kind of
issues (for example, checking field values to see if they have been
updated)

The question was more about how "automatic" such functionality would
be.

PostgreSQL, for example, provides a notification system for the
clients. As does Firebird. It would be nice if a framework would allow
to declare some model class or GUI view to be "always up to date" in a
simple way.

Yes, they provide a notification system, but it is not automatic,
AFAIK you'll need to create triggers to raise signals when changes
occur.
And it is a bit more complex, involving transaction isolation levels,
cursors and other database hacks.
It get worse if you have more than one source table to check (for
example, complex queries or views)

It is be doable, for example, the gui2py listview and gridview
controls supports a custom model to allow notifications and "virtual"
rows, but it is not my primary concern right now.

Since I'm coming from the end-user/domain expert side, I have a serious
aversion against GUIs that display outdated information and/or require
me to "poll" the application to update the GUI. Such behaviour is a
stone-age un-feature. And don't tell me about the application "polling"
the database itself.

It would be a nice feature (and in fact, I plan to support only
postgresql to enable such things)., but sadly I have other priorities.
If you have or know about an implementation I'll be glad to see/add it :wink:

Thanks

Mariano Reingart
http://www.sistemasagiles.com.ar

···

On Sun, Apr 14, 2013 at 11:06 AM, Wolfgang Keller <feliphil@gmx.net> wrote: