BLOGAnnounced at MongoDB.local NYC 2024: A recap of all announcements and updates — Learn more >

What is a GUI (Graphical User Interface)?

Table of Contents

The earliest computers had text-based command line interfaces (CLIs), where the computer would follow the instructions given by a user using text commands. Although this was quite fast, it restricted the number of users who could use computers, as for each action, an average user would have to learn the command and then learn how to apply it.

Graphical user interfaces, or GUIs, eliminate this restriction and are widely used not only by end-users but also by programmers, business analysts, and many others to perform day-to-day computer tasks.

GUIs allow users to view applications with graphical elements — like graphical icons, tool tips, and sliders — and perform actions with the click of a button, rather than typing commands. This includes tasks like viewing all the files in a directory, deleting, inserting, searching, and many other actions. The most common example of a graphical user interface (GUI) is the Microsoft Windows operating system, which allows you to view and access all the functionalities in a visual, intuitive manner, creating a seamless user experience. Another application with a rich graphical user interface is MongoDB's cloud-based data platform, MongoDB Atlas.

In the below image, we show a few of the many components of a GUI:

Image showing few UI components
Components of a GUI

Most graphical user interfaces have structural components, navigational components, input controls, and informational components, represented in a desktop environment. A user interacts with the graphical user interface platform through one or more of these components. These components are sometimes referred to as widgets. Some common parts of the GUI are listed below:

Window

A window is an area on the computer screen where information is displayed. For example, if you open a browser window, the contents of the given website are displayed on the screen. If you open the “This PC” icon on a Windows operating system, the corresponding window will display the contents of the “This PC” window, like drives and connected devices. A user can open any number of windows at a given time. There are different types of windows, such as the:

  • Browser window: This allows users to navigate through web pages, files, and directories.
  • Container window: This encloses other windows, icons, and controls. For example, the “This PC” window consists of more navigation icons and controls, like drives.
  • Child window: Message boxes and pop-up windows are all child windows that open from a parent window as a result of some action.
Icon

An icon is a small display picture representing an application and helps a user to start that program. For example, the “e”-like symbol is an icon for the edge browser. Once a user double-clicks on the icon, the browser window opens.

The menu offers a list of choices for a user to execute the required command. For example, a Google doc window has menu items like File, Insert, Open, and Save.

Pointer

The pointer moves based on the movements of a pointing device like a mouse or touchpad. The pointer enables users to perform actions like dragging, dropping, clicking, hovering, and double-clicking.

Cursor

A cursor is a blinking line that indicates the current position of a text input or a pointing device. You can see cursors on applications that require user input, like Word documents or Notepad.

Pointers and cursors are often confused. However, both serve a different purpose.

Selection

A selection lets the user select a particular area on the computer screen. Users can select and copy, cut, or paste on or from the screen. Users can select using the cursor or the pointing device.

Adjustment handle

A handle appears on the edges of a selected element (like a window) and can be used to adjust the window size or shape, or any other drag-and-drop operation.

GUI vs CLI (command line interfaces)

While both CLIs and GUIs have pros and cons, here is a quick comparison to understand and appreciate the importance of each:

GUI

  • It’s visually appealing and easy to use for a layperson.

  • A GUI uses more resources and consumes more memory.

  • It’s slow because of the multiple components involved.

  • Users can use the mouse for ease of navigation, along with the keyboard.

  • Each task can be done individually with the click of pointing devices, like a mouse.

  • Multitasking is possible and easy to implement. For example, a user can have multiple browser windows, Word documents, and other programs open at one time and easily switch from one to another.

  • Examples include the Windows Operating System and Apple Macintosh.

CLI

  • It has a simple interface but is comparatively tough to use for beginners.

  • A CLI consumes very little memory.

  • It’s very fast and convenient for advanced users.

  • Only a keyboard is needed to type the commands.

  • User can execute a set of commands in one go, using a script or procedure.

  • Multitasking is possible but is not easy and generally not preferred.

  • Examples include MS-DOS and the Windows Command Shell.

A brief history of GUIs

The digital world has evolved from a text-based command line interface to more convenient and intuitive graphical user interfaces through years of hard work and innovation.

The most important work toward developing a graphical user interface was started by Douglas Engelbart. Douglas believed that computers could be an interactive tool to solve more complex problems and not just a tool for automation. He thought that the keyboard was not sufficient to operate a computer. In 1964, he, along with Bill English, developed the first working computer mouse. He also developed NLS (oN-Line System), which he demonstrated in 1968 at the fall Joint Computer Conference held in San Francisco. He explained the computer mouse to be an “X-Y” position indicator for the display system. The NLS had a mouse-driven cursor, and the computer screen was divided into multiple windows displaying text.

The late 1970s saw the advent of database GUIs, the first one being Oracle’s GUI. As computers became cost-effective, computerization of databases became a natural choice. In 1973, Xerox Alto, the first graphical user interface in a true sense, had a design based on the WIMP (Window, Icon, Menu, Pointer) paradigm. Alto offered widgets like buttons, sliders, and text boxes that formed most parts of the desktop — rather a desktop metaphor!

In 1979, Steve Jobs (the then founder of Apple) visited the Xerox PARC (Palo Alto Research Center) for a demonstration of the Xerox technology. Xerox wanted to partner with Apple to continue the work on GUIs.

In the same year, Oracle released its first database application, with visual elements, to interact with its relational database.

In 1981, Xerox Alto was modified to create the Xerox Star. The Xerox Star became the first commercial personal computer with a window-based GUI and a bitmapped display. It introduced the folder structure to store files — all of which could sit on the “desktop.” This was a new level of abstraction for the users. The computer had icons, folders, buttons, emails, and many features of modern computers.

In 1983, VisiCorp designed a GUI named VisiOn, which ran on MS-DOS. A striking feature of VisiOn was the hourglass cursor to indicate wait/busy time. Although VisiOn did not gain much popularity, it paved the way for the most successful graphical user interface, Windows, developed later by Microsoft.

In 1985, Microsoft announced Windows 1.0, which was going to make history in the world of personal computing GUIs. Windows 1.0 ran on MS-DOS and introduced the use of the mouse, multi-tasking, and built-in applications like Paint, a calculator, and Notepad. Windows were tiled rather than being overlapped. Microsoft also released Microsoft Access, a GUI-based database tool.

In 1986, Apple brought in Apple II, which could display color graphics. The same was demonstrated through the color spectrum logo of the Apple icon. 1987 saw Windows 2.0 with features like 16-color VGA graphics, desktop icons, keyboard shortcuts, Microsoft Word, and Microsoft Excel. Users could also resize and overlap windows.

Meanwhile, businesses started moving from relational databases toward non-relational databases. In 1998, Carlo Strozzi coined the term “NoSQL.” NoSQL databases quickly became popular due to their flexibility in storing data and the growing need for data persistence.

From here on, every new year saw a new version of a GUI operating system, each better than the previous.

MongoDB Compass, MongoDB’s first UI, was released in 2010. A striking feature of Compass was that it had the Mongo Shell embedded to directly control the deployments. Compass could show indexes, assess performance, analyze schema, and import/export data, without the need to write queries.

Post 2011, with mobile devices becoming more common, mobile GUIs became popular, with iOS and Android taking the lead in the mobile market. The air shifted quite fast from desktops to touchpads, touch screens, tablets, smartphones, and laptops.

With the growing popularity of cloud platforms, creating applications that could be accessed from anywhere, anytime (including databases) became inevitable. Microsoft brought its suite of applications, like Word and Excel, to the cloud, and so did Google.

In 2016, MongoDB came up with the MongoDB Atlas GUI, a cloud data platform, which would transform the way users perceive the capabilities of a database.

As of today, we also have the notebook interfaces, which combine text, graphs, and calculations and are widely used for scientific research and data science projects.

History of GUI
Advantages of graphical user interfaces

Graphical user interfaces provide a user-centered design, are easy to use and attractive, and allow for multitasking. A GUI can be used by programmers, business analysts, testers, and anyone who wants to operate a computer! GUIs give more control to the user to perform certain tasks and actions. Further, configuration and setting changes are quite easy in a visual format using features like toggle buttons or check-boxes for selection. UIs also remove the longer learning curve and dependency of users on the administrators to perform basic troubleshooting tasks and resolve operational issues.

How does a graphical user interface work?

The basic design principles of a GUI are user satisfaction, simplicity, intuitiveness, reducing the cognitive burden on the user, and consistency. The aim of a GUI is to abstract the complex layers and actual working of a computer from an end user.

GUI layers of abstraction
Under the hood, a GUI works on a set of commands based on an action by the user. Any action by a user is termed as an event. For example, if a user presses a key, an event “key down” is sent to the operating system for processing. Similarly, if a user clicks on a file, an event is sent to select and highlight the file. Events occur every time a user does something with a keyboard, touchscreen, or mouse. This event-based architecture is the basis for the working of a GUI system.
Event handling in GUI systems
GUIs in MongoDB

MongoDB is not just a NoSQL database but an entire suite of products that help you manage, transform, and analyze your data. You need not worry about data security, indexing, clustering, load balancing, or scaling while using MongoDB. All of that is built into the platform through simple configurations. MongoDB provides the mongo shell as well as a GUI for the convenience of its users.

MongoDB Atlas

MongoDB Atlas is MongoDB’s cloud data platform, which handles all your data needs and is accessible anytime, anywhere. You can create a new account or use your Google or GitHub ID to log in and create your first cluster for free. The entire setup of choosing and creating a cluster takes less than five minutes using the Atlas UI. You can create an organization or projects, browse your collections, perform CRUD operations, create aggregation pipelines on your data, add and drop indexes, create beautiful visualizations, perform relevance-based full-text search, and much more — all in one place!

A sample of the Atlas home page is shown below:

MongoDB Atlas home page
MongoDB Atlas Data Services page
You can also create fully managed backend services (Atlas Application Services) through the Atlas UI. These include custom functions and triggers, syncing data across devices using Data API, REST API, or GraphQL to access data, and much more.
Creating an app service in MongoDB Atlas

Atlas is a complete developer data platform to manage and secure your data.

MongoDB Compass

MongoDB Compass is an intuitive and flexible GUI for MongoDB. It provides features like detailed schema visualizations, real-time performance metrics, and sophisticated querying abilities. Unlike the Atlas UI, which is accessible over the browser, MongoDB Compass requires installation. You can download it from the MongoDB downloads page. Once you run the downloaded file, Compass will be installed within a few seconds. Then, you just need to connect to the database using the URL and any other additional options, like authentication.

Creating a new connection in MongoDB Compass

Once you are connected, you can see the database details on your Compass screen. You can also connect to your Atlas cluster using the URL. For example:

mongodb+srv://m001-student:password@sandbox.qurli.mongodb.net/

An interesting feature of Compass is “Generate Query,” where you can use natural language to query your collections. MongoDB’s AI-powered query generator creates the query and gets the results.

Viewing collection and documents in MongoDB Compass
Read more about the capabilities of MongoDB Compass.
FAQs
What is a GUI example?
A GUI, or graphical user interface, is a window-based system through which a user interacts with a computer in the natural language. Users do not need to learn any commands or machine code to perform tasks on the computer. Examples of GUIs are MongoDB Atlas, MongoDB Compass, Windows, Apple Mac, and Android-powered phones.
What is the main purpose of a GUI?
The main purpose of a UI is to make it easy for computer users to perform tasks on the computer, without a steep learning curve. With a GUI, they can drag and drop objects, click buttons to create or delete objects, and navigate various menu items using the mouse. It is particularly useful for inexperienced or non-technical users.
Is MongoDB a database or a GUI?
MongoDB provides more than just data services through its GUI, MongoDB Atlas. You can access the contents of a database, perform various actions on the data, create backend services, perform searches, create visualization through charts, process real-time data, and access many other features within a single graphical user interface.

Get Started With MongoDB Atlas

Try Free