Video – Different Parts of an Application; Frontend and Backend
In this video, Daniel explains the two key areas of an application, the frontend and the backend. Each has it’s own purpose and responsibilities. Both are needed in order for an application to operate and there are important reasons for the distinction between the two.
G’day, I’m Dan, Founder and Developer at Denim Development.
Today I’m going to be talking about the different parts of a web or mobile application. Specifically, the frontend and the backend. I’m going to be talking about what each layer does, and what each layer is responsible for.
So, first we’ve got the frontend. This is represented by the user interface, so it’ll be something like a web browser or web page, accessible through Chrome or Edge or Safari. And it could also be a mobile app installed on your mobile device.
It’s what you’d call the presentation layer. It deals with things like user interaction, styling and appearance. It has limited functionality, but can handle things like capturing photos and interfacing with bio-metric security – things like that.
The other component we have is the backend. This is represented often by a remote web server or database, or both. It deals with thing like business logic and database persistence. It handles the requests that come in from the frontend. Requests will travel across the internet and reach the backend. And the data will then be sent back.
It also handles the business logic. That’ll include thing like triggering billing, and also generating reports. And also, heavy CPU and memory intensive long running tasks. Lastly it also handles data storage. That’ll be the web server receiving some data and then inserting that in the database. And later then potentially retrieving that later on.
So, an example of the interaction between the frontend and the backend is for example a registration form. You would go and put in your user information. Fill that out in the UI of perhaps a web browser or mobile app. Once you’re finished you will press submit. And that data will then likely get sent to the backend via what’s called a web request. It’ll get sent across the internet, and ultimately, it’ll reach that database where it will sit and potentially be called upon later on of needed.
So, why this separation has come about is first because it’s logical. It makes sense to store data on the backend because of the fact that users will of course close their browsers. If they have a mobile app installed, they might login to a different device potentially as well. So, you don’t want to store that data on the device itself – on the frontend. You’ll want to store it on the server so that if they then login on a different device you can then pull that data from the backend and it can be loaded into that different frontend.
Another reason is that frontend devices aren’t equipped to do heavy processing. However, backends typically are, and they can be made to scale out or scale up accordingly so that they can handle larger CPU or memory loads.
And lastly, another good reason for the separation is the protection of intellectual property and also for securing things like login credentials and thing like that. You don’t want to have that sort of code or information on the frontend as it could then be accessible by the person using the frontend.
Thanks for listening, get in touch if you have any questions, I’ll be happy to talk about them. Take care.