Two more newbie questions

Ben Finney ben at benfinney.id.au
Fri Jul 18 10:23:39 CEST 2014


Martin S <shieldfire at gmail.com> writes:

> a/ What is the "easiest" way of putting a web interface on this CLI
> application. I've been looking at various web frameworks but that
> seems pretty much targeted more towards larger projects. Not "slapping
> a gui" on a cli application.
> Any pointers and suggestions appreciated.

My suggestion: Have a firmer idea of what you want the UI to do.

UI design is a very difficult problem; you are essentially making all
kidns of compromises because humans and their expectations are messy,
unpredictable, and expensive to work with.

So, if by “slap a GUI onto” you mean something that is a no-frills
plain-HTML form, with essentially no assistance for the user and no
error handling, this will be a lot simpler to implement than something
easier for the human to use.

> b/ Catching user input errors. What is generally the best way of
> catching those and doing something sane with it. Entering "asdf"
> instead of a rating (like 2014) pretty much kills the little tool
> horribly.

Right. Handling errors is very much a matter of UX policy for the
application, and can easily consume far more of the programming effort
than merely getting the back-end processing done.

So again, the work to be done here is less Python-specific and much more
about being tediously precise about how you want the user experience to
work. It's difficult, exacting, fiddly work. Fortunately, the more exact
you can be, the more likely a specific recommendation can be made.

-- 
 \      “I knew things were changing when my Fraternity Brothers threw |
  `\           a guy out of the house for mocking me because I'm gay.” |
_o__)                                      —postsecret.com, 2010-01-19 |
Ben Finney




More information about the Python-list mailing list