Creating an MVC from Scratch with PHP - Part 1

preview_player
Показать описание

In this video we start with getting the basic layout for all the files, and prepare for loading the controllers and actions using the Sammy framework.
Рекомендации по теме
Комментарии
Автор

Best MVC tutorial I've found, no question. Explains every single aspect perfectly, cheers Baylor!

Nashant
Автор

I loved this tutorial because it shows how much you've grown as a programmer since you coded the CMS series. I was looking for ideas on how to design my CMS's interface when I found your video. I disagreed with some of the practices you were using when I saw that you had a MVC tutorial (which picked my curiousity). I ended up learning quite a bit and will be using some of your design ideas, so thanks a lot :)

MrGazillion
Автор

baylor tutorials are like totally gnarly dude . I was like ...WHOAHH. Keeping rocking .

FFWDEntertainment
Автор

Hey Baylor great tutorial but I have a question. Will an MVC framework work without the htaccess file?
Keep making tuts, you're helping a lot of us ;)

TechiesUnofficial
Автор

@NexusShodow You're right, Sammy does follow the singleton pattern, but I'm not sure which design principles you are referring to. I chose Sammy because it has an alternative to PATH_INFO which means it will run on most shared servers. In addition, it allows the same URL to handle get and post methods.

BaylorBreaksItDown
Автор

@MarkOates2 The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later.

From: php.net /

BaylorBreaksItDown
Автор

hey man, thanks for the video, im learning alot about mvc. even though ive been programming a little while now.

rahj
Автор

@ScoobyDooobyD00 Don't get me wrong I understand why you used the class and I still thing it's a great tutorial about MVC. The design principle I was referring to is not to declare all methods as static because of security issues but this isn't your fault.

JimTools
Автор

YES! Thanks you, this is what I needed, I appreciate it.

murderedboy
Автор

Hey Baylor - Great video series!

One thing I find missing is the ability to connect to a database, query a table, display records, allow for edit/delete....

Are you planning onto adding this in the future?

Thanks

mkhoueiry
Автор

Grate tutorial but I'm pretty sure that the sammy class is a Singleton pattern and it's not well implemented and goes against the many design principles but correct me if I'm wrong.

JimTools
Автор

that basic PHP, you can just create that file and set it up under the config folder and use a model to call queries

RedRalliArt
Автор

is it better to not put the closing PHP tag('?>') in every PHP file?
when using MVC?

Автор

hi, i am getting this error
[31-Mar-2011 16:21:34] PHP Parse error: syntax error, unexpected T_STATIC in

on line 54

rajandass
Автор

What about database stuff? How can i query, add or edit a record in a db table.

mkhoueiry
Автор

I don't get why error_reporting(E_ALL); doesn't work for me, but error_reporting(E_ALL); ini_set('display_errors', '1'); does :$ stupid PHP

RedRalliArt
Автор

@rajandass65 Are you still having this problem?

HCodeEntertainment
Автор

Hello, Thanks about your hard work :), I have one problem when I'm trying to apply the "Creating an MVC from Scratch with PHP - Part 1" that the first index file doesn't open correctly although I installed The WAMP server and It runs the PHP files correctly Can u help me Please Thanks my friend :)

Ibrahimtaysser
Автор

please inform me if I'm wrong or I can't understand and feel free to teach me the right way Thanks :)

Ibrahimtaysser
Автор

@rajandass65 I have too T_STATIC on line 54 in sammy.php Anybody know how to complite exercise ?

daras
join shbcf.ru