LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Development Intro? (https://www.linuxquestions.org/questions/linux-newbie-8/linux-development-intro-241713/)

plnelson 10-12-2004 09:38 AM

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.

Linux24 10-12-2004 10:02 AM

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.

plnelson 10-12-2004 12:01 PM

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 :D ) 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?

Linux24 10-12-2004 08:16 PM

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?"

plnelson 10-12-2004 10:40 PM

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?

Axo 10-12-2004 11:07 PM

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


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