Learning Library

← Back to Library

Video _O6cy4_4uvw

Full Transcript

# Video _O6cy4_4uvw **Source:** [https://www.youtube.com/watch?v=_O6cy4_4uvw](https://www.youtube.com/watch?v=_O6cy4_4uvw) **Duration:** 00:06:36 ## Sections - [00:00:00](https://www.youtube.com/watch?v=_O6cy4_4uvw&t=0s) **Untitled Section** - - [00:03:00](https://www.youtube.com/watch?v=_O6cy4_4uvw&t=180s) **Untitled Section** - - [00:06:08](https://www.youtube.com/watch?v=_O6cy4_4uvw&t=368s) **Untitled Section** - ## Full Transcript
0:00My topic for today is the MERN stack. 0:02Let's break this one down. 0:04The M stands for MongoDB; great NoSQL database. 0:08There's a lot more on that in other videos that we have. 0:11The E is for Express, your web server. 0:15R for React. 0:16Great web language to build presentation layer, or front ends. And the N is for Node.js, which really empowers it all and brings it all together. 0:25Now that we defined everything, let's kind of show some of the areas I looked at when I evaluated my MERN stack 0:31to use it for my applications and why I made the decisions here and the capabilities that it provides. 0:37So the first. 0:39Let's deal with the front end; I'll break things up by front end, server side, and the back end, or the database layer. 0:46This is how I really kind of conceptually break things down in my separation of concerns. 0:52So let's say the front end. 0:54And what I really look for is the capability, when you do a Web 2.0, is really all about the user experience. 1:00So let's break that up. 1:06And when we come from the LAMP stack to move into other different kind of frameworks, 1:10mainly the MEAN and the MERN, it's really about the level of interaction you can provide from your front end. 1:16And that's really where React kind of comes in. 1:19And it gives you the instant capabilities to produce single page applications, or SPAs, as you can see. Hot keyword. 1:28But really, it's really about building user interfaces that don't have the traditional page loading -- every click loads the entire page 1:36but just really focusing on the content of what needs to, to actually update. 1:41Example of that, if I have a website 1:43that has common sidebar and a table of options. 1:48Every option I click, updates the table. 1:51Updates to table. 1:52Just that part of the website, not necessarily the whole user interface. 1:57And that's really what Web 2.0 accomplishes for you now. 2:01Now React is your language to do that. 2:03Love the declarative nature of that, 2:04where you're just concerned about 2:06what should the state be. 2:08Great opportunity there. 2:09The second -- let's get into your server side. 2:13So on the server. 2:18So I looked at that here, 2:19what flexibility does it offer for me? 2:21When I was in a LAMP stack situation, I was really, the programing language, really had to in this instance, the Node.js, 2:29or in that one the PHP, had to really heavily depend upon its capabilities to provide me all the functionality. 2:35Well, that paradigm shifts upside down. 2:37This is really the core foundation of everything you're doing here. 2:41Let's make that actually another level here. 2:44It's a big separation 2:45from front end and the back end and the server side here. 2:49So with this, you're going to start off by being 2:51on Node.js, 2:55which is going to have, can be extended through 2:58packages called NPMs. 3:00All right. 3:00The Node Package Manager provides you opportunity to augment the capabilities of what Node.js can do. 3:07Just like in app development, 3:08we say there's an app for every kind of utility that you want to do, every function that you want to do. 3:13Same thing -- rule applies when it comes to Node.js and NPMs. 3:17There is always an NPM for anything that you need to do or want to do in your application. 3:22One of the frameworks of that is Express. 3:26And it's built on top of Node.js. Functions as your web server assembly, as do many popular ones out there, like Apache for my LAMP stack. 3:35Now, with the user experience, it gives me that ability to instantly go SPA and do traditional. 3:41I didn't mention that, but I can also still facilitate, 3:44there are some use cases where I 3:46still may want to have a hybrid mixed -- 3:49half SPA, half traditional. 3:50I have all that flexibility to do. 3:53Now with server side, 3:54I can really -- that's well a lot of my functionality is. Express gives me the ability to create 3:59REST APIs that can 4:01feed the front end, the React web application, and 4:06also I can do 4:09the REST; I have option for web sockets. 4:13NPMs is where I will actually also bring in my database functionality for me to use; and that's where I'll put this final piece here. 4:21Let's do this. 4:22Let's break that up again. 4:26And that's what we're going to have the database. 4:28I'll abbreviate it here, and this is going to be Mongo. 4:36Again, we have more dedicated videos we can deep dive into Mongo, 4:40but we have that NoSQL nature that it provides here. In these usual scenarios, 4:46all the data I'm providing through REST APIs to my SPA, to React, is going to be JSON objects. 4:52And so we know that Mongo is already set up to be a NoSQL, so no definite SQL structure, all JSON entities or objects. 5:01So that's great. 5:03As you can see, the framework really provides all these set up for you to really work. 5:08And at the end of the day, it's really about the 5:12flexibility. 5:16Let's not forget the overall goal in mind here is to be as efficient and to move as quickly as possible to build our MVPs. 5:23And that's why these stacks are important, is because they already provide these things that work together. 5:28Now, with that particular piece, 5:29I had the separation of the front end from the server side. 5:33So it allows me to move at different speeds. 5:36You know, I can I have that ability to really work on my web front end and only add in things that I need. 5:43I can deploy them independently to actually have them work together. 5:48But that flexibility is very, very important to me and having the ability of almost being able to accommodate most scenarios. 5:54So this quickly became my top choice when it came to build web applications and also APIs to feed mobile applications as well. 6:03Definitely is still in my toolkit whenever a project comes to mind. 6:08All right. 6:08So that's all I have for today. 6:10Please leave your comments below about questions about the MERN stack 6:15or any other topics you would like to see us talk about moving forward. 6:21Till next time, I'm Jamil Spain, technically yours. 6:25If you have any questions, please drop us a line below. And if you want to see more videos like this in the future, 6:31please Like and Subscribe.