No video

MVC Pattern Explained Easy | MVC Tutorial (Example in NodeJS)

In this video I will go over the MVC design pattern! At the end I give an example on how to implement MVC using a framework like Express.
-
❤️ Want to Support the Channel?:
/ @pedrotechnologies
🚀 Learn ReactJS By Building 6 Projects: codedamn.com/l...
-
Social
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Website: machadopedro.com
Linkedin: / machadop1407
Instagram: / _pedro.machado_
Github: github.com/mac...
Email: machadop1407@gmail.com
Tags:
- ReactJS Tutorial
- ReactJS and MySQL
- NodeJS Tutorial
- API Tutorial

Пікірлер: 75

  • @programwitharafat1162
    @programwitharafat1162Ай бұрын

    from 20k subscribers, this man has 206k subscribers now, LEGEND !!

  • @gotembarbosa6790
    @gotembarbosa67903 жыл бұрын

    tava aqui vendo todos seus videos com maior entusiasmo e descobri que você é da nossa terrinha kk! Seus vídeos são ótimos, estão me ajudando de mais!! Obrigado por crescer essa comunidade ainda mais. (Sua didática é ótima, continue assim)

  • @pratikthorat3480
    @pratikthorat3480 Жыл бұрын

    I am a newbie dev with some practice in MVC but this video was legendary! I fully understand how and why we must use this architecture pattern! Thanks a lot!! You are the real superhero here!!!!!!

  • @RodolphoArrudanogoogle
    @RodolphoArrudanogoogle Жыл бұрын

    This is a very good video. You explain non trivial concepts in a very easy way. Keep up the good work.

  • @PedroTechnologies

    @PedroTechnologies

    Жыл бұрын

    Thank you!

  • @marketalpha5426
    @marketalpha5426 Жыл бұрын

    Bud your videos are really concise. Great job.

  • @kopilkaiser8991
    @kopilkaiser89913 ай бұрын

    Absolutely brilliant tutorial to understand the discussed topic and logic. 👍🏼🤝

  • @JohnWickXD
    @JohnWickXD Жыл бұрын

    Best hands on explanation on the whole internet😊

  • @rhiannonmonks6894
    @rhiannonmonks6894 Жыл бұрын

    Even though this is a backend example, I think you should still somehow cover the 'View' from the MVC!

  • @adolfomartin5456

    @adolfomartin5456

    11 ай бұрын

    The view is how you present the data, not views or screens.

  • @entity5678
    @entity5678 Жыл бұрын

    Very awesome explanation..understood MVC architecture much better now than former

  • @dmytromahas2998
    @dmytromahas29982 жыл бұрын

    MVC is a nice topic for a drunk conversation) When you switch a context between BE/FE/full application or different technologies/languages, it oftentimes changes the meaning. Same for the other patterns.

  • @dazecm
    @dazecm2 жыл бұрын

    How does the View part of MVC fit into the project folder structure? A backend or API project seems to focus on Model and Controller folder structures but how does the View part fit into things? Presumably, it's simply a front-end project separate from the back-end project with its own folder structure, such as a React project with folders such as components containing .jsx files and maybe an API folder containing HTTP request code to call backend endpoints using something like Axios as the HTTP request package? Would frontend and backend be in separate VS Code projects or maybe with both project folders in a VS Code Workspace structure? Haven't used Workspaces so this may make a good topic for a separate video in itself?

  • @gautambedi591
    @gautambedi591 Жыл бұрын

    Really nice video and example mate! Loved it:)

  • @dawoodshahzad9082
    @dawoodshahzad90822 жыл бұрын

    Exactly I was looking for this. Thank you Pedro.

  • @dwale1934
    @dwale19343 жыл бұрын

    Thank you so much Pedro! I was looking all over for this. I can't wait for simple express API example. 😌

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Glad it was helpful!

  • @diogobem8071
    @diogobem80712 жыл бұрын

    Fala Pedro, somente para te dar parabéns pelos vídeos. São excelentes. Você explica muito bem. Além disso, tem um inglês muito bom. Sou meio chato com sotaques e você tem um beeeem leve.

  • @user-fv5et5on7w
    @user-fv5et5on7w3 жыл бұрын

    Such a wonderful video. Thank you so much Pedro!

  • @MrLink186
    @MrLink1862 жыл бұрын

    I have one question about controllers and proper design. Can particular controller use multiple services? Or rather one controller should use one service, but for example serviceA can use serviceB, serviceB, serviceC?

  • @boombap8910
    @boombap89102 жыл бұрын

    This was EXACTLY what I've been looking for! You're a legend man! thx a lot P.S subscribed

  • @rcr19940
    @rcr19940 Жыл бұрын

    bro where is the github link for the repo?

  • @bhaskarbharadwaj8412
    @bhaskarbharadwaj84123 жыл бұрын

    Where according to you is the best place for input validation ?

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    As a middleware that I pass in the routes folder!

  • @dazecm

    @dazecm

    2 жыл бұрын

    @@PedroTechnologies Is this also known as error-handling middleware? Maybe including middleware for error logging using packages such as Winston?

  • @jatilyadav4000
    @jatilyadav4000 Жыл бұрын

    Amazing Video Bro.. Keep it Up

  • @b3njamim
    @b3njamim2 жыл бұрын

    Ih rapá um brasuca, estamos em toda parte mesmo kkk

  • @user-ug5cy5ve4g
    @user-ug5cy5ve4g8 ай бұрын

    amazing!

  • @levyroth
    @levyroth3 жыл бұрын

    Great explanation, really appreciate it 🙏

  • @saadowain3511
    @saadowain35113 жыл бұрын

    Amazing Pedro

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Thank you!

  • @D_Elchapo
    @D_Elchapo3 ай бұрын

    thanks man

  • @Holfter
    @Holfter3 жыл бұрын

    Estuda a quanto tempo? se puder fazer um video contando sua jornada ate aqui, quais foram suas dificuldades no inicio e tals. Feliz em ver um brazuka fazendo video de programacao em ingles. Keep going bro

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Pode ser um bom video! Eu programo a 4 anos mas web dev somente a 2

  • @NoksNeto
    @NoksNeto3 жыл бұрын

    Só tópico relevante por aqui! Thanks.

  • @ThColinPereira
    @ThColinPereira3 жыл бұрын

    great video pedro

  • @jesy1732
    @jesy17323 жыл бұрын

    Well explained!

  • @MrMonishSoni
    @MrMonishSoni Жыл бұрын

    What about scenario when Multiple Database needed to be integrated in a CRUD Web app, because then we had overhead of extra *.service.js files as each controller will need separate service/Table files to call to. Could we optimize it somehow, so that it could be done in minimum no. of *.service.js files for Multi-DB (MongoDB, PostgreSQL, MySQL, Cassandra etc.) ???

  • @fluttterdev1k
    @fluttterdev1k11 ай бұрын

    thanks buddy but it won't be a problem if I won't use server directory and only i depend on controller ??

  • @27sosite73
    @27sosite73 Жыл бұрын

    top, mate

  • @edu.paixao
    @edu.paixao Жыл бұрын

    Vlw, Pedro!

  • @abhishekrawat8579
    @abhishekrawat85793 жыл бұрын

    🔥🔥 very helpful video

  • @slowedReverbJunction
    @slowedReverbJunction3 жыл бұрын

    Nicely explained bro🤘

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Glad you liked it

  • @Inefprag
    @Inefprag Жыл бұрын

    Did you talk about the "models" folder? What's its purpose?

  • @sabuein
    @sabuein Жыл бұрын

    Thank you.

  • @idevbrandon
    @idevbrandon3 жыл бұрын

    Could you please make a content the difference between exertnal and internal API?

  • @saidmaroc8448
    @saidmaroc84483 жыл бұрын

    good explanation

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Thank you!

  • @pikolq7665
    @pikolq76653 жыл бұрын

    very helpful

  • @josearmandozeballosduran7086
    @josearmandozeballosduran70862 жыл бұрын

    Amazing

  • @medAmineRg
    @medAmineRg2 жыл бұрын

    thankyou bro

  • @DuyTran-ss4lu
    @DuyTran-ss4lu3 жыл бұрын

    Awesome

  • @muhammadxojarustamxojayev7678
    @muhammadxojarustamxojayev76783 жыл бұрын

    Thank you. Can you do the video about relations too.

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Yes! It is one of the topics I want to talk about!

  • @atanujana8119
    @atanujana81193 жыл бұрын

    create a video on how to host node js express mysql project on cpanel Or Hostinger

  • @nsh4658
    @nsh46588 ай бұрын

    What about model?

  • @ThColinPereira
    @ThColinPereira3 жыл бұрын

    banger!

  • @TheChiefwiggy
    @TheChiefwiggy3 жыл бұрын

    I'm getting "cannot use import statement outside a module" for all the code in this video.

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    The code is not runnable! You can use the import statements if you have it set up in your project. By default in nodejs you have to import stuff by using the notation: const variableName = require('packageName')

  • @slowedReverbJunction

    @slowedReverbJunction

    3 жыл бұрын

    For that in package.json Where there is script { ...... } Just above it write type: "module"

  • @TheChiefwiggy

    @TheChiefwiggy

    3 жыл бұрын

    @@slowedReverbJunction that doesn't do anything

  • @geteldoo5279
    @geteldoo5279 Жыл бұрын

    Add the next: .env file, connection JS file, utility JS file, model JS file, controller JS file, router post JS file, router use JS file, view HBS file, style CSS file

  • @swapnilmane1599
    @swapnilmane15993 жыл бұрын

    Hey buddy, this is irrelevant question bt...I created a blog project in react. I devided that project into two parts...user and Admin...What I want to do is I want to implement routing. I used react router dom. Bt the problem is...I use browser Router n switch blah blah..in App . Js...and Added navbar top which will be visible in all components...bt I don't want it to visible in admin area...I want to show admin sidebar in admin panel only...how to fix this?? Is there any solution to this ?? Please help...Thanks in advance n Thanks for your tutorials they have helped me alot... seriously thanks...♥️♥️

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    You can add a condition asking if the current pathname is not equal to the admin route. Something like {window.location.pathname !== '/admin' && }

  • @swapnilmane1599

    @swapnilmane1599

    3 жыл бұрын

    @@PedroTechnologies thank you so much... Bt I am new in React...so I didn't understand it well... could you please make a video on this ?? Coz lot of programmers will face this problem...coz every react project requires this....so please...only if you get free time...I will try to do it by myself... Thank you again...Pedro...♥️♥️

  • @swapnilmane1599

    @swapnilmane1599

    3 жыл бұрын

    @@PedroTechnologies Okay....I will use conditional rendering for this...plz check my code if window.location.pathname=== "/admin" then I will show admin sidebar bt My routes will change...like /admin /addpost /profile so then?? How to fix this ??

  • @abhaytiwari6411
    @abhaytiwari64113 жыл бұрын

    How is it going Pedro

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    Doing wellm how about you?

  • @abhaytiwari6411

    @abhaytiwari6411

    3 жыл бұрын

    @@PedroTechnologies doing good 👍

  • @chilly2171
    @chilly21713 жыл бұрын

    So with services, models will be useless?

  • @PedroTechnologies

    @PedroTechnologies

    3 жыл бұрын

    It depends, services is where you make requests to your database. Models is where you define the database schemas / tables. Not all RDMS requires you to define its tables in your project so it might be useless in those cases.

  • @chilly2171

    @chilly2171

    3 жыл бұрын

    @@PedroTechnologies So Models are sort of like migration, and services becomes sort of like Models.

  • @phillip76
    @phillip76 Жыл бұрын

    The is wrong. The database don't change the representation.

  • @swapnilcodes
    @swapnilcodes3 жыл бұрын

    axios.defaults.withCredentials = true const userLogin = () => { const app = axios.post("localhost:3000/login", data, headers, { withCredentials: true } ).then((result) => { console.log(result) }).catch((err) => { console.log(err) }); } this code doesnt store jwt in cookies ...but postman does...?? how to fix this ??

Келесі