>>>> I use extjs actually.
>>>>
>>>> Reasons: providing a UI definition from the web app as opposed to
>>>> rendered html allows connecting to your web app with clients that are
>>>> not web browsers. For example I distribute a desktop app that users
>>>> can use to talk to the web app. This desktop app also understands the
>>>> JSON UI definition format I use so it can present the user with a UI
>>>> of its own too.
>>>>
>>>> Daniel,
> If you don't mind saying, did you use some library to "understand" the
> JSON UI Definition in your desktop app? Or did you code for it.
> Is the desktop app written in Python?
No, I use a very simple UI definition format that I invented myself,
it's nothing fancy, in python it looks like this for forms:
fiels = [ dict( type='text', name='name', label='Your Name',
not_empty=True ), ........ ]
so it's a list of dicts, each dict defining a form entry. For example
a radio button is defined like this:
dict(
type='radio',
name='sex',
label='Sex',
value=[
dict( name='male', label='Male', checked=False ),
dict( name='female', label='Female', checked=False ) ],
not_empty=False )
These is then parsed by javascript in an obvious way, without using
any library. The desktop app is also written in python and this python
app parses the above list the same way and presents the user with the
appropriate form.
There are sophisticated xml formats for storing all sorts of
sophisticated UI's (for example wx does this I think) but this kind of
stuff is too heavy weight for me, all I need are forms, for which the
above very simple model is sufficient.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---