python - Writing for both PySide and web2py -
background: have desktop app i've written in python27x uses wxpython
ui , requests
xml.etree.elementtree
retrieve open data restful service , present data in meaningful ways user.
i re-writing app using pyside
. can present data-candy in html5
, provide web-app using web2py
, javascript
.
the pyside
, web2py
versions both need support:
- aquiring lock on
throttle
object i've made handle fair-usage policy of service. - presenting analyzed data in tables links or buttons retrieving or donwloading more related data.
- presenting lists of related data , highlighting groups of items on mouse-over of member of group.
- presenting text documents , providing automatic searching / highlighting of keywords / part-of-speech tagging using
nltk
. - providing basic graphs , charts of various stats on data.
question: given i've told app, , assuming web2py
, html5
can meet user-interface / presentation needs, steps can take / widgets should use in making pyside
desktop app maximize re-use when porting on web2py
? should sure avoid when writing desktop version?
you need separate data , data-processing user interface. qt (and pyside) has strong focus on model-view approach (see e.g. http://qt-project.org/doc/qt-4.8/modelview.html), , provides models organize data, , views present data. within qt, approach allows use multiple views on same data sets, without having worry how data in view.
admittedly, qt models take time used to, aforementioned tutorial should give pointers , references started. in case, go following approach:
- find/extend suitable qt model manage data
- use data standard/custom views in pyside application
- develop web2py-based view present data in webapp
i'm not familiar web2py, can't assess how hard/easy last step be. however, can recommend invest time (if have it) in getting know qt model-view framework, can save huge amounts of time in future (at least, in experience).
Comments
Post a Comment