Shop OBEX P1 Docs P2 Docs Learn Events
Making a GUI on Linux — Parallax Forums

Making a GUI on Linux

David BDavid B Posts: 592
edited 2010-10-23 06:08 in General Discussion
In Windows, I've had great success using Delphi for making GUIs to interact with the propeller over the serial port and to provide external propeller program control and data visualization with buttons and checkboxes and graphical plots and scrolling text screens and stuff like that.

Delphi makes it really easy to make screens with buttons, edit boxes, graphical plots, and also provide easy access to fast-compiling and high-speed code behind the screen objects. In the past I've also used Visual Basic, which also had quite a nice drag-and-drop GUI builder with easy-to-use code behind it.

But Windows has its annoyances, and I'd like to find a similar programming language that runs on Linux. Can anyone recommend a language that runs on Linux that provides a similar crisp and clean, drag-and-drop GUI builder plus efficient code and fast, easy compiling?

I really don't want to have to get involved with pages and pages of code to build and manage the screen objects; I'm looking to be able to just click and drag up a GUI and use it right away. I'd also like to avoid excessive object-oriented constructs and wordiness; I don't care whether the language is correctly objected-oriented or not; all I want is to be able to throw up a working program in the shortest time so I can move on with the rest of the project.

I tried Kylix (Delphi on Linux) when it was first released, with miserable results. I tried a little Perl with Tcl with even worse results. (I use Perl all the time for quick scripting tasks, but as a GUI-oriented language it didn't do so well.) Java is a pretty strong contender, although it wouldn't be my first choice if there were a more drag-and-droppish Delphi-like programming environment available.

I've never used Ruby or Python - Would anyone recommend them, or not? Python sounds like a good possibility. Looking around, I see packages like BoaConstructor, NetBeans, wxPython...

Does anyone have any suggestions?

Comments

  • rosco_pcrosco_pc Posts: 468
    edited 2010-10-19 15:15
    I like python with wxpython and wxglade. The spe editor/IDE combines all this in one handy package.
  • T ChapT Chap Posts: 4,223
    edited 2010-10-19 16:39
    Very simple to do with Realbasic. $100 per platform build. OSX, oc, Linux. Great forum, build a GUI quick.
  • TinkersALotTinkersALot Posts: 535
    edited 2010-10-19 16:58
    do they still make kylix?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-19 17:50
    David B wrote:
    I tried a little Perl with Tcl with even worse results. (I use Perl all the time for quick scripting tasks, but as a GUI-oriented language it didn't do so well.)
    I'm surpised you had such a miserable experience. I use Perl/Tk all the time for GUI apps and love it. (The Scribbler GUI is written in Perl/Tk, BTW.) It's not drag-n-drop for making windows and adding controls, though. But I prefer the control Tk gives me over the haphazard/inexact sorts of placement that "visual" apps tend to produce.

    -Phil
  • David BDavid B Posts: 592
    edited 2010-10-19 21:44
    RealBasic looks pretty good, $100 would be fine for a nicely-working program, plus I see they have a 30 day free evaluation period. But I have an older pc; my 1 gHz CPU clock speed is at the bottom end of the recommended speed but my 512 MB RAM is only half the RAM that RealBasic wants.

    Phil, it's been so many years ago I don't remember why I gave up on Perl/Tk. But I do use Perl a lot, and still have my old Tcl/Tk book in the garage, so if you recommend it then I'll think about giving it another shot. Thanks!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-10-19 22:17
    I recommend the O'Reilly book, Mastering Perl/Tk. It's my bible for the topic. Still, it's a bit rough around the edges, and the index is a disaster. But it's still the best reference out there, AFAIK.

    -Phil
  • max72max72 Posts: 1,155
    edited 2010-10-20 01:16
    As a Delphi alternative check Lazarus.
    Works both on win and Linux, and you can cross compile (at least from linux to win).

    If I remember correctly BST is programmed with Lazarus.

    Massimo
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-10-20 06:13
    Ubuntu Linux has a rather vast assortment of applications for editing the GUI.

    Most importantly is the fact that there isn't just one GUI in Linux. The two leaders are Gnome and KDE, but I suspect there are others. (This is a reality in Linux, more choices.)

    Python appeals to me as a good choice, but it is not just a tool for GUI and may be a bit too low level for your desire.

    Qt-4 seems to be mainly for GUI in Linux. There is indeed C++, of course.

    Another important fact about the GUI in Linux is that it can be completely removed. This is not possible in Windows. Why is it important? You can work with the GUI in many levels, from the lowest of installation and initialization levels up to the highest levels. So the learning curve may be a bit steeper. Once again, many more choices that in Windows.

    Kylix is indeed Delphi for Linux.

    http://delphi.about.com/od/kylix/Kylix_Delphi_for_Linux.htm
  • Heater.Heater. Posts: 21,230
    edited 2010-10-21 23:06
    Here we have been using Lazarus for some GUI apps. Works fine across Windows and Linux. Also means you are not tied to Intel x86 but can use Linux on ARM platforms.

    Also in use here is Qt. Again very portable.
  • David BDavid B Posts: 592
    edited 2010-10-22 09:01
    Thanks for all the information.

    Over this past week I downloaded an Ubuntu 10.10 ISO image, burned an install CD, swapped out my Windows XP hard disk with an empty spare and got Ubunto installed and running. It took a little hand-holding, but eventually finished successfully. It even configured my USB wifi and connected to the internet with no hiccups whatsoever!

    Next step is installing Brad's bst and seeing if it will program "Hello World" onto a propeller, after which time I'll start trying out some of these suggestions.
  • icepuckicepuck Posts: 466
    edited 2010-10-22 17:34
    "apt-get install" lazarus is all I had to do to install it on ubuntu. It looks like visual basic in some ways.
    -dan
  • David BDavid B Posts: 592
    edited 2010-10-22 22:50
    I can't believe how well this stuff works.

    I just downloaded and installed bst onto my brand new Ubunto, wrote a little "Hello World" spin program, imported my LCD library, plugged in my propeller development platform, hit F9, then F10, and it just works!

    Tried F11, restarted the propeller and write to EPROM works, too.

    The bst editor font looks a little funny, though. I guess it's time to read the manual.
  • max72max72 Posts: 1,155
    edited 2010-10-23 06:08
    BST in my opinion has some impressive features

    embedded terminal, with auto disconnect/connect
    works perfectly under win and linux
    support for "@@@", so SpinLMM appeared

    Massimo
Sign In or Register to comment.