Added: 10 months ago
From: JREAMdesign
Views: 34,421
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (86)

Sign In or Sign Up now to post a comment!
  • Is there a convention on how these files are linked together and the directory structure? ie placing the links (require) of view and controller.php in the index like you do, or just link them all in the bootstrap. @15:48 / @16:45

    Or is it just following the idea of MVC loosely and make it work?

  • cant wait to doo this!

  • @WH3NDUTYCALLS You shall become pro!

  • what is mvc? can anyone tell me?

  • @espheroz It's a paradigm where an application is divided into three parts: the model (business logic, think database access and authentication), the view (produces the output, think HTML) and the controller (takes user input, accesses the model and loads the view).

    If used appropriately and properly, it can make code more maintainable, reusable and testable.

  • Very nice tutorial. This is the best set of tutorials i have seen. Could you make these video's downloadable so i can put them on my zune to watch on my breaks at work?

  • At 9:50, you could just replace isset() with !empty() on line 12 instead of complicating.

  • can anybody help me with this c:php/pear problem at 4:20

    he doesn't get it?

  • an awesome tutorial

  • a really wonderful tutorial really... love it how u explain it but i think a better solution for the "parameter" problem in the bootstrap is call_user_func_array(array(&$c­ontroller,$url[1]), $restofurlarray); this was the way i did it since PHP was goin to OOP - what do you think of that solution ? regards and keep up the good work !

  • AWESOME and thanks!!!, this is great video for learning how to create a simple MVC. Please don't stop! All of your videos are helping me be a better programmer...

  • After entering the instructions in my .htaccess file my mvc directory disappears and when accessing my mvc index file via the the browser I get a forbidden access error.

    Anyone encountered a similar error?

  • @spiksanders Most likely you have an error in your code, also check to make sure that you do have htaccess available and loaded in your server.

  • This is really a great tutorial. It helped me and I learned a lot. I'll watch more of your other tutorials. I'm hoping to know more about MVC :D

  • Really good. A lot of useful information.

  • I have wached all 6 parts are great, Thanks.

  • Thanks full excellent tutorial

  • Hi, thank you for this great tutorial!

    Perhaps you can help me, everything is ok with .htaccess so when I put something like "/mvc/help" in the url I can read it on the main page but if I write "/mvc/index" I've got no errors but it's not catch by the $_GET['url'] and the echo is empty...

    Hope I did explain it right, cheers

  • spent a half hour pulling out my hair trying to figure out why _construct wouldnt work before figuring out it has 2 underscores .... i.e " __construct" not "_construct"

  • Comment removed

  • you're awesome!

  • ok,you explain lots about making a controller but you don't really explain why we would want to use an MVC

  • Been looking for a good intro to MVC - have read a lot. You tutorial helped months of reading to suddenly make sense. Some people complain that you go too fast, but that is why there is a pause button and a scrubber (I had to use both so I could follow along and code with the video). I really appreciate you taking the time to do the tutorial and to share it with the community. Great stuff, now on to part two...

  • the tutorial was a bit too fast. but thanks for your time. im gonna watch it over and over again until it clicks lol

  • Thanks so much you are a real awesome help

  • Thank you so much for this tutorial! It was a great pleasure to watch it! You are an excellent teacher! Thank you!!! :))))

  • @yesnikita Thanks glad to help :D

  • Hi,

    i think it would have been better if you did this without mod_rewrite, although it wouldn't change that much.

    Thanks still a nice tutorial.

  • When I add this line to htaccess "RewriteCondy %{REQUEST_FILENAME}!-d"

    I get this error:

    Server error!

    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

    If you think this is a server error, please contact the webmaster.

    Error 500

  • @puaflatmates

    Thank you I found it dont worry, I was adding y at the end of cond.

    Questions though:

    I get the concept and makes good sense, what I am very unfamiliar with is the things you do in htaccess.

    What do u recommend to read on htaccess and php ini modification?

    Cheers

  • @puaflatmates you wrote "RewriteCondy" it's suppose to be RewriteCond %{REQUEST_FILENAME} !-d

  • Man you are the best !

  • come and join online photoclub.  fr. ht

  • 7:10 LOL! I did the same exact thing, and I wasn't even copying you.

  • MVC pattern was way over my head until i find your video. Thank you, Sir!

  • Comment removed

  • Excellent - way better than the others I've seen. However, about half way through ,when the actual MVC Tricks started to come into play e.g. passing data into the views, etc, you just were still moving a bit too fast to follow how and why that works. Great job though!

  • Also, anyone has a good approach at making a nice template system? I have one of my own, but I would find it hard for people with no PHP knowledge, just CSS & HTML to create a function for every page they're naming different.

    Anyone?

  • @FacepuncherBlog Currently I'm only using the Controller class, and a function for every file/page. What's good about this is that you can make another controller to handle, lets say user information, and use that class and its functions with that function for the file.

    It's more easier IMHO.

  • @TheManuelFP

    How do you do it? Seems much easier to keep things organized this way but always interested in other approaches...

  • I hate how you do a class for every file, so ugly.

  • Dear Sir,

    First of all I will appreciate to you for your tutorial. I actually have a little problem. I have exactly your tutorial as you have done. It is ok in my localhost but when I publish in ftp I haven't got any view:(

    Could you please help me about the reason why it is not shown?

    Thanks and kind regards,

    Arzu

  • Cool thing :) Thanks for the tutorial !

  • @telewizjatvl You could just add some more $_GET or $_REQUEST in the bootstrap so you could do it like: controller/method/param1/param­2/param3/param4 etc... You also are still able to do controller/method?querystring=­123

  • Comment removed

  • Your tuts are the best m8 ;) Thanks for very good tutorials :)

  • It's possible to do LFI

  • almost very neat :D

  • Very instructive! Thanks!

  • Good job, I like the ENTER, ENTER :)

  • hey thank for the tutorial but i ran into some trouble

    i'm using wamp server i did exactly what you did but it is not redirecting to index.php or appending the url.

    i even configured and changed root directory to be where index is in the httdf conf file but still i get the error The requested URL /1/public/ddd was not found on this server.

  • You didn't tell us what's the use of every code..

    please make your tutorials more precise..

  • @eminemchu43 This assumes you understand some PHP basics, I can't explain everything in every detail or the tutorials will be way too long.

  • @JREAMdesign workspace/mvc/../index lol

  • Also can you please put a direct link to where I can download this framework, I was on your website but couldn't really find it. Thanks

  • Very good vide, but you lose me at 17.16

    How can you just write $this->view = new View();

    Do you not need to actually have a variable called $view?

    Please respond or link to a nice website or video that will explain this form me, because it really got me puzzled.

    Thanks

  • @javavideocenter he declared the $this->view var in the baseController. You should look at libs/Controller.php

  • This is a god send. Infinitely help, thanks much!

  • Nice. Very helpful. :)

  • how can i include view multiple times in a page?

  • @biswarupadhikari Do it through the actual view template file.

  • Instead of triming, and exploding you can use, what i do in my own MVC:

    $uriArray = preg_split('/\//', $_SERVER['REQUEST_URI'], -1, PREG_SPLIT_NO_EMPTY);

    this way you only get the real params, and this also handles if someone is bitching with multiple slashes. Also as i know ignoring $_GET completely is the standard in most of the frameworks.

    ps: it may be a bit slower, than a simple explode, but imho its way better.

  • @noherczeg good call!

  • That's awesome..

    I like the way did this...

    Keep up the good work..

  • @nargetey thanks -- part 2 coming in a few hours :)

  • Well done! This is a great primer to get a head start in understanding MVC design patterns. Hands-on is the way to go in my opinion!

  • Very nice! You really cover a lot in a short amount of time...I'm finally beginning to understand the Front Controller pattern and the MVC architecture and this video has been a HUGE help. Is there any security risk by passing your methods and arguments in URLs?

  • @BopjoWebDesign The only methods that can be called in controllers are set to public. So from a security point of view, you could prevent all accidental access to any method by marking it protected or private.

  • @Fonqie What do you mean by security validation? Validating form input? Or do you mean something else?

  • Nice tutorial btw Netbeans 7.0 is out you can just download and install and it will ask you to port all Profiles config + the rest and 7.0 is alot faster i think so

  • @Bassaddicted Awesome great news!!!! Its finally out of beta :D

  • @JREAMdesign Yes sir :) lol

  • Thanks so much for this video ! This is awesome :D

  • Amazing! Thanks for doing great lessons, keep still. :) I'll be happy if you do for this lesson, it is to extend the capabilities of the framework. Such as working with databases (CRUD operations), sessions (storing database (this much you want!)).

  • @nasisof Im surprised you sat through the whole thing haha

  • Awesome Tutorial

  • wanted to recreate this tutorial...

    But I dont use Apache. I have cherokee... which does not support .htaccess files.

    Is there a way to do without rewrites... or to handle the url thru php so I could implement this mvc everywhere?

    great tutorial by the way... very clear

  • @eracoon You can point every file to index.php some way without htaccess, but your url will look like index.php / controllername -- code igniter does this, i dont know how to do it without htaccess

  • Great tutorial! Many thanks.

  • @QuadRaxiX Sure, I forgot who requested so i tried to make it

  • Loading comment...
Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more