Skip to content

Commit 4c94501

Browse files
committed
add final changes for module 1
1 parent afab3b4 commit 4c94501

File tree

15 files changed

+100
-90
lines changed

15 files changed

+100
-90
lines changed

module1-introduction-to-backend/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Module 1: Introduction to Backend
22

3+
Last Revised: 05/10/2021
4+
35
## Summary
4-
Writing backend code requires an intimate understanding of REST and the requestresponse lifecycle. Students learn how to build and run a local server with API endpoints
6+
Writing backend code requires an intimate understanding of REST and the request-response lifecycle. Students learn how to build and run a local server with API endpoints
57
using Node.js and Express.js, handle GET, POST, and other HTTP requests, perform
68
validations and return a response.
79

@@ -21,19 +23,15 @@ validations and return a response.
2123

2224
3 [Introduction to Express.js [R]](../module1-introduction-to-backend/r3-introduction-to-expressjs/README.md)
2325

24-
3.1 [Express.js hello world application [L]](../module1-introduction-to-backend/r3.1-expressjs-hello-world/README.md)
25-
26-
3.2 [Express.js real world application [L]](../module1-introduction-to-backend/r3.2-express.js-real-world/README.md)
26+
3.1 [Express.js Meme Website [L]](../module1-introduction-to-backend/r3.1-expressjs-meme-website/README.md)
2727

28-
3.3 [Additional practice with routes/functions on Express application [L]](../module1-introduction-to-backend/r3.3-expressjs-additional-practice/README.md)
28+
3.2 [Express.js Meme API [L]](../module1-introduction-to-backend/r3.2-express.js-meme-api/README.md)
2929

30-
3.4 [API best practices [R]](../module1-introduction-to-backend/r3.4-api-best-practices/README.md)
30+
4 [API best practices [R]](../module1-introduction-to-backend/r4-api-best-practices/README.md)
3131

32-
4 [Server-side Validation [R]](../module1-introduction-to-backend/r4-server-side-validation/README.md)
32+
4.1 [Server-side Validation [R]](../module1-introduction-to-backend/r4.1-server-side-validation/README.md)
3333

34-
4.1 [Server-side validation setup [L]](../module1-introduction-to-backend/r4.1-server-side-validation-setup/README.md)
35-
36-
4.2 [Server-side validation additional practice [L]](../module1-introduction-to-backend/r4.2-validation-additional-practice/README.md)
34+
4.2 [Server-side Validation Practice [L]](../module1-introduction-to-backend/r4.2-server-side-validation-practice/README.md)
3735

3836
5 [API Documentation [R]](../module1-introduction-to-backend/r5-api-documentation/README.md)
3937

module1-introduction-to-backend/r1-introduction-to-backend/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ As of June 2021, it is estimated that the Internet contains more than 1.8 millio
1111
If you have some experience with web development or have been reading about it, then you already know that web development tends to break down into three main concentrations: frontend, backend, and fullstack.
1212

1313
### What is a Frontend Developer?
14-
The frontend of a website is the visible part that users interact with. It is also called the User Interface (UI). Everything that you see when youre navigating around the Internet, from text, fonts and colors to buttons, dropdown menus,and sliders, is a combination of HTML, CSS, and JavaScript being rendered and controlled by your computers browser.
14+
The frontend of a website is the visible part that users interact with. It is also called the User Interface (UI). Everything that you see when you're navigating around the Internet, from text, fonts and colors to buttons, dropdown menus and sliders, are a combination of HTML, CSS, and JavaScript being rendered and controlled by your computer's browser.
1515

16-
A frontend developer is responsible for writing and maintaining the code for the user interface of the website and the architecture and functionality for the user experience of the website. Frontend developers must be competent in HTML, CSS and Javascript as their foundation along with one or more modern frameworks like ReactJS, AngularJS, VueJS, EmberJS, BackboneJS, Foundation or Svelte. They also work with UI libraries like Sass, Bootstrap, Tailwind, React Bootstrap, Material UI, Ant Design and Semantic UI and tools like Babel, Webpack, Gatsby.
16+
A frontend developer is responsible for writing and maintaining the code for the user interface of the website and the architecture and functionality for the user experience of the website. Frontend developers must be competent in HTML, CSS and Javascript as their foundation along with one or more modern frameworks like ReactJS, AngularJS, VueJS, EmberJS, BackboneJS, Foundation or Svelte. They also work with UI libraries like Sass, Bootstrap, Tailwind, React Bootstrap, Material UI, Ant Design and Semantic UI and tools like Babel, Webpack and Gatsby.
1717

1818
Frontend developers are sometimes seen as a combination of a user interface designer, user experience designer and software developer – someone who appreciates the aesthetic, usability as well as functionality of an application. They care about delivering the features and functionalities, but they also go the extra mile to ensure the user interface is aesthetically pleasing and the experience is seamless. A great frontend developer is not only proficient in programming but also good at empathising with the end users.
1919

@@ -31,35 +31,35 @@ Backend developers need to be able to navigate across larger codebases and not g
3131
### What is a Fullstack Developer?
3232
A jack of all trades? Pretty much! Often there isn't a black-and-white distinction between frontend and backend development. Frontend developers sometimes need to understand backend concepts like how REST APIs work and backend developers sometimes need to understand how components are rendered with data in their state.
3333

34-
The role of a fullstack developer was popularized by Facebooks engineering department. The idea is that a fullstack developer can work cross-functionally on the full "stack" of technology, both the frontend and backend. They are capable of performing both frontend and backend tasks and have a complete understanding of how a web application works, and how the "front" and the "back" are connected. They can build a complete web application on their own. In the current digital economy, companies are looking for such cross-discipline developers or generalists.
34+
The role of a fullstack developer was popularized by Facebook's engineering department. The idea is that a fullstack developer can work cross-functionally on the full "stack" of technology, both the frontend and backend. They are capable of performing both frontend and backend tasks and have a complete understanding of how a web application works, and how the "front" and the "back" are connected. They can build a complete web application on their own. In the current digital economy, companies are looking for such cross-discipline developers or generalists.
3535

3636
To be a good fullstack developer, you need to be comfortable with dealing with abstracts as well as empathising with end users. Good fullstack developers also need to know when to wear which hat to work effectively and efficiently because there will always be division of responsibilities
3737

3838
<img src="https://drive.google.com/uc?export=view&id=13hdTlUW0tk0J91wV-r7ruPX7uATpt9pe" width="50%">
3939

4040
## Backend Web Architecture
41-
Let's start diving deeper into what do we mean when we say frontend and backend. The frontend is the code that is executed on the client side. This code runs in the users browser and creates the user interface. The backend is the code that runs on the server, receives requests from the clients, and contains the logic to send the appropriate data back to the client. The backend also includes the database, which will persistently store all of the data for the application.
41+
Let's start diving deeper into what do we mean when we say frontend and backend. The frontend is the code that is executed on the client side. This code runs in the user's browser and creates the user interface. The backend is the code that runs on the server, receives requests from the clients, and contains the logic to send the appropriate data back to the client. The backend also includes the database, which will persistently store all of the data for the application.
4242

4343
### What are clients?
4444
The clients are entities that send requests to the backend. They are often browsers that make requests for the HTML and JavaScript code that they will execute to display websites to the end user. However, there are many different kinds of clients: they might be a mobile application, an application running on another server, or even a web enabled smart appliance.
4545

4646
### What is a backend?
4747
The backend is all of the technology required to process the incoming request and generate and send the response to the client. This typically includes three major parts:
48-
- The server. This is the computer that receives requests and sends responses.
49-
- The app. This is the application running on the server that processes the requests, retrieves information from the database, and sends a response.
50-
- The database. Databases are used to organize and persist data.
48+
- **Server**: This is the computer that receives requests and sends responses.
49+
- **Application**: This is the application running on the server that processes the requests, retrieves information from the database, and sends a response.
50+
- **Database**: This is used to organize and persist data.
5151

5252
### What is a server?
53-
A server is simply a computer that listens for incoming requests. Though there are machines made and optimized for this particular purpose, any computer that is connected to a network can act as a server. In fact, you will often use your very own computer as server when developing apps.
53+
A server is simply a computer that listens for incoming requests. Though there are machines made and optimized for this particular purpose, any computer that is connected to a network can act as a server. In fact, you will often use your very own computer as a server when developing apps.
5454

55-
The term "server" is also very often used to refer directly to the backend application running on the server. For example, if we build a backend application to manage the student data of a university, we can refer to it as the student server. When you hear a developer say "the sever has crashed", they could either mean the backend application has crashed due to an error in the code or the server running the application has crashed due to a hardware issue.
55+
The term "server" is also very often used to refer directly to the backend application running on the server. For example, if we build a backend application to manage the student data of a university, we can refer to it as the student server. When you hear a developer say "the server has crashed", they could either mean the backend application has crashed due to an error in the code or the server running the application has crashed due to a hardware issue.
5656

5757
Frontends also have servers. Technically when you build a website or a web application, you will be hosting it on a service like Netlify or Heroku, which means it will live on a server. However, each time a new user visits this site from their browser, the server will send the HTML to the user's browser where it will then start running as a client.
5858

5959
Once we start building our backend applications we will observe the use of this term more in action.
6060

6161
### What kinds of responses can a server send?
62-
The data that the server sends back can come in different forms. For example, a server might serve up an HTML file, send data as JSON, or it might send back only an HTTP status code. Youve probably seen the status code "404 - Not Found" whenever youve tried navigating to a URI that doesnt exist, but there are many more status codes that indicate what happened when the server received the request.
62+
The data that the server sends back can come in different forms. For example, a server might serve up an HTML file, send data as JSON, or it might send back only an HTTP status code. You've probably seen the status code "404 - Not Found" whenever you've tried navigating to a URI that doesn't exist, but there are many more status codes that indicate what happened when the server received the request.
6363

6464
> Okay I want to see some code now!
6565

module1-introduction-to-backend/r1.1-beginners-guide-nodejs-npm/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We will be working in the Node.js and NPM environment throughout this bootcamp.
44
2. Advantages of Node.js and why this course is focussed on Node.js
55

66
## Introduction to Node.js
7-
Is it a programming language? Is it a library? No, it's Node.js. In simple words, Node.js is nothing but JavaScript running on the server-side and its awesome.
7+
Is it a programming language? Is it a library? No, it's Node.js. In simple words, Node.js is nothing but JavaScript running on the server-side, and it's awesome.
88

99
<img src="https://drive.google.com/uc?export=view&id=1oaHgcGKcrKbW6G-gFsncV95WhVmc40M7">
1010

@@ -29,7 +29,9 @@ server.listen(port, hostname, () => {
2929
})
3030
```
3131

32-
Using the http module, one of many useful Node.js libraries, an HTTP server is created. The server is set to listen on the specified host name and port. When the server is ready, the callback function is called, in this case informing us that the server is running. Whenever a new request is received from a client, the request event is called, providing two objects: a request and a response. The first provides details of the request, although not used in this example, and the second is used to return data to the client.
32+
Using the http module, one of many useful Node.js libraries, an HTTP server is created. The server is set to listen on a specified hostname and port. When the server is ready, the callback function is called, in this case informing us that the server is running. Whenever a new request is received from a client, the request event is called, providing two objects: a request and a response. The first provides details of the request, although not used in this example, and the second is used to return data to the client.
33+
34+
You will learn more about the keywords mentioned in this code block throughout this module.
3335

3436
### Some brief history first
3537
Node.js is only 12 years old, not a long time in tech. In comparison, JavaScript itself is more than 20 years old, and we know that it is what runs in our browsers. JavaScript was created at Netscape, which also tried to create LiveWire, an attempt at server-side JavaScript. Unfortunately, it wasn't very successful and server-side JavaScript did not grow in popularity until the introduction of Node.js in 2009.
@@ -39,7 +41,7 @@ One key factor that led to the rise of Node.js was the timing. Just a few years
3941
When Ryan Dahl wrote Node.js, one of his motivations was the limited possibilities of the most popular web server in 2009, Apache HTTP Server, to handle a lot of concurrent connections and the most common way of creating code which either blocked the entire process or implied multiple execution stacks in the case of simultaneous connections. A Node.js app runs in a single process, without creating a new thread for every request. Node.js provides a set of asynchronous I/O primitives in its standard library that prevent JavaScript code from blocking and generally, libraries in Node.js are written using non-blocking paradigms, making blocking behavior the exception rather than the norm.
4042

4143
### Features of Node.js
42-
Firstly, though `.js` is the standard filename extension for JavaScript code, the name "Node.js" doesn't refer to a particular file in this context and is merely the name of the product.
44+
Firstly, though `.js` is the standard filename extension for JavaScript code, the name "Node.js" doesn't refer to a particular file in this context and is merely the name of the product. It can also be written as "NodeJS" or simply "Node".
4345

4446
1. **Speed**: Having been built on Google Chrome's V8 JavaScript engine, Node.js is extremely fast for code execution.
4547
2. **Rich libraries**: Node Package Manager (NPM) has more than 50,000 bundles or libraries, so whatever functionality is required for an application can be easily imported from NPM.
@@ -56,11 +58,11 @@ One of the major factors of Node's success is npm - its popular package manager,
5658
- a CLI (command-line interface) tool for publishing and downloading packages, and
5759
- an online repository that hosts JavaScript packages</br>
5860

59-
A package is nothing but a directory that contains a bunch of modules. Some popular npm packages are [lodash](https://lodash.com/) and [moment](https://momentjs.com/). Node.js has a wide community that develop good packages for everybody to use.
61+
A package is nothing but a directory that contains a bunch of code modules. Some popular npm packages are [lodash](https://lodash.com/) and [moment](https://momentjs.com/). Node.js has a wide community that develop good packages for everybody to use.
6062

6163
When we have a remote package in our project, it is called as a dependency since our project depends on it. We need to keep track of our dependencies or at least list them down somewhere. We list all our dependencies inside a `package.json` file which is a JSON file that contains some information about our project and dependencies it needs. This file is essential for NPM.
6264

63-
Node.js also ships with a collection of [built-in packages](https://nodejs.org/api/index.html) called as a Node Standard Library. These packages are essential to perform low-level operations like File System I/O and Networking. We do not have to install them using NPM.
65+
Node.js also ships with a collection of [built-in packages](https://nodejs.org/api/index.html) called as Node Standard Library. These packages are essential to perform low-level operations like File System I/O and Networking. We do not have to install them using NPM.
6466

6567
### How much JavaScript should I know to use Node.js?
6668
As a beginner, it can be difficult to understand where does JavaScript end, and where Node.js begins, and vice versa. However, when you're writing code for a Node.js application you are writing JavaScript. So, it is important to grasp the fundamentals of JavaScript syntax such as:
@@ -70,7 +72,7 @@ As a beginner, it can be difficult to understand where does JavaScript end, and
7072
- Classes
7173
- Variables
7274
- Functions
73-
- this
75+
- `this`
7476
- Arrow Functions
7577
- Loops
7678
- Scopes

0 commit comments

Comments
 (0)