LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2012, 03:51 PM   #1
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Rep: Reputation: 43
Question Rapid Linux GUI Frameworks


I'm currently a C#.NET developer in the business world and I'm a hobbyist Linux admin and consultant. I'd love to produce the kinds of high quality enterprise application on Linux that I produce in Windows but I'm really struggling to grasp the right direction.

Currently, I have written a ton of BASH applications that use a really simplistic Zenity UI and I just can't take that anymore. I spent some time writing Java programs but Java (Swing) just isn't suited for system admin applications that are designed to interface directly with the Operating System.

I need a real UI framework. I have recently switched gears and started down the path of Python/wxPython but then I realized that none of my Linux machines even have wxPython installed by default and there are known problems using wxPython on Gnome 3.

for the love of god, is there any standard UI framework included by default on (the enterprise) distributions like the .NET framework is on Windows machines that I can generally count on being on the machine?

Please don't say Qt or Gtk+, because I detest the idea of going back to C/C++, especially after having spent the last 10 years focusing on high-level languages.

Cheers!
 
Old 04-24-2012, 03:59 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I don't think your desire for something "installed by default" is appropriate. Why would wxPython be there by default? It's pretty obscure, and would just clutter up most systems. There's nothing wrong with installing stuff...

Maybe a tool like Glade would be of use? Building GTK interfaces for various languages, including C#.

and having "for the love of god" with a Dawkins quote in the same post... interesting!

Last edited by acid_kewpie; 04-24-2012 at 04:09 PM.
 
Old 04-24-2012, 04:03 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Which frameworks are included is totally dependent on the distro you use, but you can say that a standard install of a distro almost ever has GTK+ and QT installed (or at least one of the two, i think most distributions favor GTK+). And no, you don't have to use C/C++ to use them, there are bindings for almost any language.
But anyways, if you make proper packages out of your software the package manager will take care of installing necessary dependencies, so actually you don't have to be concerned about that.

EDIT: @ acid_kewpie: All versions of GTK are called GTK+, with GTK+ 3.4.0 being the last stable version.

Last edited by TobiSGD; 04-24-2012 at 04:06 PM.
 
Old 04-24-2012, 04:09 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Hmm, yeah, I always saw gtk+ and gtk2 when I developed in it... my bad.
 
Old 04-24-2012, 04:50 PM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by thund3rstruck View Post
I'm currently a C#.NET developer...
You know that C# and WinForms are available in Linux (with Mono), right?

Last edited by dugan; 04-24-2012 at 05:07 PM.
 
Old 04-24-2012, 07:23 PM   #6
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Original Poster
Rep: Reputation: 43
Quote:
Originally Posted by dugan View Post
You know that C# and WinForms are available in Linux (with Mono), right?
Yup, been down that road 4 or 5 years ago and Mono is a weak, pathetic .NET imposter.

Quote:
I don't think your desire for something "installed by default" is appropriate. Why would wxPython be there by default? It's pretty obscure, and would just clutter up most systems.
Again, Linux development is a hobby for me at this point so I really have no idea of what is standard and what is obscure. It sounds like GTK+ and Qt are in fact the way to go, except I need to use bindings for higher-level languages (anyone care to point me to a link where this is effectively articulated?). There doesn't seem to be any sort of MSDN Library out there for Linux development and all the books I've looked all use C/C++ or Python with one of a possible zillion GUI frameworks.

Quote:
But anyways, if you make proper packages out of your software the package manager will take care of installing necessary dependencies, so actually you don't have to be concerned about that.
Care to share some documentation on how to build proper packages? In Windows all I need to do is deliver my libraries in the same working directory as the assembly or register them in the GAC (or Enterprise Services Mgr for COMVisible components) and this work is always achieved as part of the MSI installer package that the software is deployed in.

Thanks again guys....I'm hoping this time around I can make some progress in Linux development. The last few times I tried Linux development I got so overwhelmed by the lack of any standards, documentation, and direction that I threw my hands up and walked away. The last thing I want is to pick the wrong framework and have wasted hundreds of hours of precious time.
 
Old 04-24-2012, 07:37 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by thund3rstruck View Post
Yup, been down that road 4 or 5 years ago and Mono is a weak, pathetic .NET imposter.
* ahem

You think it might have changed in 4-5 years?

If you really want a recommendation and you don't want to look at what the current state of Mono is, then you really can't go wrong with PyQt. Definitely not "the wrong framework". It's what I used for my music player (http://duganchen.ca/quetzalcoatl-2-0-screenshot/)

You can buy a book on it:

http://www.qtrac.eu/pyqtbook.html

It has the same API (classes and methods) as Qt, so I usually just read the C++ Qt docs (which are IMHO better than MSDN) and mentally translate them to Python.

Quote:
Care to share some documentation on how to build proper packages?
Let the specialists do that.

If your software is open source, then just release source tarballs and let people who build packages for their distributions do it.

If it's not, then just release statically linked binaries, tar them up, and let people who build packages for their distributions package them.

Quote:
I detest the idea of going back to C/C++
Rumor has it that C++ is going to become prevalent for development on Microsoft platforms again.

Last edited by dugan; 04-24-2012 at 09:00 PM.
 
Old 04-24-2012, 08:44 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by thund3rstruck View Post
Care to share some documentation on how to build proper packages? In Windows all I need to do is deliver my libraries in the same working directory as the assembly or register them in the GAC (or Enterprise Services Mgr for COMVisible components) and this work is always achieved as part of the MSI installer package that the software is deployed in.
Forget how it is done in Windows. Linux is not Windows, so don't expect it to act like Windows.
Regarding packages, it depends type of packages your distribution uses, the most common are RPM and DEB.
 
Old 04-25-2012, 12:14 AM   #9
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Rep: Reputation: Disabled
Ruby is not standard on any Linux distro I know of (even the enterprise ones) BUT Tk is part of the Standard, yes standard not extended standard, ruby library.
This is a C++ solution (C++ isn't THAT low level... Is it? Compare it to assembly) but FLTK is super easy (I learned it in one day, and I'm not even that familiar with classes) and is small enough to be stately linked.
 
Old 04-25-2012, 07:46 AM   #10
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Original Poster
Rep: Reputation: 43
Quote:
Originally Posted by TobiSGD View Post
Forget how it is done in Windows. Linux is not Windows, so don't expect it to act like Windows.
Regarding packages, it depends type of packages your distribution uses, the most common are RPM and DEB.
I can't forget how it is done in Windows because I've been developing Windows applications for over a decade. I've been a Linux user and some-time admin longer than I have been a Windows developer so I'm very familiar with Linux (I have 3 Linux certifications)... I'm just new to Linux development. I don't expect Linux development to be anything like Windows development but I have never overcome the lack of an MSDN Library style of direction.

Quote:
You think it (MONO) might have changed in 4-5 years? If you really want a recommendation and you don't want to look at what the current state of Mono is...
I know there have been some great applications developed with Mono (Banshee, etc) but I went down that road several times and it was not even close to the real .NET framework, not only that but Mono is effectively dead, having lost its Novell sponsership (http://www.readwriteweb.com/hack/201...ew-startup.php)

Quote:
then you really can't go wrong with PyQt. Definitely not "the wrong framework". It's what I used for my music player
That looks good but isn't Qt a KDE thing? I'm trying to stay in the mainstream here so I'm going to give a go with PyGTK/PyGObject.

I think I found a decent starting point for Linux GUIs here:
http://python-gtk-3-tutorial.readthe...est/index.html

I'll worry about how to implement multi-threading, locks, interprocess communication, OR/M persistence, and other deeper requirements once I understand the GTK+ object model and work through the tutorial.

Thanks again everyone!
 
Old 04-25-2012, 07:53 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by thund3rstruck View Post
That looks good but isn't Qt a KDE thing? I'm trying to stay in the mainstream here so I'm going to give a go with PyGTK/PyGObject.
Qt is in the same way a KDE thing like GTK+ is a Gnome thing. Those DEs are built on it, that's it.
 
Old 04-25-2012, 08:45 AM   #12
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by thund3rstruck View Post
I think I found a decent starting point for Linux GUIs here:
http://python-gtk-3-tutorial.readthe...est/index.html

I'll worry about how to implement multi-threading, locks, interprocess communication, OR/M persistence, and other deeper requirements once I understand the GTK+ object model and work through the tutorial.
Sounds like you're ready to mark the thread as SOLVED, and you've chosen Gtk via Python. That's not wrong. Not at all.

And for GTK, there are GtkSharp (Mono again) and Vala in addition to the Python bindings.

However...

(Py)Qt is not in any way tied to KDE, and it's really as mainstream as GTK. I haven't checked, but wouldn't surprise me at all if even GNOME-based distributions are shipping it on their install DVDs. Again, definitely not the wrong framework. You also shouldn't be worrying about what software comes with the typical mainstream distribution because a) there's no such thing, b) all distributions make software and their dependencies very easy to install, c) no-one limits themselves to the software in a stock install, and d) etc.

Here's how multithreading in Qt works, including locks:
http://qt-project.org/doc/threads.html

Here's database ORM for Python. Which of course plays nicely with both PyQt and PyGTK:
http://www.sqlalchemy.org/

Last edited by dugan; 04-25-2012 at 08:56 AM.
 
1 members found this post helpful.
Old 04-25-2012, 08:47 AM   #13
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Original Poster
Rep: Reputation: 43
Absolutely outstanding! Thank you guys so much for all the assistance!
 
Old 04-27-2012, 12:48 PM   #14
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by thund3rstruck View Post
Absolutely outstanding! Thank you guys so much for all the assistance!
I suggest to read http://mail.gnome.org/archives/gtk-l.../msg00016.html thread.

I think that objectively Qt is a better choice - even though I'm using gtk+ in its Perl bindings form - I needed Perl bindings.

Last edited by Sergei Steshenko; 04-27-2012 at 05:47 PM.
 
Old 04-27-2012, 04:49 PM   #15
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
Quote:
Originally Posted by Sergei Steshenko View Post
I think that objectively Qt is a better choice.
It is. It's significantly less verbose than GTK.

Last edited by dugan; 04-27-2012 at 05:02 PM.
 
  


Reply

Tags
gui, python, wxpython



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Oracle Buys Ksplice for Rapid Linux Updates LXer Syndicated Linux News 1 07-21-2011 10:10 PM
LXer: 6 of the Best Free Linux Rich Internet Application Frameworks LXer Syndicated Linux News 0 11-14-2010 07:21 AM
Rapid clock drift on Linux SMP pmil Linux - Kernel 2 12-04-2009 08:07 AM
LXer: Rapid Linux apps using object databases LXer Syndicated Linux News 0 06-11-2008 11:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration