Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'programmer': 0.03; 'interfaces': 0.04; 'run-time': 0.05; 'tree': 0.05; 'subject:Python': 0.06; '(especially': 0.07; '*not*': 0.07; 'abuse': 0.07; 'binary': 0.07; 'mentioned,': 0.07; 'nicely': 0.07; 'ugly': 0.07; 'ascii': 0.09; 'git': 0.09; 'learn,': 0.09; 'meaningful': 0.09; "person's": 0.09; 'pixel': 0.09; 'developer': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'gui': 0.12; 'changes': 0.15; '(and,': 0.16; '(both': 0.16; "(i'm": 0.16; 'blend': 0.16; 'dig': 0.16; 'drag': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'help;': 0.16; 'it;': 0.16; 'itself),': 0.16; "microsoft's": 0.16; 'readable': 0.16; 'risks,': 0.16; 'sizes,': 0.16; 'tab': 0.16; 'them.)': 0.16; 'up*': 0.16; 'sat,': 0.16; 'size,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'app': 0.19; 'differ': 0.19; 'drawing': 0.19; 'file,': 0.19; 'things.': 0.19; '(in': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'builder': 0.24; 'certainly': 0.24; 'platform,': 0.24; 'processor': 0.24; 'skip': 0.24; 'decide': 0.24; 'helpful': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'source': 0.25; 'nearly': 0.26; 'header:In- Reply-To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'generally': 0.29; 'ideal': 0.29; "doesn't": 0.30; 'css': 0.30; 'designer': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'getting': 0.31; 'easier': 0.31; '(although': 0.31; 'apparently': 0.31; 'assumes': 0.31; 'dialog': 0.31; 'end,': 0.31; 'font': 0.31; 'markup': 0.31; 'mirror': 0.31; 'second,': 0.31; 'though.': 0.31; 'allows': 0.31; 'file': 0.32; 'figure': 0.32; 'interface': 0.32; "we're": 0.32; 'text': 0.33; 'open': 0.33; 'raw': 0.33; 'actual': 0.34; "i'd": 0.34; 'board': 0.35; 'created': 0.35; 'something': 0.35; 'case,': 0.35; 'editor': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'c++': 0.36; 'disk': 0.36; 'interface,': 0.36; 'done': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'skip:n 10': 0.64; 'design,': 0.64; 'more': 0.64; 'different': 0.65; 'taking': 0.65; 'deals': 0.65; 'biggest': 0.67; 'benefit': 0.68; '26,': 0.68; 'useful.': 0.68; 'fact,': 0.69; 'overall': 0.69; 'limit': 0.70; 'physical': 0.72; 'designers': 0.74; 'jul': 0.74; 'special': 0.74; 'music': 0.75; 'paper': 0.75; 'agreement,': 0.84; 'clearer': 0.84; "it'd": 0.84; 'layout.': 0.84; "life's": 0.84; 'pike': 0.84; 'plays': 0.84; 'prefers': 0.84; 'started,': 0.84; 'sweeping': 0.84; 'art,': 0.91; 'to:none': 0.92; 'imagine': 0.93; 'sheet': 0.93; 'directly.': 0.95; 'serious': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=wkhDZRcii2pX7M+O+mkKVoOsajZtPmQ2ARR7hLG2C88=; b=nILl7dZJnLuJHOSGtP+qXAlvoEY+U/9AI8s5TijACk6DmBkyS/npR+jTVJK1JmspNf RHE94TGCFl4IMeqng5V1PEGmUgQONigBYw/mXcAITiSkoikEhfpDFuyT5CROHFq8kD6K AOQS+ypK9I+5IGvQW/tkOc8IIJ7CRaGisIxbDElop0aQSKbpcHXG/rXN0qKVmRYaN0RE shubs59n9rAYEJnQyiT6UyoG4VG3CgDzI6PyQbtKRt80uCnUorUOUqlXUJW2UABi760t 177a5Q7JQ28C6d1tclU7u0U//mqZjRzqKZFK3HSryjzqp13WGJbxTxkiC3PPnzhFQuU9 3iGg== MIME-Version: 1.0 X-Received: by 10.52.35.81 with SMTP id f17mr22435652vdj.13.1406349476842; Fri, 25 Jul 2014 21:37:56 -0700 (PDT) In-Reply-To: References: <53D2CAD8.1040306@schwertberger.de> Date: Sat, 26 Jul 2014 14:37:56 +1000 Subject: Re: .Net Like Gui Builder for Python? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 71 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406349509 news.xs4all.nl 2945 [2001:888:2000:d::a6]:36460 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75230 On Sat, Jul 26, 2014 at 2:13 PM, TP wrote: > Not that I disagree with the overall point of just using a text editor > (especially for Python GUIs) but apparently you've never created a C# WPF > app using Visual Studio? WPF fully supports layout controls, is *not* > generally pixel based it's more similar to HTML + CSS (although you do pixel > perfect layout if you try), and still easily does (2). And while I almost > exclusively use the Visual Studio XAML tab view rather than bothering with > the Designer view you can drag & drop if you really want to. And Microsoft's > Expression Blend takes that to a whole 'nother level supposedly making it > easy for "even" graphic designers to create GUIs without delving too much > into raw code wrangling. No, I haven't. (I haven't done anything with C#. There's a limit to how much I have time to learn, and I'd much rather work with something like Pike than C#.) In the light of this, I'd best separate out my concerns a little further: 1) GUI layouts that use pixel positioning 2) Drag and drop GUI layout interfaces The first has all the problems I mentioned, of being tightly bound to so many things. A twip-based layout solves one of them (font size), and it's possible to get simple features like "match sizes on all these widgets" and "align these widgets' left margins" (both of which I had in VX-REXX) to help; but none of that deals with run-time layout requirements, which are much MUCH better served by a rule-based layout. The second, though, still does have issues. While it'll give you a good result at the end, it's not nearly as advantageous as the d'n'd interface for laying out pixel-precise positions. WYSIWYG HTML editors aren't exactly sweeping the board (in fact, every serious web developer I know prefers to work with the markup itself), and even then, they're not so much "drag and drop positioning of stuff" as they are "word processor that saves as HTML". You may as well skip the WYSIWYG editor and just work directly with code; the benefit isn't enough to justify the risks, the biggest of which is that your lovely layout will look completely ugly on a different platform, theme, font size, etc. There is one special case, though. When it comes to *mocking up* an interface, it is sometimes helpful to have a drag-and-drop system that allows a non-programmer to put something together - a sketch, if you like. Imagine taking a sheet of physical paper and an actual physical pencil, and drawing out a layout; now imagine making that both easier and clearer by dragging widgets around. At no point do you ever expect the paper sketch to be perfect, and certainly you don't expect it to work on all platforms, font sizes, etc; but it's a lot easier than manually crafting ASCII art, and it's something that a programmer can look at to decide how to lay things out. It's far from perfect, though, as it assumes a fundamentally 2D layout; GUI design, even back in the 90s when I first started, was always a tree of parent-child relationships. But if you want that sort of thing for your mock-up, I'm sure it'd be possible to abuse something to do it; I used the Open Watcom C++ Dialog Editor for the job, a few times. It doesn't even have to be backed by the same language or toolkit. We're broadly in agreement, though. Instead of searching for the ideal GUI window builder (and, by the way, one person's ideal will differ hugely from another's), just write the code directly. Life's better. Plus, it plays more nicely with source control. Ever tried to dig through a git repo to figure out when a change happened to an Open Office document? Not so useful. But I can 'git blame' a source file and know for sure that I'm getting meaningful results. LilyPond files are source code; NoteWorthy Composer files are binary blobs. (I'm not sure about other music formats, like Sibelius's save file, as I haven't used them.) I'd much rather work with a format where the disk changes mirror the conceptual changes. Readable diffs FTW. ChrisA