Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50612

Re: Ideal way to separate GUI and logic?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <wayne@waynewerner.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'python,': 0.02; 'true,': 0.05; 'cc:addr:python-list': 0.11; 'gui': 0.12; 'cleaner': 0.16; 'domains.': 0.16; 'investigate': 0.16; 'obviously,': 0.16; 'subject:GUI': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'do.': 0.18; 'basically': 0.19; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'header:User-Agent:1': 0.23; 'driven': 0.24; 'regardless': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'developing': 0.27; 'header:In-Reply-To:1': 0.27; 'wondering': 0.29; "i'm": 0.30; 'that.': 0.31; 'allows': 0.31; 'development.': 0.33; 'problem': 0.35; 'advice': 0.35; 'test': 0.35; 'but': 0.35; 'doing': 0.36; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'should': 0.36; 'application': 0.37; 'two': 0.37; 'problems': 0.38; 'how': 0.40; "you've": 0.63; 'email addr:gmail.com': 0.63; 'information': 0.63; 'such': 0.63; 'to:addr:gmail.com': 0.65; 'side': 0.67; 'jul': 0.74; 'behavior': 0.77; 'strategies': 0.77; 'given.': 0.84; '2013,': 0.91
Date Sat, 13 Jul 2013 14:03:24 -0500 (CDT)
From Wayne Werner <wayne@waynewerner.com>
X-X-Sender wayne@gilgamesh
To fronagzen@gmail.com
Subject Re: Ideal way to separate GUI and logic?
In-Reply-To <b8d83518-77f9-4b09-8b6b-f8e6c84efa50@googlegroups.com>
References <b8d83518-77f9-4b09-8b6b-f8e6c84efa50@googlegroups.com>
User-Agent Alpine 2.02 (DEB 1266 2009-07-14)
MIME-Version 1.0
Content-Type TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4685.1373742210.3114.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1373742210 news.xs4all.nl 15992 [2001:888:2000:d::a6]:39933
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:50612

Show key headers only | View raw


On Sat, 13 Jul 2013, fronagzen@gmail.com wrote:

> Well, I'm a newcome to Python, but I'm developing a program with a GUI in tkinter, and I'm wondering what is the best, 'most pythonic' way of doing this?
>
> I could, obviously, write a monolithic block of code.
  True, you could, but don't do that.

  You should investigate strategies like model view presenter, and test or
  behavior driven development.


  My recommendation echos the other advice you've been given. Basically you
  think of your application in terms of two problems or domains. One is the what
  that you want no do. What information do you need?

  The other problem is how do you get that information from the user and retun
  to them information than they need?

  Regardless of which side you have driving, UI or Presenter, having a design
  such as this allows for much cleaner code.

  HTH
  -W

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Ideal way to separate GUI and logic? fronagzen@gmail.com - 2013-07-13 04:07 -0700
  Re: Ideal way to separate GUI and logic? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-13 11:43 +0000
  Re: Ideal way to separate GUI and logic? Roland Koebler <r.koebler@yahoo.de> - 2013-07-13 15:56 +0200
  Re: Ideal way to separate GUI and logic? Dave Cook <davecook@nowhere.net> - 2013-07-13 17:40 +0000
  Re: Ideal way to separate GUI and logic? Wayne Werner <wayne@waynewerner.com> - 2013-07-13 14:03 -0500
    Re: Ideal way to separate GUI and logic? fronagzen@gmail.com - 2013-07-14 17:24 -0700
    Re: Ideal way to separate GUI and logic? fronagzen@gmail.com - 2013-07-14 17:25 -0700
      Re: Ideal way to separate GUI and logic? Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-14 21:02 -0400
        Re: Ideal way to separate GUI and logic? Roy Smith <roy@panix.com> - 2013-07-14 21:30 -0400
      Re: Ideal way to separate GUI and logic? Steven D'Aprano <steve@pearwood.info> - 2013-07-15 01:44 +0000
  Re: Ideal way to separate GUI and logic? asimjalis@gmail.com - 2013-07-15 10:06 -0700
    Re: Ideal way to separate GUI and logic? fronagzen@gmail.com - 2013-07-15 17:25 -0700
      Re: Ideal way to separate GUI and logic? Owen Marshall <o@owenmarshall.invalid> - 2013-07-16 00:42 +0000
      Re: Ideal way to separate GUI and logic? Asim Jalis <asimjalis@gmail.com> - 2013-07-15 18:02 -0700
      Re: Ideal way to separate GUI and logic? Chris Angelico <rosuav@gmail.com> - 2013-07-16 13:18 +1000

csiph-web