Skip to content

Commit 3d06d2b

Browse files
[mabel] Add frontend vs backend
1 parent 305d1ea commit 3d06d2b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989

9090
- **Backend Web Development**
9191

92+
- [Frontend vs backend](backend-web-development/frontend-backend)
9293
- [REST API and CRUD](backend-web-development/rest-api)
9394
- [Node.js server](backend-web-development/node-server)
9495
- [Express.js basics](backend-web-development/express-basics)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# frontend vs backend
2+
3+
In the past, web applications used to have both frontend and backend in a single project. However, in recent years, clients often need apps that use a web application (and often a few of them, as there are also admin pages etc.) as a "front-end" and mobile applications on several platforms (Apple, Android etc). These applications might all depend on the same backend so that information across them will be consistent.
4+
5+
![frontend vs backend](https://static1.squarespace.com/static/5a5f73f5d7bdcef66b1ec204/5a6207e771c10ba72c82ef1b/5ab29223758d46af93cd9065/1523468664033/Front-End+Vs+Back-End.png?format=2500w)
6+
7+
Picture from: https://recruiterhacks.org/home/2018/3/23/back-end-vs-front-end
8+
9+
Therefore in the course, we will learn how to develop a seperate backend that is not bundled together with our front-end, React.js in this case.
10+
11+
## What does the backend do
12+
13+
Example of how the backend interacts with frontend:
14+
15+
![backend example](https://www.cloudflare.com/img/learning/serverless/what-is-serverless/frontend-vs-backend.svg)
16+
17+
Picture from: https://www.cloudflare.com/learning/serverless/what-is-serverless/
18+
19+
## Node.js is not frontend or backend
20+
21+
Node.js is a runtime environment based on the V8 Javascript engine for Chrome, which means it can run Javascript out of the execution context of a browser.
22+
23+
Node.js in practice is used for both our frontend and backend, but was developed so that JavaScript can be used in the server-side, thus letting us have a single language for both front end and backend development.
24+
25+
## Node.js frameworks
26+
27+
There are many frameworks built on top of Node.js which can be used for creating a backend. The most popular is Express.js which is minimalist and unopinionated. This means it does not follow any design patterns such as MVC, MVP etc and brings simplicity. However, this also means that in larger projects, you would have to put in extra effort to manage code in a standardised way and come up with your own design pattern. This effort is required to maintain the larger projects.
28+
29+
There are even frameworks built on top of Express.js such as Sails.js
30+
See http://nodeframework.com/
31+
32+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/VN3ULIacb_4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

0 commit comments

Comments
 (0)