2: What Is The MVC Model | MVC Model Explained | Object Oriented PHP Tutorial For Beginners | mmtuts

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 221

  • @wadiibounenni4848
    @wadiibounenni4848 8 місяців тому +10

    After 4 years of uploading these series, you are still the PHP king when compared with other paid tutors !! we are waiting your Laravel tutorials :)

  • @TheDonofthedark
    @TheDonofthedark 5 років тому +66

    One of the best explainations of oop and mvc till now. Really appreciate your efforts.

  • @tumpperi3891
    @tumpperi3891 3 роки тому +49

    This is something that I feel I should pay for, but it's free. Thanks buddy.

    • @dawsonaaron3260
      @dawsonaaron3260 3 роки тому

      i guess im randomly asking but does someone know of a tool to get back into an instagram account..?
      I stupidly forgot my login password. I would love any tips you can offer me.

    • @badrsayed2117
      @badrsayed2117 Рік тому

      This method of explaining when he illustrates everything as if it is a method of thinking not just code is my favourite method

  • @eqntdhjn
    @eqntdhjn 4 роки тому +5

    I am not native speaker but i think your english is amazing. Thank you for your lessons!

  • @abolfazl3273
    @abolfazl3273 8 місяців тому +4

    I really enjoy it.
    Thanks for your free and high quality courses :)

  • @Stoney_Eagle
    @Stoney_Eagle 5 років тому +18

    When I first started with laravel I had no clue what I was doing and how MVC worked, but once I crated a few pages I started to get the hang of it.

    • @farhannajmi8126
      @farhannajmi8126 5 років тому

      how's using laravel so far ? I actually to learn laravel soon too.

    • @Stoney_Eagle
      @Stoney_Eagle 5 років тому +6

      @@farhannajmi8126 Using laravel makes it easy, it's loaded with all kinds of features and functions.
      Making a full login system is as easy as typing "php artisan make:auth" in the command line and you got it.
      It is maintaned properly so any security is dealt by them. I feel safe using it because laravel uses eloquent for the database connection witch makes database injections "impossible".
      Look up "coderstape" on his explaination of all the laravel functions. He makes it just as easy as Daniel does for php, c and javascript.
      Laravel is made for people that know php but don't have the time to write everything themselfs. Thousands of npm and composer packages are available witch will add functions to your website with one command. This will of course not teach you how to write it yourself. 😉

    • @francis5481
      @francis5481 5 років тому +3

      i learned proper programming when i start learning laravel. i can say im nothing without laravel. it somehow forces you to follow design patterns. but its better if you know basic php functions

    • @bitmammothOG
      @bitmammothOG 5 років тому +1

      Checkout Phalcon :)

    • @StrangledShadow
      @StrangledShadow 4 роки тому

      @@Stoney_Eagle Also busy with the coderstape Laravel courses. Between that an mmtuts I'm sure I will get it eventually

  • @TheEdendvatri
    @TheEdendvatri 3 роки тому +16

    Thank you Elon Musk for such a great explanation :)

  • @emmanueltoutain7328
    @emmanueltoutain7328 3 роки тому +4

    You're the best!! Seriously. You structure and explain this course a thousand times better than anyone else.

  • @christophervasanth5235
    @christophervasanth5235 5 років тому +1

    I am new to MVC and I now have a clearer understanding of MVC after watching your video. Thank you very much.

  • @Rafael-es5dp
    @Rafael-es5dp Рік тому

    Wow. One of the best person explaining ways of programming. Thank you so much

  • @giovannicabrini8457
    @giovannicabrini8457 4 роки тому +9

    You have such a natural way of teaching and making everything look simple! I love your videos and the quality upgrade that this channel has had

    • @DejanPavlovic-tu8vj
      @DejanPavlovic-tu8vj Рік тому

      Def agree with you. Even compared with some guys like Traversy or idk some more bigger and famous people who teach online here, this guy is much more dedicated and he's way fits me so much... He gets me

  • @sf2998
    @sf2998 4 роки тому +4

    yeah, the view can get data from the model directly, or indirectly via the controller. Its very good that you have mentioned the 2 way of doing mvc.

    • @ОйбекОдилов-к5ж
      @ОйбекОдилов-к5ж 3 роки тому

      Hence the conclusion that you can use something else instead of MVC.

    • @sf2998
      @sf2998 3 роки тому +1

      Perhaps you can. However MVC is a must for some types of web applications because there is simply no better way to organize your code than using MVC.

    • @ОйбекОдилов-к5ж
      @ОйбекОдилов-к5ж 3 роки тому +1

      @@sf2998 Yes, you right.

  • @mdobaidullahal-faruk3457
    @mdobaidullahal-faruk3457 5 років тому +2

    And finally I understand what MVC design pattern is. Thanks a lot.

  • @bugsbunyx
    @bugsbunyx 4 роки тому +1

    If you're trying to get better during the lockdown, this is definitely your guy!

  • @rommelleuterio5608
    @rommelleuterio5608 2 роки тому

    I’m one of the regular viewers of your videos. You help us understand how to code php in an easy way and I appreciate it. Thank you

  • @daphara7154
    @daphara7154 10 місяців тому +1

    You are the best explanation that I have met.

  • @sogenohata1948
    @sogenohata1948 Рік тому

    Wow. Thank you for such an easy-to-understand explanation. Especially with that story analogy. I was SO confused with MVC, especially because Controller was doing what the View was doing as well. Now I know that's only the difference between how people use the MVC framework. Love it.

  • @mahadihasantaronno2953
    @mahadihasantaronno2953 4 роки тому +1

    You should be a teacher! You have the skill to teach someone.

  • @Ranbo5
    @Ranbo5 Рік тому

    Your approach and delivery are awesome. I might learn this stuff after all! (after avoiding it for about 10 yrs!)

  • @pharmacosales6318
    @pharmacosales6318 2 роки тому

    Thank you. All your videos were perfect fundamentals of my PHP programming.

  • @vouchleang3963
    @vouchleang3963 Рік тому

    I love how you details everything

  • @marianivailov7319
    @marianivailov7319 3 роки тому

    You are awesome! You explain everithing step by step which make it easier for understand! Thank you !!!

  • @robmux
    @robmux 4 роки тому

    This video is too good to be free. Just happy learning PHP

  • @MrZlep
    @MrZlep 5 років тому +15

    Thank you very much. Just one plea: When it comes to the database stuff, could you please do it with PDO? I think it mostly has only advantages. Thx

  • @alitaha7146
    @alitaha7146 5 років тому +2

    You are the best. it is my first comment in youtube. but actually i want to say thank you very much for all your great materials

  • @jowls
    @jowls 3 роки тому

    oh my, best explanation i've seen so far, subscribed!

  • @unknown-ws8iy
    @unknown-ws8iy 3 роки тому

    you are so good that i watch your videos instead of sunday night movie

  • @67automator
    @67automator 5 років тому +4

    The theory is explained very well in this video. Where I personally still fail is to find a good example where this theory is put into practice. I see there are a lot of videos from you which explain the basics of how to program in PHP but I haven't been successful finding great videos which show MVC running using a basic example. Is there something around from you?

    • @ApplicableProgramming
      @ApplicableProgramming 4 роки тому

      As you never got the answer, if I may interest you in my take on how to use MVC in practice. I'm sure you already got the answer somewhere else, but someone else might need it ua-cam.com/video/hluMG5LshSI/v-deo.html

  • @AlexG-wk3nh
    @AlexG-wk3nh 3 роки тому +1

    you are great at explaining things and have sparked my interest in learning PHP !

  • @agreeshvs9520
    @agreeshvs9520 5 років тому +1

    It is very useful one. I understand about MVC much easier.

  • @m7amedk
    @m7amedk 4 роки тому +1

    This is very exciting!! Thank you for making this course 🙏🙏🙏

  • @tru3kay
    @tru3kay 5 років тому

    Thank you for this description. I'm way more clear on how much is structured and works. Thank you

  • @sudanimalsha4877
    @sudanimalsha4877 2 роки тому

    Very clear explanation Dani. Thank you

  • @mr.echoontheway.3570
    @mr.echoontheway.3570 5 років тому +26

    If you make aPHP CRUD with OOP it will be perfect after this OOP fundamental

    • @muhammadyasin2964
      @muhammadyasin2964 5 років тому

      hey check out his php oop series he has done it in the last tutorials

    • @mr.echoontheway.3570
      @mr.echoontheway.3570 5 років тому +1

      @@muhammadyasin2964 there was only insert, I couldn't see delete and update

    • @oliverbradshaw4006
      @oliverbradshaw4006 4 роки тому

      @@mr.echoontheway.3570 figure it out yourself? :)

    • @fauxhound5061
      @fauxhound5061 4 роки тому

      @Jonathan De La Paz can you tell me how do i do that using Django Unchained DBMS? I'm using a PyASPXMLJAVAAssembly stack

  • @_ryan843
    @_ryan843 5 років тому

    Love the new video format, I think that it bring the better teacher out of you. When I have any problems with PHP (thanks to your videos have learnt this wonderful language) I go straight to your channel. 10/ 10 :)

  • @ademineshat
    @ademineshat 5 років тому +3

    Great presentation. Thanks.
    Will it be just explaining which is great, or Coding too?

    • @_danisson
      @_danisson 5 років тому +1

      Same question !

    • @ademineshat
      @ademineshat 5 років тому

      @Dominus Providebit not so sure :)

  • @josephlalnt
    @josephlalnt 3 роки тому

    Very good explanation about the two different approaches to mvc

  • @bragmore
    @bragmore 5 років тому +3

    amazing tutorials, I need the next one now! haha. Keep up the good work!

  • @hey-simba
    @hey-simba 4 роки тому

    You really made my lockdown period productive during this corona time. Thanks and lots of love bro ......

  • @danilo-arantzibia
    @danilo-arantzibia 2 роки тому

    Very useful, I needed to apply this on my NodeJs projects, thank you!

  • @bryebolony
    @bryebolony Рік тому

    Hey Dani. Your explanation just made it seem so easy. Just checking to see if you have a video class on URL Routing with PHP OOP?

  • @samojanezic8186
    @samojanezic8186 Рік тому

    This video is an eye opener.

  • @vanhelsingx69x
    @vanhelsingx69x Рік тому

    Best tutorials and playlist

  • @Lyrik-Klinge
    @Lyrik-Klinge Рік тому

    Great explanation, THANKS!

  • @lawrencemichael5571
    @lawrencemichael5571 4 роки тому

    Daniel, you are the man.
    Thanks a lot!

  • @johnhendrixgallana1877
    @johnhendrixgallana1877 7 місяців тому +1

    Legend Teacher ☺

  • @HenryNewcomer
    @HenryNewcomer 2 роки тому

    I’d describe the difference between the two as, “one is the controller *controlling* (routing) information between everyone, and the other is a controller *input* of information.”

  • @humphreeyy
    @humphreeyy 9 місяців тому

    Oh my god, I didn't know this. Our school teaches procedural, and things are the same with that first example.
    I've been using laravel for a year now, and I realized if OOP is possible in laravel then OOP in php is possible. And here I am flabbergasted.
    This shocks me, fudge the stigma of php. locked my mind from finding out more of it. Why did our school not teach this?!

    • @Dani_Krossing
      @Dani_Krossing  9 місяців тому

      Procedural is always the first step into PHP 🙂 but often universities neglect to tell the students about OOP and frameworks… which means the students get a wrong impression about “how prepared they are for the real world”… 😕

  • @johongirrahimov2343
    @johongirrahimov2343 3 роки тому

    I understood MVC via below analogy
    Controller --- is the waitress
    Model --- is the chef
    View --- is the food
    User --- is the client(the browser)

  • @SuperMego911
    @SuperMego911 5 років тому +2

    Dude, you're incredible!
    Thank you

  • @thedanmwangi
    @thedanmwangi 3 роки тому

    2 years down the line and your videos are a major help! Thanks for that! Question: Do you have a Laravel tutorial? And can you advice on using Laravel in webapp development?

    • @Dani_Krossing
      @Dani_Krossing  3 роки тому +1

      I have never gotten into Laravel during my web dev career. It was mostly front end based. So unfortunately I do not have anything on backend frameworks like Laravel 🙂

    • @thedanmwangi
      @thedanmwangi 3 роки тому

      @@Dani_Krossing Thank you! 💯

  • @Abdisalan_The_Analyst
    @Abdisalan_The_Analyst 3 роки тому

    Thank you it is clear to me now

  • @ivansavchenco5636
    @ivansavchenco5636 4 роки тому

    After finishing this course, I'll go through all videos I watched and I will like them all :)

  • @real.anigan
    @real.anigan 5 років тому

    theoretically it make sense to me. It just I don't have idea how can I breakdown the task. Do you have a video where you're applying mvc to a project?

  • @lawrencemichael5571
    @lawrencemichael5571 4 роки тому +2

    If you are here after finishing the procedural PHP course,
    Congratulation friend!

  • @lifex514
    @lifex514 5 років тому +1

    cool please start more mvc tutorials

  • @tisferry8205
    @tisferry8205 5 років тому

    I love it. Looking forward to the next one!

  • @kajet6018
    @kajet6018 2 роки тому

    Thank you for best info😍. God bless

  • @neethug406
    @neethug406 3 роки тому

    Excellent presentation

  • @ahgiynq
    @ahgiynq 4 роки тому

    Great Explanations

  • @pratikparazulee6697
    @pratikparazulee6697 Рік тому

    hey man your teaching is very very nice.. please make a video on laravel pleaseee

  • @info-prog
    @info-prog Рік тому

    Thanks Dani, nice course, i'm applying all OOP knowlges in project examples, i'm actually preparing myself for test interview to get a remote work job as a full stack developer, can you advice me ? may i choose may be a front end or back end ?

  • @glenrose9092
    @glenrose9092 2 роки тому

    great stuff - greetings from DK

  • @westfield90
    @westfield90 4 роки тому

    Very nice explanation

  • @robtee7655
    @robtee7655 5 років тому

    The procedural example is much more clear on what is going on. And there is no need to retype code, If a different page needs it you can Cut and Paste or just put it in a separate file and use includes. From this example I see complexity without much value. In the procedural version I see where the data is coming from and how it gets displayed in one simple page of code.
    I had a Ruby programmer tell me it was bad to know how the database worked, Seemed nutty to me. SQL is not rocket science.

  • @anilkantmishra6998
    @anilkantmishra6998 3 роки тому

    this was very useful thanks

  • @fishslider
    @fishslider 3 роки тому

    Great explaination

  • @RobinHayer
    @RobinHayer 5 років тому +1

    Make a series to create personal mvc framework

  • @ilhamakhyar4849
    @ilhamakhyar4849 4 роки тому

    thank you so much for the video!!! it's really great, i really like your explanation

  • @VitalijMik
    @VitalijMik 5 років тому

    As a PHP Developer, i would argue that the original MVC pattern was misused. Before the year 2000 many Webdevelopment Agencies wanted to stand out, also the Framework Providers wanted to offer some Buzzword for selling. They used MVC for this case. MVC rely on events. If a Model was changed an even got triggered and notice the controller so that he can pass the new values to view. If you want to create original MVC in PHP you need a php process running whole time on your maschine and waiting for input or database triggers. But you cannot do this over HTTP since HTTP expect a response to shutdown the connection. Ofc many developers noticed the problem with a process and events and started to invent things like "Front Controller Pattern". Also as a Webdeveloper you also have contact with JavaScript on a different Layer. All of the sudden your View which display the output becomes a Model for a new MVC Layer. Because of this MVVM was then introduced.
    So the Web Languages reused the MVC wording for Marking Purpose while the pattern is not implementable in the language it self. To be precise you need actually to separate it into MVC and Web-MVC.
    Anyways a good Video, maybe you could create for your next videos, what is HMVC, MVP, MVVM and MVA :D
    Ah and a little rant :D please don't use ?> at the end of the script (unless HTML code is displayed afterwards), this might cause "header cannot be sent" errors and it violate PSR-1

  • @thegentleman7531
    @thegentleman7531 5 років тому +2

    Lit explanation dude 👍🙏🔥

  • @pbdaemon
    @pbdaemon 5 років тому +1

    You are the best.

  • @adrianasilveira4561
    @adrianasilveira4561 Рік тому

    Great explanation...

  • @fsbgaming1588
    @fsbgaming1588 5 років тому

    love the format.awesome

  • @abrahammekbib5163
    @abrahammekbib5163 4 роки тому +1

    can you make videos on how to change procedural php to oop php

  • @leifmusset6834
    @leifmusset6834 3 роки тому

    great teacher

  • @mtaakwamtaa3195
    @mtaakwamtaa3195 5 років тому +1

    my lovely teacher !

  • @AJ-Pixelyze
    @AJ-Pixelyze 3 роки тому

    I know this is not the topic on OOP but I wonder if you could do a video on, how to use JavaScipt in PHP for example, if I want to delete the item from DB but JS shows up as a pop-up modal before deleting. I'm not sure how I can implement JS with PHP and make them work together.

  • @pragneshkatkar31
    @pragneshkatkar31 5 років тому

    Can you please discuss about routing and navigation?

  • @cubedev4838
    @cubedev4838 4 роки тому

    Amazing explaination!!

  • @truongpm2144
    @truongpm2144 4 роки тому

    Thank you so much. Its so useful.

  • @juststudies3291
    @juststudies3291 4 роки тому

    Great video thank you so much You saved my life

  • @GregsGrog
    @GregsGrog 5 років тому

    I have already made some classes for user login and stock management is it feasible two incorporate these into an MVc framework or would I need to start from scratch? Great video btw!

  • @Akosiyawin
    @Akosiyawin 4 роки тому

    The explanation is great! Sadly, I want to learn the other design pattern, in which the view request a response to controller.

    • @jacobsan
      @jacobsan 4 роки тому +1

      I know right. It feels wrong to have the view query the model directly.

    • @Akosiyawin
      @Akosiyawin 4 роки тому

      @@jacobsan yeah me too, I feel like it's not secure.

  • @CmdrWDX
    @CmdrWDX 5 років тому

    im a bit shocked at the low view count. This is grade a stuff!

  • @Sephsplaces
    @Sephsplaces 5 років тому

    I'm a little confused with how you talk about the second way to do the MVC. I thought the point of the MVC is that the model (which i think of as raw data) isn't meant to know anything about the view. The MVC i thought was a compound pattern made up of the strategy, composite and observer patterns. The strategy being the controller contains all the view logic which makes the view decoupled which means it only has to worry about what to display to the user and not how to do it. The model can use observers to make changes to the view as information changes with the model still being completely decoupled from the view. But i'm still learning... :)

    • @Dani_Krossing
      @Dani_Krossing  5 років тому

      The way you explain it is one of the 2 ways I explained it in this video (the right illustration). However like I also said in the video, there is another way to do it as well. There are different benefits in both ways.

    • @Sephsplaces
      @Sephsplaces 5 років тому

      @@Dani_Krossing well I'll look forward to see how how you use the other method :)

    • @Dani_Krossing
      @Dani_Krossing  5 років тому

      Here are a few links that argue for the two ways of doing MVC if you are interested :) Some of the differences or "decisions" for why you would use the two methods could for example be that:
      Contr -> Model & Model -> View
      By having the View communicate directly with the Model, we don't accidentically change the View whenever we change the Contr.
      Model -> Contr -> View
      By having the Contr feed the View, we have better re usability of the methods in the View class since the View ONLY shows non DB content.
      So again... Personal preference :)
      www.tomdalling.com/blog/software-design/model-view-controller-explained/
      r.je/immutable-mvc-in-php

    • @Sephsplaces
      @Sephsplaces 5 років тому

      @@Dani_Krossing cheers dude, thanks for links

  • @behroozyazdani6023
    @behroozyazdani6023 2 роки тому

    Hi, Thank you, good job

  • @mikepecha3818
    @mikepecha3818 5 років тому +2

    Cool

  • @juancunhalima
    @juancunhalima 4 роки тому

    great class

  • @jenniferward6821
    @jenniferward6821 3 роки тому

    Great tut

  • @vargaszilvia774
    @vargaszilvia774 Рік тому

    awesome!! awesome!! awesome!!

  • @fataidea135
    @fataidea135 5 років тому +1

    Thanks Daniel/mmtuts/ am grateful

  • @gultekinahmed5186
    @gultekinahmed5186 5 років тому

    thank man you very good teacher .. :) like and Subscribed

  • @nemac23
    @nemac23 3 роки тому

    Would it be practical to have two controllers, one to input data to the model and another to handle output to the view, just so there is that extra layer of separation of responsibility? One controller handling input and output, or the model handling more than just fetching, seems like it could get messy. Beginner question, thanks.

  • @AlbertoRivas13
    @AlbertoRivas13 4 роки тому

    Great explanation man, thanks alot :)

  • @aaronargottelopez3488
    @aaronargottelopez3488 3 роки тому

    Thank you.

  • @dirface
    @dirface 3 роки тому

    Thnx for this!

  • @Born2DoubleUp
    @Born2DoubleUp 2 роки тому +1

    im here 🤓

  • @codewithchase2023
    @codewithchase2023 4 роки тому

    Useful tools

  • @nemac23
    @nemac23 3 роки тому +1

    Laravel uses the second MVC model shown, where the controller updates the view. If someone intends to pick up Laravel eventually, hopefully it's not to confusing to do it the other way.