LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2004, 10:38 AM   #1
plnelson
Member
 
Registered: Oct 2004
Location: Massachusetts, USA
Distribution: SuSE
Posts: 39

Rep: Reputation: 15
Linux Development Intro?


Where can I get an introduction to Linux development, especially in
terms of API's and libraries? I know there are zillions of them out
there and different people have their own favories but I assume that a few of them are more popular or dominant than others. When I do a Google search on "linux development" and "API" I get mostly hits on tools like compilers, debuggers, and development environments, which is NOT what I'm looking for yet.

What I'm looking for is an introduction to Linux development ARCHITECTURE. In Microsoft Windows terms it would be like Win32 (the basic API for the OS, including windows and other GUI components), MFC (a C++ class library layered on MFC), COM (a bizarre Microsoft "object" architecture) , ATL (a C++ library layered on COM) , Java, C#, Visual Basic, etc.

I'm assuming (correct me if I'm wrong) that at the base of Linux
is Posix and Xlib but do most people actually write directly to those
API's? I suspect that they write to function or class libraries layered on top of them. What I want to do is try writing simple GUI based programs that can run under KDE or Gnome (I'm using KDE) and I prefer to work in C++, with Java as my second choice with old-fashioned C as my third choice.

Thanks in advance.
 
Old 10-12-2004, 11:02 AM   #2
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30
The architecture of Linux is not what you are used to in Windows. In Windows, the shell and the OS layers are blended together and are almost inseparable, so the act of calling the open file dialog box and the act of saving changes to a file are nearly identical in terms of interaction with the OS.

In POSIX systems, the OS, shell, and GUI are three separate, distinct layers and are separate from each other. This allows the user to choose any combination of OS, shell, and GUI interface that they want.

OS variations are the various flavors of Linux, and then much less portable are the various flavors of Unix - AIX, HP/UX, Solaris, etc.

Shell variations include the Linux bash shell, bourne, Korn, C-Shell, etc. This forms the Linux command line, and everything in the GUI layer basically interacts with it like a bound user.

GUI variations are multitudinous: KDE (my favorite), Gnome, WindowMaker, etc etc etc and are typically referred to as Window Managers.

When you develop for Gnome, you are using a development toolkit called GTK+ (duh... Gnome Tool Kit), and when you develop for KDE, you use KDE's specific toolkit called QT.

There are specific development tools for writing for each of the applications, but generally, from what I have seen, the GUI programs are written after a solid C or C++ program is written that can be used via the command line, and then the GUI is layered on top of it to make it pretty and visual.

So, you can see now that Linux does not have inherent API's that you can call upon in order to have a file open dialog pop up. But KDE and Gnome do. And when you write for one, you are not writing for the other. However, if the end user has both Gnome and KDE installed, generally they can run programs for either one in either environment.

Of course there are kernel functions you can call upon. The code to the kernel of the operating system and it's modules are available for every distribution (except perhaps Suse Personal Edition), so you can openly read what it is you are looking for, because it is not a closed system.

This will probably not be exactly what you were looking for, but it will get you started in the right direction so you can search on your own more effectively, I hope. Rather than seeking equivalents to Windows architecture, you have to change your entire mental image of what you are looking for the operating system to do, and write code to interact with the layer that you are working with at the time, realizing that unlike a windows product, a GUI that you run in KDE is not integrated into the operating system.
 
Old 10-12-2004, 01:01 PM   #3
plnelson
Member
 
Registered: Oct 2004
Location: Massachusetts, USA
Distribution: SuSE
Posts: 39

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Linux24
The architecture of Linux is not what you are used to in Windows. In Windows, the shell and the OS layers are blended together and are almost inseparable, so the act of calling the open file dialog box and the act of saving changes to a file are nearly identical in terms of interaction with the OS.
. . .
Quote:
This will probably not be exactly what you were looking for, but it will get you started in the right direction so you can search on your own more effectively, I hope.
I already understand all of the above about shells, Posix, GUI, etc.

MY question is about common Linux API's and class libraries.

In other words, 15 years ago, in the last century, I used to program in an HPUX environment using Xlib and Motif in C. Hardware and software technology have both come a long way since the covered-wagon and whale-oil lantern days of the 1980's. So while I'm sure there are a few old timers still programming directly to XLib in C ( probably on an old Apollo workstation, while listening to Bob Seger and Duran Duran on a Philips casette in their boombox ) I'm really not interested in stepping into the Wayback Machine and programming like they did in the Reagan Administration.

I assume that there are more modern software architectures that take advantage of more modern languages, in order to produce code that is easier to maintain, promotes better reuse, and makes porting between target machines and desktops easier. I'm a strong believer in the benefits of good object-oriented design and I assume that there are robust class libraries in wide use in Linux. I want to find out which ones are most popular so I can start climbing their learnng curve.

In other words if someone was writing a new, nontrivial application today in Linux, targeting for Gnome and KDE desktops, what languages and API's would they be most likely to use - say, the top 3 by probability?

Last edited by plnelson; 10-12-2004 at 01:05 PM.
 
Old 10-12-2004, 09:16 PM   #4
Linux24
Member
 
Registered: Aug 2004
Distribution: Mandrake 10.1
Posts: 204

Rep: Reputation: 30
Dude, you posted this in Linux - *** Newbie ***. While you may technically be a Linux Newbie, I doubt you will get the answer you are looking for in a forum prowled by people seeking or providing answers to questions such as "What is a disk partition?" or "Does Linux have graphics?"
 
Old 10-12-2004, 11:40 PM   #5
plnelson
Member
 
Registered: Oct 2004
Location: Massachusetts, USA
Distribution: SuSE
Posts: 39

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Linux24
Dude, you posted this in Linux - *** Newbie ***. While you may technically be a Linux Newbie, I doubt you will get the answer you are looking for in a forum prowled by people seeking or providing answers to questions such as "What is a disk partition?" or "Does Linux have graphics?"
Well, I AM a Linux newbie. What forum would you suggest where they won't think it's a hopelessly beginner question?
 
Old 10-13-2004, 12:07 AM   #6
Axo
Member
 
Registered: May 2003
Distribution: Debian
Posts: 153

Rep: Reputation: 17
You probably should of posted in the "programming forum" , it being for programming questions and help.
*shrugs*
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
C++ or pure C for Linux kernel module, Linux device driver development. What to use? Igor007 Programming 91 07-19-2014 12:55 PM
Need good Linux or Unix INTRO book (command line focused) Ethan Linux - General 7 01-09-2007 01:24 AM
Linux Development AndrewB Mandriva 4 03-21-2005 07:04 PM
Linux shell development pony85 Programming 3 08-05-2004 11:04 PM
Linux Development p1az Linux - General 1 10-16-2003 12:29 PM


All times are GMT -5. The time now is 06:40 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration