Node.js Crash Course Tutorial #11 - Express Router & MVC

  Рет қаралды 224,238

Net Ninja

Net Ninja

Күн бұрын

Пікірлер: 202
@mikeandrewfernandez9797
@mikeandrewfernandez9797 Жыл бұрын
What a frustrating yet awesome journey! It's already 2023 and still relevant. After 1 week of following the tutorial I was able to learn Mongo DB, the concept of Servers, MVC's, and Mongoose. I am now confident to take these new backend learnings into higher levels. Thank you so much, Net Ninja!
@howTo_79
@howTo_79 Жыл бұрын
probably the best tuitorial on YT it is just missing the REST API part
@johnconnor9787
@johnconnor9787 4 жыл бұрын
The best MVC explanation ever. You come to this concept so gradually, that in the end every piece of a puzzle clicks in the head and the whole picture appears so logical. Thank you, Shaun
@shansiddiqui4741
@shansiddiqui4741 3 жыл бұрын
Are you the same John Connor from the Terminator ? The one who will lead the resistance and save us from extinction ?
@DavidEzequielPerez
@DavidEzequielPerez Жыл бұрын
absolutely agree, thank you for this explanation!
@mrsevensin438
@mrsevensin438 Ай бұрын
Just for the people who need it. If you move somewhere else during development and connect to new network, your IP will change. With this setup, your cluster remembers only the one you created it with, so you need to add the current one for the app to work. Otherwise, your app wont start with this message "clean exit - waiting for changes before restart" and this ERROR "MongooseServerSelectionError". And for you Ninja, I did not believe that you can make tutorials with such a grace. You are greaat teacher to listen to, explaining concepts in exact depth the newbie needs. Thank you very much, my favourite channel so far. Hello from Odin Project student as well :).
@bryanbandela
@bryanbandela 3 жыл бұрын
This video is definitely the climax of this playlist. No one has ever explained MVC like you have done it here, it was masterfully put together like a magician or should I say like a Ninja. I wish you had more courses on Udemy to show you more supports. May God bless you for what you do for the community.
@jordanski5421
@jordanski5421 4 жыл бұрын
This is the first time I'm actively following a design pattern in one of my own projects and the examples you give here are exactly what I needed to fully understand the concept of not just MVC but design patterns in general. Thank you for that.
@HumbleShoeLace
@HumbleShoeLace 2 жыл бұрын
This has been a very awesome series !! went from zero to creating an entire application within just a few video !!
@kerendn
@kerendn 3 жыл бұрын
Fantastic explanation. I love how you start with simple/straightforward/messy and then you move on to elegant/organized/modular.
@saida584
@saida584 4 жыл бұрын
The Best in Best to understand the concept of MVC in 22 Mins. Lots of LOVE Master ♡
@dimitmoto1716
@dimitmoto1716 3 жыл бұрын
Best explanations on those topics, I've found in youtube! Thank you!
@TheSlyDragon93
@TheSlyDragon93 4 жыл бұрын
Had this issue with the last lesson 6:12 with the create method quite happy I managed to engineer it to work myself with no guidance yay me. Made me realise the importance of the order code must be laid out
@devrano48
@devrano48 4 жыл бұрын
It took 1 week to finish, i studied every second of this series. Feel like i learned node finally.
@raz0229
@raz0229 4 жыл бұрын
Same here, although I was familiar with Node before but those Udemy courses were only self-promotions and you actually had to purchase the full course even though the concepts weren't clear. I really appreciate and thank _The Net Ninja_ for such high-quality videos right here on YT.
@devrano48
@devrano48 4 жыл бұрын
Keep working guys now i'm about to create twitter clone :) Especially REST api is so important.
@ayoubnachat5920
@ayoubnachat5920 3 жыл бұрын
Hhhh i finish it in one night (•_•)
@ihsannuruliman3656
@ihsannuruliman3656 3 жыл бұрын
finish it in 2 days but I feel like in the end only remember 30% so perhaps I need a little bit refresher so I'll watch once again from the very beginning :D
@devrano48
@devrano48 3 жыл бұрын
@@ihsannuruliman3656 take note to the google document.
@ahmedezealdean6189
@ahmedezealdean6189 8 ай бұрын
great course man, it amazing that a content with this quality is in youtube for free, keep going.
@russelldriver6394
@russelldriver6394 4 жыл бұрын
Would you think about doing a personal bio video. How you got into code, why you started a KZbin channel, is this your sole job etc. I think your audience might appreciate that! I know I would!
@NetNinja
@NetNinja 4 жыл бұрын
One day - I don't have a decent setup for camera / studio yet. But in the future when I upgrade my studio I'll make these kinds of videos.
@theengagedcoach440
@theengagedcoach440 4 жыл бұрын
@@NetNinja Eagerly wating for it bro
@indianappguy
@indianappguy 4 жыл бұрын
@@NetNinja at least give us an option to connect on different social media channel
@mythicalwraith7026
@mythicalwraith7026 4 жыл бұрын
@@NetNinja even if you talk to a white screen I'll be fine with watching the video 😄
@rpanda_old
@rpanda_old 4 жыл бұрын
@@NetNinja hey can you please create a discord server where everyone can discuss any problems we face during learning the various web technologies. This will help you too to better interact with us.
@saranavinash9261
@saranavinash9261 7 ай бұрын
The thing I have been searching for to organize my code in a profesional manner and I finally found it, thank you
@diegoavendanohernandez9908
@diegoavendanohernandez9908 8 ай бұрын
My new favorite web development teacher
@nyashachiroro2531
@nyashachiroro2531 3 жыл бұрын
Thank you. Honestly these guys work so hard for us. It must be really fulfilling to know you are making such an impact in people's lives
@samratmukherjee7131
@samratmukherjee7131 3 жыл бұрын
I've seen many hands on tutorials regarding various topics. But your channel just hits different. Amazing work. Thanks bro
@SteeleMan223
@SteeleMan223 4 жыл бұрын
This course has been absolutely phenomenal! I had to learn node for a work project and I feel very comfortable in my shoes now!
@kabelomoola1846
@kabelomoola1846 3 жыл бұрын
The best NodeJs MVC explanation ever!!! Thank you very much.
@swankitydankity297
@swankitydankity297 3 жыл бұрын
I can't begin to tell you how useful this video was for me! Thank you very much for this tutorial :)
@gennerawsama5955
@gennerawsama5955 3 жыл бұрын
now thats what i love , seeing him debug his code is what we need and im glad he shows that , damn i learned so much a big thanks
@saidalizade1291
@saidalizade1291 4 жыл бұрын
This channel deserves more subs
@kalltreaionc
@kalltreaionc Жыл бұрын
Amazing Job sir - clear and concise course. Thank you for all the hard work put into this course ; appreciate you.
@NetNinja
@NetNinja Жыл бұрын
No probs! :) thanks for watching
@21legaci23
@21legaci23 3 жыл бұрын
the best tutorials I never regret watching, all your tutorials are always on point, short yet well explained, and well understandable to me, and, thank you
@kimokimo-se3ur
@kimokimo-se3ur 3 жыл бұрын
​ @The Net Ninja Shaun did you know that you and your content made me a MERN Stack dev , thank you from all my heart
@okikiolaosunronbi8766
@okikiolaosunronbi8766 2 жыл бұрын
Thank you for creating this course, really gave me the knowledge I needed to start learning backend programming. Cant wait to really get into it
@NetNinja
@NetNinja 2 жыл бұрын
Glad it was helpful! :)
@AhmedLebda-gm9qo
@AhmedLebda-gm9qo 8 ай бұрын
Before watching this video i spend like half an hour trying to figure out why the create route doesn't work and he just looks at the code and figure it instantly with one look wow Great video as always
@ariolverab
@ariolverab 3 жыл бұрын
Marvelous tutorial with 11 videos, how you explained it´s so easy to understand. Without The Net Ninja & Traversy Media i´ll be just freaking lost.
@muslim101f
@muslim101f 3 жыл бұрын
19:19 LOL That was a great tutorial with an awesome tutor. Really thank you! :)
@spamdam1588
@spamdam1588 3 жыл бұрын
Oh my goodness, thank you so much! You just helped me solve a problem I've stuck on for an embarrassing amount of time. I was also missing that one extra period on my routes file reference because my app file is inside of a folder, and I was getting "Module not found." I hadn't been able to find run into the exact same problem until now. The smallest things are the most frustrating. Everything is running golden now :)
@PabloArceo-synclab
@PabloArceo-synclab 3 жыл бұрын
Finished this, absolutely amazing explanation. Got your novice to ninja and D3.js courses on udemy. I was a bit slow on those, but after this I just subscribed to your ninja pro plan and I got really pumped up. You are an excellent and passionate teacher I might add. Thans man!
@mythicalwraith7026
@mythicalwraith7026 4 жыл бұрын
Watched this whole series in a day! Your videos are great! 😄😄
@AdventEchoo
@AdventEchoo 4 жыл бұрын
Enjoying this tut...learned a lot, after coming from your modern js tut this makes life easy :)
@yogiunit2021
@yogiunit2021 7 ай бұрын
Everything comes down neat in the end, nicely explained, thank you
@NetNinja
@NetNinja 7 ай бұрын
Thanks :) hope it was helpful!
@kunlohith
@kunlohith 3 жыл бұрын
MVC: Making Views Correctly. Like Wow, this is a miracle how you incredible you explain Mvc and told what we do. Just WOW! Mr. Ninja, I think you are a real black belt ninja. I, as a kid, love it and is inspired to do more. I even liked this video. And plz reply. Thanks.
@ghadasuqr343
@ghadasuqr343 4 жыл бұрын
How can you make things so easy, it's amazing
@jasper5016
@jasper5016 2 жыл бұрын
Even UDEMY premium courses dont provide these kind of details. Thanks Shaun.
@joypro5278
@joypro5278 11 ай бұрын
Best tutor you could ever get to know
@SiriusFuenmayor
@SiriusFuenmayor 3 жыл бұрын
Another excellent tutorial from the Net Ninja
@daiyan5688
@daiyan5688 2 жыл бұрын
Best video I have watched regarding those Topics. You helped me so much Sir!
@NetNinja
@NetNinja 2 жыл бұрын
Great to hear that. Thanks for watching Daiyan!
@solomonimhomoh1056
@solomonimhomoh1056 3 жыл бұрын
The best explanation ever. You're a life saver. Thanks
@omerakcan2839
@omerakcan2839 2 жыл бұрын
Best tutor best mvc explanation! thank you for sharing it.
@NetNinja
@NetNinja 2 жыл бұрын
You're very welcome! Thanks Omer :)
@Shakeel714
@Shakeel714 4 жыл бұрын
Awesome tutorial series on NodeJS!! Thanks Shaun
@infinitecodelk3563
@infinitecodelk3563 4 жыл бұрын
I m from sri lanka You are genius. Thank for free tutorials. You channel is very help full. I told my friends about net nija👋
@andbandu
@andbandu 4 жыл бұрын
now I am here brother. nice to see you in this dojo as our nation guy
@infinitecodelk3563
@infinitecodelk3563 4 жыл бұрын
@@andbandu wow.nice brother.this channel is awsome
@dominicdeheuer937
@dominicdeheuer937 3 жыл бұрын
This EXPRESS tutorial is AWESOME!👍👍👍👍👍❤️❤️❤️❤️❤️❤️
@shadow_was_here
@shadow_was_here 3 жыл бұрын
Great series of video tutorials. Everything was explained precisely.
@ujwal5459
@ujwal5459 2 жыл бұрын
best tutorial on mvc architecture
@technoinfoworldwide2329
@technoinfoworldwide2329 4 жыл бұрын
Node js by covering all the topic..amazing...
@a1225johnny
@a1225johnny 3 жыл бұрын
Very clear and full of explanation! Thanks a lot!
@mariarazo6977
@mariarazo6977 2 жыл бұрын
Such a clear and concise tutorial series. Thank you!
@ArtOfFun
@ArtOfFun 4 жыл бұрын
Its a very useful video. Excellent explanation MVC. Thank you!
@Deeloveya
@Deeloveya 2 жыл бұрын
Thank you from Paris - France. Merci !
@whoIsV
@whoIsV Жыл бұрын
I love your way of teaching. Would you please make a Crash course on Redux Toolkit please?
@rushtothemax76
@rushtothemax76 4 жыл бұрын
This man is better at teaching me 2 code than my own teacher🔥
@ripinsurreality5978
@ripinsurreality5978 4 жыл бұрын
Awesome tutorial! Unfortunately, it sometimes happens to me that I make a tiny mistake and then spend hours trying to fix it, finding that the cause of this was my inattentiveness. So, if anyone's having a problem of the styles not loading on all the pages, that start with /blog/, you probably forgot to put / before styles.css in your head.ejs, which should be href="/styles.css" instead of href="style.css"
@cheesecurls7
@cheesecurls7 3 жыл бұрын
Literally had the same problem and it was so frustrating! Definitely will remember to put the leading / in there now though lol
@jondenjack
@jondenjack 2 жыл бұрын
Likewise!!
@myapptheme
@myapptheme 4 жыл бұрын
Excellent tutorial as usual. Awesome..... Thank you! "The Net Ninja".
@delidag
@delidag Жыл бұрын
Thanks for useful tutorial. This is the best MVC tutorial
@NetNinja
@NetNinja Жыл бұрын
Awesome :) Glad it was helpful!
@yinonb172
@yinonb172 4 жыл бұрын
best node.js tutorial ever
@amrmoneer5881
@amrmoneer5881 4 жыл бұрын
Wow so beautifully and simply explained thanks mate
@amymarais4909
@amymarais4909 3 жыл бұрын
One of the best teachers 😭
@erfanahmed_official
@erfanahmed_official 2 жыл бұрын
at 7:04 why it goes to `/blog/:id` instead of `/blog/create`? these are completely two separate and different routes! why should it maintain an order? If this is how it works then moving the /create to the top won't cause same issue when one hits /:id url ?
@fredpourlesintimes
@fredpourlesintimes 3 жыл бұрын
Really cool chapter. Finally, we have a clear/comprehensible explanation of MVC. I'm just wondering why we didn't keep a default "index" page, separeted of the blog's one.
@AD-lr6pc
@AD-lr6pc 3 жыл бұрын
wow this guy explains every thing very well
@deepanshmakkar5118
@deepanshmakkar5118 4 жыл бұрын
Freakiin Awesome Project Management!!
@kopilkaiser8991
@kopilkaiser8991 8 ай бұрын
Best video to learn MVC with node.js
@NetNinja
@NetNinja 8 ай бұрын
Thanks for watching!
@yumyum7196
@yumyum7196 2 жыл бұрын
This is my first time learning node, back end and MVC. First off, superb course in so many ways (content, to the point, duration, example etc.). I do have one question, I am intrigued how the models are derived from the database schemas. Coming into this, I had this idea in my head that you defined your JavaScript classes somewhere in your models directory and then somehow exported this to the database. There's a project I've been building in my head as I've been watching this course and that is how I thought one would normally go about it, but it seems it is the other way around (define Schemas in DB first, then from there define your objects/classes for your logic). I don't know if anybody could provide some thoughts about this. Again, superb course, thank you so much for everything :D
@Pareshbpatel
@Pareshbpatel 3 жыл бұрын
An excellent demonstration of how to use the MVC pattern. Thanks, Shaun {2021-09-13}, {2022-07-14}, {2022-11-01}, {2023-02-17}
@eff_gee321
@eff_gee321 2 жыл бұрын
i have a question: what does this middleware do: app.use((req, res, next) => { res.locals.path = req.path; next(); });
@technologyexplained
@technologyexplained Жыл бұрын
Thank you. What an amazing course. I had lost the confidence in programming in general, but this course really helped me understand the backend concepts and get better. I do have one question though: The MVC stuff which was taught here, when I do personal projects, should I implement this while setting up the files, when I feel the project is getting clunky, or when the project is finished? What is the best time?
@supun_sandaruwan
@supun_sandaruwan 3 жыл бұрын
Great tutorial sir 🧡🧡🧡
@robertp3596
@robertp3596 4 жыл бұрын
Personally I prefer to import my route in my use. Example: app.use("/blog", require("./routes/blog")); and it does a direct import without needing another variable.
@shadmanmartinpiyal4057
@shadmanmartinpiyal4057 4 жыл бұрын
yeah me too.... i think it is cleaner,
@JoeMcBroom
@JoeMcBroom 4 жыл бұрын
I like that - though it won't work quite like that if using Modules and Import statements
@EnesKab
@EnesKab 3 жыл бұрын
I am learning even from your random mistakes. Amazing.
@mossasameer3338
@mossasameer3338 4 жыл бұрын
thank you so much, next.js is wating for you to cover him :)
@nicholassattaur9964
@nicholassattaur9964 4 жыл бұрын
Very great and informative tutorial!
@codingstuff8305
@codingstuff8305 4 жыл бұрын
Hi, very good explanations. Just for information, in an API way the standards name for your methods that you have created are "index, create, store, show, edit, update and delete" instead of blog_index, blog_create_post, etc...
@muhammadahadaminul9529
@muhammadahadaminul9529 2 жыл бұрын
Awesome tutorial.
@andromilk2634
@andromilk2634 10 ай бұрын
There was something about controllers which I was wondering : you say they act as a middleman between the model and the view, but is it necessarily the case that every handler function is acting this way and always touching the two? For example, the delete controller function is neither touching the model (unless you consider the database part of the model as well?) neither sending data to the view for a render, it is instead interacting with the database. Is my interpretation correct on this matter or did I not follow correctly? Thanks
@LumbreraEnMiCamino
@LumbreraEnMiCamino 4 жыл бұрын
Thanks a lot my friend, I wonder if you can teach us now how to apply the MVVM ?
@jwadjavapro68
@jwadjavapro68 2 жыл бұрын
Awesome tutorial
@flavioneto1081
@flavioneto1081 4 жыл бұрын
You can also do exports.functionName = to export it directly. Nice tuts btw good rhythm
@jertfelt
@jertfelt 2 жыл бұрын
I'm having problems with ../models/blogs - it still says module not found when I edit it in memberRoutes.js
@melkerlarsson4219
@melkerlarsson4219 4 жыл бұрын
Great tutorial:)
@FWCODING
@FWCODING Жыл бұрын
all right mr, im done this course
@ZsoltGaramszegi
@ZsoltGaramszegi 3 жыл бұрын
All in one! Thanks!
@mastrobottega_enf
@mastrobottega_enf 2 жыл бұрын
how can you integrate this in a react project? not sure what to do with the render method
@eliltawondimu2565
@eliltawondimu2565 2 жыл бұрын
hi, i am getting hard time on controller due to this error " TypeError: Cannot read properties of undefined (reading 'status')" can you help?
@pablofonseca8867
@pablofonseca8867 4 жыл бұрын
I was thinking about, what if I'm building a big website, how can I do to know if all my routes are working when I make changes to them? Is it possible to make a TDD or something?
@jimhalpert9803
@jimhalpert9803 3 жыл бұрын
Extremely helpful video. Thanks!
@NetNinja
@NetNinja 3 жыл бұрын
Thanks Jim 😀
@ambientsoda106
@ambientsoda106 3 жыл бұрын
But what if you want each blog to link to a page uses comment on? How you you dynamically create the page, with creating a threads folders full of predefined pages with partials on them?
@zhangandy1174
@zhangandy1174 4 жыл бұрын
very informative, thank you for the sharing!
@adventurer2395
@adventurer2395 3 жыл бұрын
Interesting, I like how you made the controller agnostic/loosely coupled from express. However, it's still tightly coupled to the model and mongo, as model implementation details are happening inside . There could be additional layer of abstraction in the controller to be model/db agnostic.
@bryanDaMazo16
@bryanDaMazo16 2 жыл бұрын
I noticed the same thing. I think it is not MVC yet since it is violating that principle. For example, migrating to a different database will imply refactoring the controller module. (Violating the MVC pattern). Also, testing will lead to writing exhaustive integration tests (due to IO). This video is a good reference for why it is important to separate the different layers to test efficiently and effectively; significantly reducing integration testing. kzbin.info/www/bejne/nJmpkmeqoKuIfNk
@josebordon7870
@josebordon7870 3 жыл бұрын
Amazing content. Thank you so much
@blatopebas
@blatopebas 10 күн бұрын
Sincerely thank you very much
@philcurran8306
@philcurran8306 Жыл бұрын
What would a PUT request look like? I've been able to create a route for /blogs/edit/:id and populate the form with the existing blog entry, and change the form method to PUT, but I'm not sure where to go from there and I can't let it go. 😂
@hackerpro6742
@hackerpro6742 3 жыл бұрын
Thankyou buddy helped me alot
@s_rox5042
@s_rox5042 3 жыл бұрын
Thanks net ninja for tuts
@farouksallam1779
@farouksallam1779 4 жыл бұрын
Thank you so much 💞
@yassineechchetouky9770
@yassineechchetouky9770 4 жыл бұрын
thank you so much, this video was very helpful
@hitanshugoyal4366
@hitanshugoyal4366 3 жыл бұрын
where can I get the code which sir wrote in the tutorial?
@giuliomariomartena6308
@giuliomariomartena6308 3 жыл бұрын
Hi! How would a React (or other front-end library) fit into the views? I mean wouldn't that be a separate app, with respect to an Express one?
Node.js Crash Course Tutorial #12 - Wrap up
4:33
Net Ninja
Рет қаралды 98 М.
MVC Pattern Explained Easy | MVC Tutorial (Example in NodeJS)
17:05
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
Node.js Crash Course Tutorial #8 - Middleware
15:58
Net Ninja
Рет қаралды 226 М.
Express JS #10 - Validation
31:33
Anson the Developer
Рет қаралды 16 М.
Learn Express Middleware In 14 Minutes
14:48
Web Dev Simplified
Рет қаралды 412 М.
Node.js Project Structure and Architecture Best Practices
7:38
Software Developer Diaries
Рет қаралды 45 М.
Node.js Doesn’t Suck Anymore
16:59
Web Dev Simplified
Рет қаралды 133 М.
🤯 Express.js 5 is here (since a month already, actually)
9:58