当前位置:网站首页>GUI, CLI and UNIX Philosophy
GUI, CLI and UNIX Philosophy
2022-04-23 09:19:00 【dog250】
Unix Philosophy advocates combining multiple small programs that do only one thing . What are the benefits ?
Independent high cohesion programs can be coupled into more possibilities , Only through input and output coupling is the lowest coupling , This is Unix/Linux The foundation of Philosophy .
Whether it's GUI Or multi parameter CLI, It is not convenient for multi program cooperation .UI It's for people, not for programs .
You might as well compare GUI And multiple parameters CLI.
GUI The operation interface is a two-dimensional screen control , It's easy for the human eye to recognize controls , And know the purpose of the control , For example, one that says “ determine ” perhaps “ Cancel ” The button , perhaps “ View ” Under the menu “ Zoom in ”.
If you want to GUI Programs work together , Then the program should not only understand the control description and find its location , Also understand the classification of controls , Whether it's a button , Or the menu , all GUI Controls must be positioned in both dimensions , It is impossible for the program to understand this positioning . It's hard even for people , I just finished an article for my daughter Word draft , It's hard to find out how to adjust the margins . Hard to return , But as long as it takes time , You can always “ find ” Control , Because self describing GUI Control “ Somewhere ”.
The problem of control positioning is CLI It's much better ,CLI The command line is just one line , One line is one dimension , One dimensional command lines do not need to be positioned ,append Add parameters , But the parameters and their functions must be known in advance , If you don't know the meaning of the parameter in advance , You can never “ find ” it ,CLI Parameters are not self describing , In you append Before it , It's not anywhere . This means that for CLI,help or manual It's very important , No, help or manual,CLI Can't use .
GUI Since the description , Locate the control to be operated by finding it on the two-dimensional screen . Unskilled people can also find controls and operate them through self description , Skilled people still can't save two-dimensional positioning operation , The batch , Shortcut keys can't go anywhere .
CLI Non self description , One dimensional command lines do not need to be positioned ,append Parameters can be . The first use must check help or manual, Otherwise it won't work , Once proficient, you can script , comparison GUI The operation will be very fast .
That's all GUI and CLI Differences in . But no matter GUI still CLI, It's hard to expect programs to understand each other . about GUI, Tricks like mouse sprites have never been popular , And for CLI, Write a program to receive all the output of another program and understand its different meanings , Will make things extremely complicated .
The only thing that allows programs to collaborate in an easy way is to keep each program's separate input and output .
such as :
cat /opt/abc |grep '\<[0-9][0-9][0-9]\>'|uniq|sort
although iptables It's easy to stop a malicious IP Data packets of , But the premise is that someone needs to type out the whole order , It's hard to have a program that can output IP Address , Protocol port, etc match, The program outputs these parameters separately , It's hard to connect between procedures , There is only one root cause ,iptables Multiple parameters with meanings are required .
Human beings are intelligent , It's very inefficient to do things in a binary combination , People can recognize with their eyes GUI Control and manipulate it , People can also understand CLI Parameters and append it , But the program doesn't work , The program cannot find GUI Control and understand it , I can't understand CLI Parameters . If there are only programs in the world , Then the stupidest and most reasonable program can only converge to do one thing , Carry a clear input and output to do it , It becomes the of this program “ nucleus ”, This is it. Unix philosophy ,Unix Born for collaboration between programs .
Thought again GUI and CLI, I think it's interesting , I can't sleep , Write a composition .
Zhejiang Wenzhou leather shoes wet , It's not fat when it's raining .
版权声明
本文为[dog250]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230632463208.html
边栏推荐
- Multi view depth estimation by fusing single view depth probability with multi view geometry
- Go language self-study series | golang nested structure
- Non duplicate data values of two MySQL query tables
- 政务中台研究目的建设目标,建设意义,技术创新点,技术效果
- Employee probation application (Luzhou Laojiao)
- 資源打包關系依賴樹
- 112. Path sum
- Go language learning notes - structure | go language from scratch
- npm ERR! network
- Kettle experiment (III)
猜你喜欢

【SQL server速成之路】数据库的视图和游标

Resource packaging dependency tree

数据清洗 ETL 工具Kettle的安装

Kettle实验 (三)

NLLLoss+log_ SoftMax=CE_ Loss

Valgrind et kcachegrind utilisent l'analyse d'exécution

Go language learning notes - structure | go language from scratch

Vivo, hardware safe love and thunder

Data visualization: use Excel to make radar chart

kettle庖丁解牛第14篇之JSON输入
随机推荐
OpenCV中的图像处理 —— 轮廓入门+轮廓特征
Kettle实验
《數字電子技術基礎》3.1 門電路概述、3.2 半導體二極管門電路
NLLLoss+log_ SoftMax=CE_ Loss
ALV tree (ll LR RL RR) insert delete
Initial experience of talent plan learning camp: communication + adhering to the only way to learn open source collaborative courses
Mini - exercice MySQL (seulement pour les débutants, pas pour les non - débutants)
考研线性代数常见概念、问题总结
#yyds干货盘点#ubuntu18.0.4安装mysql并解决ERROR 1698: Access denied for user ''root''@''localhost''
nn. Explanation of module class
What is monitoring intelligent playback and how to use intelligent playback to query video recording
108. Convert an ordered array into a binary search tree
653. 两数之和 IV - 输入 BST
501. 二叉搜索树中的众数
Rembg split mask
About CIN, scanf and getline, getchar, CIN Mixed use of getline
SAP 101K 411K 库存变化
SQL used query statements
基于ThinkPHP5版本TRC20-资金归集解决方案
Codeforces Round #784 (Div. 4)