Re: Modularity in software design and a question about extant applications.
The GNU Coding Standards recommend a design approach similar to that you describe:
Unfortunately, that paragraph is the extent of this recommendation and it gets a bit lost in the rest.
In addition [to a GUI], please provide a command-line interface to control the functionality. (In many cases, the graphical user interface can be a separate program which invokes the command-line program.) This is so that the same jobs can be done from scripts.
Open source being open source, there is no forced compliance of any coding standard. My view is that the GNU standards are biased toward what I assume are Richard Stallman's own preferences (C, Emacs). These are not to every programmer's taste or requirements. Anyone writing Python or C++, for example, is told that they are non-standard, so why bother reading further?
Even C programmers disagree with them: In the Linux Coding Style, Linus Torvalds writes:
Using another language [other than C] is like using a non-standard feature: it will cause trouble for users.
So perhaps it's not surprising that this recommendation for CLI/GUI duality is sparsely implemented, which is a pity, because it's a good design pattern in itself. Your description is essentially a model-view-controller (MVC) pattern:
First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture.
It's not just about following standards of course: There's nothing to stop a programmer designing an application using this pattern and not following the GNU Coding Standards, but that relies on the individual's own perspective on the importance of providing a unified CLI and GUI.
1. -Core (the core input and output) [CONTROLLER]
2. -Interfaces -GUI -Text based terminal interface -CLI [VIEW]
3. -User -Settings -Data [MODEL]
Please create new threads for new questions.
Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].