Front end vs. Back end questions

I understand the back end developing is when you need to communicate with the server and deliver information to be displayed in the front on the screen… yes?

Can somebody give me some real world examples / applications on when would you need a back end language?

And , can a back end language be replaced for something else if you really wanted it?

Now, let’s talk about Javascript / REACT. I see a lot of the uses of REACT is to display information that has been stored somewhere else and deliver it to the screen and the places you want to see it. It reminds me of the use of PHP in Wordpress., but PHP is a back end language, while REACT is a front end language.

So??? What is there to do when you really must use nothing else but a back end language?

HI @Elindo !

Let’s take a look at an online store.

The frontend is responsible for displaying the products to the user.
Then we have a database for our products.
Then we have to handle all of the logic for when a user submits an order.
The processing of that order and managing the database would be the backend.

The first step is to map out what it is you are trying to build.
For example, if you are just building out a simple static site with some images and text, then you don’t need a backend for that.
But if you have an application where users need to login, or you are managing some sort of database, then that is where the backend would come in.

Hope that helps!

1 Like

The difference between the front-end and back-end is generally the following:

The front-end is essentially just the HTML/CSS/JS that the browser gets from a server somewhere. These 3 can “do things” on the browser, and is what the user interacts with.

The back-end is everything else. This could be a server-side language, or program like Wordpress, the database that Wordpress, or the server-side language connects with, or even the operating system that Wordpress, or that server-side language runs on.

So its true you could build something with just a front-end, in regards to using something like React, where you can create something with HTML/CSS/JS, where React manages those 3 for you to manage what the user sees. Those are sent over to the user from a server, where this server doesn’t need to do anything but send over those static files, which then are dynamically managed by React (which runs on JS) to manage the HTML/CSS the user sees. Thats an example of just a front-end app, but even that sort of app needs some sort of software to get to the user’s browser over the internet.

The original version of the web was “all back-end languages”. JavaScript was used more for a few niche cases, and didn’t do much more. Most things you’d see online was just HTML and CSS. All the work was done on the server.

For example, this forum could be done with just server-side languages, where you’d write into an input field, hit some button that submits a form to a server-side endpoint. Then the server-side code would be something like PHP, or Python, or Pearl. That code would then read/update the database such as MySQL, and then dynamically create the HTML and CSS to send back to the user’s browser**. This is then what the user sees after their form submit.

The caveat of this approach is on what the user sees, or can do after they hit submit. In this “server-side” based approach they actually can’t really do anything, as the server needs to do all of those tasks, and then return content back to the user. This was great back when home computing wasn’t as powerful, and bandwidth limited.

Today however, your average phone has significantly more power, and bandwidth is vastly cheaper and faster. This means you could send over more JavaScript to handle more of that task, and thus manage most of what the user sees. This is where “front-end” technologies starts taking more control over what is going on.

This is also why this forum allows you to click submit/reply and see the page “dynamically update” with your post. JavaScript handles the submit button, updates on the page, and the act of sending and receiving data to the server.


Finally, the general purpose of a “server-side” language is to handle all the stuff the client-side can’t. Going back to the forum post example, you need to have an account to post on this forum. This account is yours, and requires some authentication, either with an email+password or using an external service like Github. This authentication requires some “secrets” that the server needs to use to keep track of your private information. It acts as a secured environment. This secured environment can only be done on a server, as sending this sort of information to the client would allow anyone to see it. Its these “keys” or “secrets” that a server is primarily based around, as from those it can then manage private user information coming in from external services, or end user’s browsers.

I wont go into the general details of what sort of “secrets” or “keys” most server’s would need, but just keep in mind server-side code can use them to do things client-side code just can’t due to the client-side being 100% readable, and thus fully exposed to anyone’s prying eyes.

3 Likes

There is another thing, that is backend to me. But seldom mentioned as a backend. The Apache or Nginx server (or other “page servers”) that serves your static front end HTML/JS/CSS pages.

Sure. Believe it or not. There is a world outside PHP :slight_smile:
The most mentioned is Node.JS (Javascript), but there are Phyton/Django and several other languages. Basically you talk about interpreted languages (normally slower) and compiled languages (normally faster).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.