• Yada Yada
  • Posts
  • What Is the Difference Between Client and Server?

What Is the Difference Between Client and Server?

Software Engineering Word of the Day

Client vs. Server

/ ˈklīənt // ˈsərvər /

Definition

Nowadays, most developers create web and mobile applications using a client and server.

A client consists of code that displays the user interface (UI) in your browser. A client can talk with a server to store or retrieve data. All the client-side code is public to anyone on the internet. For this reason, developers will code a client so that the content displayed in the UI is retrieved from the server.

A server consists of code that provides or updates data to the client whenever it needs to. Servers will usually store and retrieve data from a database. All server-side code is private which means hackers will have a harder time exploiting or reverse engineering your app.

There are two main reasons for having a server:

  1. Developers can hide how their code works from the public. In another world where the code for bank transactions is public, hackers could reverse engineer the code to take fractions of a penny from every bank transaction.

  2. Developers can offload tasks requiring high computing power. For example, if you wanted to render an hour-long, 8K video, you'd need a powerful computer to handle that. You can still perform these tasks on the client side; however, the user will experience some lag.

Used in a sentence

Example 1: Twitter production issueSupport team: We have an issue where users aren't able to see their feed.Dev: Looks like the server is down for the news feed service. Nothing else is broken on the client. I'll try restarting the server.

Related terms

  • Frontend

  • Backend

  • Client-server model

  • API

  • Database

  • HTTP