LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   the modular design of Linux (https://www.linuxquestions.org/questions/linux-general-1/the-modular-design-of-linux-751951/)

newbiesforever 09-01-2009 10:28 PM

the modular design of Linux
 
Not being a computer geek anymore (I once was, but long before discovering Linux), I don't care much about the design of Linux software--except for one aspect that interests me. I have seen people on LQ explain that Linux software has a modular design (and as far as I can tell, Microsoft software doesn't).
Can anyone tell me more about that--why our software is modular; and especially, if Microsoft chose not to go that way, why not? I somewhat have it figured out already: Linux is modular because it is made by a very large number of programmers making contributions of varying sizes. And, it just occurs to me, a software company like Microsoft has a far smaller group. Is it no more complicated than that? And has Linux always been modular?

jschiwal 09-01-2009 11:26 PM

The main difference between the Linux kernel is that Linux has a monolithic kernel while Windows uses a micro-kernel.

Linux kernel drivers are loadable. Windows drivers are in a lower ring and loaded when you boot up.

There once was a famous debate between Linus Torvalds and the author of Minix concerning the relative merits between them.
http://en.wikipedia.org/wiki/Tanenba...orvalds_debate

If you are referring to applications, it may be more fair to say that software in Linux tends to be more modular than MS software, but not that MS software isn't modular. MS uses a dog v dog competitive software design model. Two teams work independently on the same project. They may have limited access to the OS source code. A member of the losing team may end up in the unemployment line. OS software uses a colaborative model. This leads to better communication, and code reuse. For example, the MS home server was written from scratch without access to MS server source code.

Another philosophical difference is that in Linux code, the protocol is king. For MS, it's the API stupid. While the application may be modular, the code behind the API may be decidedly not,

Propriety software is often written with an unreasonable deadline. Being rushed, programmers don't have the luxury to just think about the program, and security issues before designing the software. Having software that works and shipped is what is important. Once released, it may have bug fixes but not be redesigned unless rewritten for a new product version. In Microsoft's defense, they do require all programmers to spend a certain amount of time reading and fixing old code. In open source it can be hard getting programmers to do the boring stuff when they would rather move on to new more exciting pastures.

MS software is written starting on a C++ framework. The design may start off from the point of view of the visual interface and designed down from there. The program inherits a lot of baggage as result. A lot of programs written for Linux start out as a number of small C console programs. Later a GUI wrapper is written using these console apps. This results in a more modular design. Take K3B as an example. K3B is written using the QT C++ framework, but it uses console apps in the background to perform media conversions, and burn the disc.

allanf 09-02-2009 12:40 AM

Most Unix software is written to do one thing very well and that a collection of application (or tools) can be grouped (or sequenced) to yield a bigger application. Most older developers never full-screen windows and have one windo for their editor of choice, one window terminal to perform compiles and etc. If debugging the debugger is up as a window also (or a browser). Also X prior to the influx of Microsoft users defaulted to have "focus under mouse" and "auto raise" but I switched to "focus follows mouse" and "auto raise" which is better. I also change the double click on the title bar to be "window shade" rather full screen. I still use xterm as the mouse cut and paste still works as in standard X (left highlights and puts into the past buffer, right extends/reduces the hightlighted (and the paste buffer) and the middle mouse does a paste). The KDE/Gnome fail this as they steel the right click rather than using the "alt and/or control modifiers for the context menu pop-uo.


All times are GMT -5. The time now is 03:09 AM.