My Opinion on the user interface design of the command line tool

Source: Internet
Author: User

 

Abstract: The interface design of embedded software and the interface design of tools used in embedded software production process are not limited to the field of embedded software, because it also draws on other fields, other fields can also be used for reference. It is declared that LZ is not designed as an interface, and the embedded software involved in LZ development does not have a GUI. Therefore, if you want to see it, you just need to find another article.

For example, the smartphone app user design can switch to the mobile interface metaphor design http://9.douban.com/site/entry/180547542/view.

 

1. Is there any software without a GUI?

The "User Interface" is composed of two words: "user" and "interface". Therefore, we need to first find out who the "user" is and then provide him with the "interface ". The software that LZ participates in development does not have a GUI for the end user, but there are many other interfaces, such as running alarms, we need to provide some maintenance commands (not used by end users but required by our maintenance personnel), so here you can see that the interface concepts are different for different users. So when it comes to the user interface, don't just think about the GUI at once. The first thing is to see who the user is in this environment.

We usually talk about the user interface for end users. In fact, you still have other interfaces, such as the interfaces provided for debugging and testing, which are not necessarily GUI interfaces. They may be command line parameters, there is also the program running process information that the end user will not see, but the development and debugging should look. Therefore, your software must be designed with different interfaces for different purposes.


2. Parameter Design of command line-only software

Let's look at two relatively negative examples.

Example 1: A Tool written by someone else used to combine several files into one. The software requires (1) Specify the file name of the file to be merged in the command line parameter, (2) Names of files for a specified purpose must be named as fixed file names before they can be correctly merged. That is to say, if you want to input them through parameters and name them in advance, I do not know (2) at the beginning. The merged files are incorrect, then ask the tool maintainer to learn that there are still requirements (2 ).

Example 2: I don't know which man wrote the tool. It has been used by many projects in the company for a long time. The input parameter is also a file, with the requirement being <File Name>, which is not used at the beginning. I have also developed a more convenient autoit script to execute this tool, which is quite cool. Not long ago, I changed the platform for the new project. I still want to use the original script that I developed. I need to replace the original tool. Let's create one by myself. The input parameters are exactly the same, using the familiar autoit method, autoit cannot receive the <> included parameters. It may be seen that <I thought I was using the content of the specified file for input. No way, I couldn't simulate the original tool, so I had to modify the autoit script and input different parameters when calling two different tools. This is not the most pitfall. Some of my colleagues have created Windows 7 as their new computer system. It turns out that tool cannot be used in Windows 7, and it cannot be compatible with other systems.

I have read two bad examples. What is a good design? Okay. Now you can look at the commands provided by the operating system. For Windows Linux, you can look at the parameter formats of the most common programs, directly copying these widely known commands is the best way. Do not design a format that violates common sense. For example, do you want the square brackets to enclose the file name?

For more information about how to design command line parameters, see command-line interface-Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/command-line_interface.

Wiki Chinese is not powerful. After searching for half a day, find this article Linux Command Line Parameter processing-LianCheng Technology Network http://tech.16c.cn/linux/accidence/20100603/35074.html

3. cli and Gui)

Can the same tool only provide CLI or only provide Gui?

In Windows, the built-in Ping program only has CLI, and the current Linux release version has installed a network tool with a graphical user interface in addition to CLI Ping.

For applications with automatic execution requirements, you cannot only provide GUI interfaces. Therefore, tools for developers are not afraid of cli. For them, sometimes CLI is an advantage. So, you know how to design your program.

Many Linux applications use command line backend programs, and other projects provide GUI front-ends. You can copy it.


 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.