What’s the difference between frontend and backend?

Frontend and backend are two different specializations in web development. Years ago, a frontend developer was the same person who designed the site, while the rest were backend developers.

Now in a medium or big company there are many more roles involved. But in small companies (also called start-ups), it is normal to have two developers: one for the frontend and one for the backend.

Designer

The frontend developer is not a designer. This is a misconception. The designer is the professional who draws the design on paper or uses an application like Photoshop. The designer must provide the final design as an image format, also delivering the rest of the graphic elements of the web.

If the web must change drastically between different devices (using responsive design), the designer is also responsible for designing what those different versions will look like.

Frontend

The frontend is everything associated with the user interface and interactions. This includes HTML as the language for presenting information, CSS as the language for styling that information, and Javascript as the language for interactions.

To make the job easier, frontend developers usually use some kind of CSS framework, being Twitter Bootstrap the most popular. This represents having a series of files that define the basis of the style, and the frontend developer can customize it.

If the application provides an API, the common practice is to use a Javascript framework to implement all templates, so that the backend only communicates with the frontend through the API. These Javascript frameworks have methods to modularize the code, so maintenance is easier. Examples of these frameworks could be Angular, React, Vue, Ember, etc.

Depending on the framework of the chosen backend, the templates can be part of it, and in that case the frontend developer must adapt to the chosen language to write the templates. But if the backend only offers the API, then the templates must be implemented in the frontend part, using one of the Javascript frameworks mentioned above. This is where both sides can overlap.

In short, a frontend developer must know essentially HTML, CSS and Javascript. From this point, a lot of tools and frameworks are available to make the job easier, although at first you will have to go through a learning curve.

Backend

The backend is what you can’t see directly in the browser. It is something that is computing information and preparing it in the background.

Nowadays nobody implements a backend from scratch (except those big internet companies you already know). To make the job easy, it is common to use a framework. For Ruby the most common framework is Ruby on Rails, which provides an MVC pattern. The V is where the backend can overlap with the frontend, as we saw before.

But if the application must offer a simple API, it is common to use a micro-framework like Sinatra, which allows to implement routing and controllers in a single file.

The backend developer should normally be in charge of the database, which can be relational (such as PostgreSQL) or document-oriented (such as MongoDB). The latter type is also known as NoSQL. When a database is large enough to be the core of the company, another role takes over: the DBA.

But not everything is about providing information to the current user who is browsing the web. Sending email notifications is something that is managed by a queuing system that runs asynchronously to improve concurrency. There are several solutions to this matter. In Ruby’s world a popular system is Sidekiq, which uses Redis to get quick access to what needs to be processed.

Finally, the application must be transferred to the server. Except for Microsoft web technologies, the rest use Linux servers, so the backend developer needs to have the knowledge to setup and optimize this operating system. So, with the help of a deployment tool (like Capistrano), only the changes are transferred.

Full stack

Finally we come to the Full stack developer role, which groups the backend and the frontend. This type of developer is the most common in development teams. In the end we must all work in this way, making the development process more agile.

In my opinion and experience, a full stack developer is usually a backend developer with a good knowledge of frontend, knowing CSS in depth and some Javascript framework.

In this case there may be several frontend developers who support the work of the full stack, even leading the development of the frontend part, setting the guidelines to follow.

Conclusion

When you start learning about web development, you need to be clear about which way to focus, because both the backend and frontend are already big and are making huge progress.

If you like user interfaces and are comfortable using HTML and CSS, frontend is your area. But keep in mind that Javascript is a must, because you will use it in all kinds of tools and frameworks. Remember that the frontend developer is not a designer.

If you feel more comfortable working with databases and serving requests, the backend is for you. You may also need to manage the operating system and deployments (transfer the updated code to the server). But the most important thing is to choose a language that you like. Ruby is a good choice. In fact, Ruby’s slogan is “the programmer’s best friend” 🙂

Click to rate this post!
[Total: 1 Average: 5]

Leave a comment