forked from HackYourFuture/study
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some Node.js and internet articles
- Loading branch information
Showing
10 changed files
with
148 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# The client-server model | ||
|
||
The `client-server model` is one of the most important concepts in web development. The easiest way to explain this concept is by using an analogy. | ||
|
||
> Let's say you are hungry and feel like going to a restaurant. The moment you enter the restaurant you are a customer, or in IT terms a `client`. You take a seat and decide to order various things, each order representing a separate `request`: you are requesting an orange juice and requesting a nice, healthy salad. Your requests are heard by the waiter, or in IT terms the `server`. Their job is to listen to your requests and do whatever is necessary to provide you with what you want. The actual services, like cooking the food, making the drinks or doing the dishes are all done by others. However, to the client the end result of these services are all provided by the server. You don't want to know who performs what service, you just want to eat. When the server comes back with whatever you ordered, they provide you with a `response`. This happens whether or not they could fulfill your requests. | ||
In a web application, the process is very similar. The browser, by way of the application user interface, is the `client`. Some computer that has the data and services you want is the `server`. | ||
|
||
Let's say you log in to your online bank account: | ||
|
||
As the client, you want to see the amount of money you currently have. The browser sends out a request to the server, who then activates the necessary services (in this example, some kind of database) and returns with a response containing the exact amount of money you currently have in the bank. | ||
|
||
The video below also explains it well: | ||
|
||
{% hyf-youtube src="https://www.youtube.com/watch?v=L5BlpPU_muY" %} | ||
|
||
# Extra reading | ||
If you just can't get enough, here are some extra links that mentors/students have found useful concerning this topic: | ||
|
||
- [Client-Server Model & Structure of a Web Application](https://medium.freecodecamp.org/how-the-web-works-part-ii-client-server-model-the-structure-of-a-web-application-735b4b6d76e3) | ||
- [Fundamentals of Web apps](https://fullstackopen.com/en/part0/fundamentals_of_web_apps) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# Express.js | ||
|
||
- [Traversy Crash Course](https://www.youtube.com/watch?v=L72fhGm1tfE) | ||
In Node.js it's possible to make a HTTP server, using the native `http` module, as we saw in the Node.js crash course video. However, this is rarely used in practice. Instead, we'll use [Express.js](https://expressjs.com/en/4x/api.html), a backend framework for Node.js that can do what the `http` module does and much more (in a simpler, faster and more readable way). | ||
|
||
Practically speaking, what can we do with a web server like `http` or `Express`? All the magic that is needed so we can successfully get what we want from an application: | ||
|
||
- Get and store data that comes from the frontend | ||
- Make API calls to other services | ||
- Secure data that comes from both the frontend and the database | ||
- Any other type of calculation or business logic | ||
|
||
The following course gives a great introduction to the package: | ||
|
||
{% hyf-youtube src="https://www.youtube.com/watch?v=L72fhGm1tfE" %} | ||
|
||
# Extra reading | ||
If you just can't get enough, here are some extra links that mentors/students have found useful concerning this topic: | ||
|
||
- [Going out to eat and understanding the basics of Express.js](https://medium.freecodecamp.org/going-out-to-eat-and-understanding-the-basics-of-express-js-f034a029fb66) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Backend | ||
|
||
In software development, the code that makes the display is often separated from the code that handles the data traffic. The real world contains many examples of this division: take for example an ATM: | ||
|
||
 | ||
|
||
What you can interact with, the buttons or the place where you can insert your card, is called the `frontend` (also known as the `user interface`). However, everything that's needed to make it work the way it does, i.e. the software needed to make it do the real work (moving data from one place to another) is called the `backend`. | ||
|
||
In web development the term backend can be boiled down to 3 components: | ||
|
||
- A `server`: a computer that is connected to other computers, which runs an application (see below) that allows for sharing and managing services (like a calculator or word processor) and resources (like images, text files). | ||
- A `database`: software that manages and saves sensitive data for later use. | ||
- An `application`: software that communicates between the database, frontend and other servers. It contains code that allows it to interact with and manipulate the server, database and other types of software services. | ||
|
||
For more information, read: | ||
|
||
- [Basics of backend development](https://www.upwork.com/hiring/development/a-beginners-guide-to-back-end-development/) | ||
- [Getting started with backend development](https://codeburst.io/getting-started-with-backend-development-bfd8299e22e8) | ||
|
||
When people refer to backend programming, they usually refer to **writing the application** part of the backend: the software that interacts with a server (a computer) and database, and moves data from one computer to the next. | ||
|
||
This software is usually a `web server` that serves as an `API`, which can be used to move data to or get data from in order to satisfies client requests. | ||
|
||
Why would we need a backend? There are multiple reasons: | ||
|
||
- **Security**. We don't want any random user to directly access our sensitive data, without verifying who they are. For example, if you have an online bank account then you need to login to verify it's you. The whole process of login and verification is code written in a place (the backend) that can't be reached so easily. | ||
- **Performance**. The speed of our user interfaces is greatly dependent upon the server that provides it. The backend contains code that makes sure it optimally makes use of the server's resources (hardware, memory, etc.) to provide the user with the best experience. | ||
- **Software interactions**. A web application usually makes use of other people's software, web services. The code that communicates with these services and implements it into the frontend is also contained within the backend. | ||
|
||
For more information, read: | ||
[Why do we need the backend?](https://www.quora.com/Why-do-we-need-a-back-end-in-web-development-Cant-the-front-end-directly-send-requests-to-the-database) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,26 @@ | ||
## The Internet | ||
|
||
What is it? As you study, continue to take note of when and how you come across the concepts you learned here. | ||
There is a great series on how the internet works that explains it better than we could. So have a look at it [here](https://www.youtube.com/playlist?list=PLzdnOPI1iJNfMRZm5DDxco3UdsFegvuB7). | ||
|
||
### Index | ||
* [the internet](#the-internet) | ||
* [browsers](#browsers) | ||
* [web apps](#web-apps) | ||
* [HTTP](#http) | ||
As web developers we do need to dive a little deeper though as we are going to be working with all these systems. The following two videos explain the nitty-gritty parts for web developers: | ||
|
||
--- | ||
|
||
### The internet | ||
|
||
* [Foundations of the Web](https://shawnr.gitbooks.io/foundations-of-the-web/) | ||
* [how it works, 5 min](https://www.youtube.com/watch?v=7_LPdttKXPc) | ||
* [Khan Academy's Intro](https://www.khanacademy.org/computing/computer-science/internet-intro) | ||
* [The Odin Project's intro](https://www.theodinproject.com/courses/web-development-101/lessons/how-does-the-web-work) | ||
* [Time-Lapse Maps of the Internet](https://www.vox.com/a/internet-maps) | ||
* [internet for webdevs](https://www.youtube.com/watch?v=e4S8zfLdLgQ). And there's a part two. | ||
* [OSI model](http://www.webopedia.com/quick_ref/OSI_Layers.asp) | ||
* Good videos: [part 1](https://www.youtube.com/watch?v=e4S8zfLdLgQ), [part 2](https://www.youtube.com/watch?v=FTAPjr7vgxE) | ||
* <a href="https://www.youtube.com/watch?v=7_LPdttKXPc" target="_blank">How the Internet Works in 5 Minutes</a> | ||
* <a href="https://www.youtube.com/watch?v=WjDrMKZWCt0" target="_blank">How Web Browsers Work</a> | ||
|
||
----------- | ||
|
||
### Browsers | ||
|
||
In the simplest definition, a browser is an application that imports and renders HTML, CSS & JS from anywhere in the internet. Check out the resources below for a better overview. | ||
|
||
* [LifeWire](https://www.lifewire.com/what-is-a-browser-446234) | ||
* [Foxy Video](https://www.google.com/search?q=what+is+a+web+browser&client=safari&rls=en&source=lnms&tbm=vid&sa=X&ved=0ahUKEwjT_fHmrubbAhWszIMKHYArAKUQ_AUICigB&biw=1280&bih=739) | ||
* [Browser vs Search Engine](https://www.computer-geek.net/what-is-the-difference-be-va-47.html) | ||
* [how do they work](https://www.youtube.com/watch?v=WjDrMKZWCt0) | ||
* [Browsers? 1](https://www.youtube.com/watch?v=TcbhVv9ty44) | ||
* [Browsers? 2](https://www.youtube.com/watch?v=Ir61LfjYyHk) | ||
|
||
|
||
----------------- | ||
|
||
### Web Apps | ||
|
||
In simplest words a web application is just software that its split across the internet. The part you see runs on your computer, but it talks with other parts anywhere in the world using HTTP. Those other parts usually do all the hard work. | ||
{% hyf-youtube src="https://www.youtube.com/watch?v=e4S8zfLdLgQ" %} | ||
|
||
* [Being a Web Developer](https://www.theodinproject.com/courses/web-development-101/lessons/introduction-to-web-development) | ||
* [great video](https://www.youtube.com/watch?v=RsQ1tFLwldY) | ||
* [another video](https://www.youtube.com/watch?v=_E8qXBHI4cg) | ||
* [what exactly is a web app](https://www.lifewire.com/what-is-a-web-application-3486637) | ||
* [what's a web app, how's it work?](https://www.quora.com/What-is-a-web-app-and-how-does-it-work-Please-explain-what-it-is-how-it-works-architecture-wise-and-whatever-else-you-think-is-important-and-in-which-way-it-is-different-than-the-previous-way-of-doing-things) | ||
* [web-app vs web-site 1](https://stackoverflow.com/questions/8694922/whats-the-difference-between-a-web-site-and-a-web-application) | ||
* [web-app vs web-site 2](https://www.seguetech.com/website-vs-web-application-whats-the-difference/) | ||
{% hyf-youtube src="https://www.youtube.com/watch?v=FTAPjr7vgxE" %} | ||
|
||
--- | ||
|
||
### HTTP | ||
# Extra reading | ||
If you just can't get enough, here are some extra links that mentors/students have found useful concerning this topic: | ||
|
||
It's sort of like a secret code that everyone knows. For now you just need to know that it exists, you'll get plenty of time to understand it when you build API's. | ||
- [Foundations of the Web](https://shawnr.gitbooks.io/foundations-of-the-web/) | ||
- [how it works, 5 min](https://www.youtube.com/watch?v=7_LPdttKXPc) | ||
- [Khan Academy's Intro](https://www.khanacademy.org/computing/computer-science/internet-intro) | ||
- [The Odin Project's intro](https://www.theodinproject.com/courses/web-development-101/lessons/how-does-the-web-work) | ||
- [Time-Lapse Maps of the Internet](https://www.vox.com/a/internet-maps) | ||
- [internet for webdevs](https://www.youtube.com/watch?v=e4S8zfLdLgQ). And there's a part two. | ||
- [OSI model](http://www.webopedia.com/quick_ref/OSI_Layers.asp) | ||
- Good videos: [part 1](https://www.youtube.com/watch?v=e4S8zfLdLgQ), [part 2](https://www.youtube.com/watch?v=FTAPjr7vgxE) | ||
- <a href="https://www.youtube.com/watch?v=7_LPdttKXPc" target="_blank">How the Internet Works in 5 Minutes</a> | ||
- <a href="https://www.youtube.com/watch?v=WjDrMKZWCt0" target="_blank">How Web Browsers Work</a> | ||
|
||
* [http video](https://www.youtube.com/watch?v=eesqK59rhGA) | ||
* [Easy HTTP](https://www.jmarshall.com/easy/http/) | ||
* [HTTP Video](https://www.youtube.com/watch?v=eesqK59rhGA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.