Surprising Things About How an App Really Works
When we press an app icon on our phone, we feel impatient if it takes more than a few seconds to load, and give up if it takes longer than a single minute.
Few of us realize the insane amount of technology that is behind making that work.
This article is for people who are non technical but have always been curious, “wait… how does an app actually, work?”
What is the internet?
A Network of Networks
What is the internet? This may sound obvious until you think about it… It’s Google! Well… not really…
The word internet is the combination of two words, “interconnected” and “network,” a network in computer terms, is a group of connected computers that can send information to each other.
The internet is a collection of networks, essentially a network of networks if you will. And it’s crazy how this network connects.
For instance, did you know that underneath the ocean there are hundreds of thousands of miles of fiber optic cables that connect the world together?
Check out this video, it’s mind blowing:
How does your phone connect to the internet?
Let’s say you are looking up something from Google. Your phone sends a request to the IP address related to the website you are looking up.
An IP address is something like a street address for your device and for the websites you visit.
That request is relayed from your phone to a cell tower, that cell tower converts the signal into light and sends it over fiber optic cables to a data center which stores the information.
Those fiber optic cables can span huge distances and run under the ocean (as shown in the previous video.)
Then the data center sends back the relevant information to your phone via packets of information. What is interesting is that the different packets don’t have to travel the same path to get your phone, but are traveling so fast that you may never notice.
How does an app get to your phone?
Developers work on source code to create an app (source code is just a fancy name for files.)
The source code is managed in a way where different developers can access it and work on it together.
Once you are finished with the source code you do something called, “compiling the code.” Compiling is a process of translating the code from the language the developer wrote it in (which humans can more or less read) into machine code, which is the language that computers speak.
Once the code is compiled it can be sent to one of the two app stores where the employees of Apple and Google respectively look through and make sure that the code passes their standards.
If it’s a go, the app is then available in the app stores, and downloadable on your phone.
When you download an app, you're basically installing a piece of software onto your device that was created by a team of developers.
Those developers wrote a bunch of code that tells the app how to work, and they designed the app to do specific things.
For example, if you download a game app, it was probably created by game developers who wrote code that tells the app how to display graphics, handle user input, and keep track of scores.
If you download a social media app, it was created by developers who wrote code that tells the app how to connect to a server, display content, and let you upload photos and interact with other users.
When you open up an app, your device loads that software into memory and runs it. The app then communicates with the device's operating system to do things like display information on the screen, play sounds, or vibrate the device.
Depending on the app, it might also need to connect to the internet to fetch data from a server, or use your device's camera or microphone to capture audio or video.
The internet is truly a wonder of the modern world, the fact of how far and fast the information travels and the speed at which it gets to your phone is incredible.
Hopefully this article opened your eyes a bit for the next time you open an app.