PHP Framework Pro (Create a PHP framework step by step)

  Рет қаралды 28,416

Gary Clarke

Gary Clarke

Күн бұрын

Пікірлер: 120
@JACKoPL
@JACKoPL 17 күн бұрын
Finally I found more modern and professional material about my own mvc/framework. From what I see, it doesn't take much to adapt routes like in laravel / Route::get() /. Nevertheless, it would be useful to have material about the view for this framework like Blade and Eloquent :D Maybe there will be another film after 18 months.
@stocothedude
@stocothedude Жыл бұрын
This is how I got a great job as a web dev, two years ago. I wrote my own framework for practice and was able to pass the interview and assignments later 😊👍🏽
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
You did the right thing...nice work!
@vicentsimon319
@vicentsimon319 Жыл бұрын
Did so myself. And I must say, it allowed me to understand PHP and web processes on a deeper level.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
@@vicentsimon319 Love that
@holonaut
@holonaut 6 ай бұрын
Within the first 2 minutes I can already say this is some very high quality content, straight to the point. But the music is wildly distracting. I wish there was a version without the music
@GaryClarkeTech
@GaryClarkeTech 6 ай бұрын
Yeah the music was a mistake! I actually removed it for the full course cos someone else also said it sucked 😂
@fa6805
@fa6805 Жыл бұрын
I saw several php framework from scratch videos like this and so far only this one and from the laracast channel have the most professional way to do it. Others are still doing the old ways where the URI segments are broken down to controller, method, params, etc which are not bad for a beginner but not for real world web apps. This is the way it should be done. Thanks for the video. Saved it to my playlist to keep as refresher.
@bijayaprasadkuikel5162
@bijayaprasadkuikel5162 Жыл бұрын
Frankly speaking this video needs millions of views.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Ah thanks a lot...I appreciate the kind words!
@theJohnCode
@theJohnCode 10 ай бұрын
So happy i found this channel today
@GaryClarkeTech
@GaryClarkeTech 10 ай бұрын
Welcome aboard!
@theJohnCode
@theJohnCode 10 ай бұрын
Thank you sir, following you on X @@GaryClarkeTech
@JeffLewis1975
@JeffLewis1975 28 күн бұрын
Starting to watch this but was wondering if the course on the site gets updated. Was thinking of buying it and wanted to make sure things are updated.
@GaryClarkeTech
@GaryClarkeTech 4 күн бұрын
Yep..all my courses receive updates after release
@rightscript3266
@rightscript3266 6 ай бұрын
Thanks Gary. I always enjoy your talks and examples.
@GaryClarkeTech
@GaryClarkeTech 6 ай бұрын
Glad you like them!
@user-xv4fb5wz9i
@user-xv4fb5wz9i 5 ай бұрын
Thank you for the detailed video. The approach is truly modern and not the standard MVC crab that one usually finds on KZbin. I will purchase the course to incorporate your explanations of the code. Are you planning to write a router completely from scratch in the future and make a video about it?
@GaryClarkeTech
@GaryClarkeTech 5 ай бұрын
You're welcome..I'm sure you'll enjoy the full course. Creating a production grade router from scratch is a pretty tall order...I'd have to think about it. Even the ones that you think have been build from scratch use Fastroute under the hood.
@nikimendosa3823
@nikimendosa3823 Жыл бұрын
I'm from Russia. Thanks for video!
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thanks for watching!
@kevinkabeya2459
@kevinkabeya2459 Жыл бұрын
Great content very clear and has helped me better understand the inner workings of PHP framework! I am now off to learn CakePHP
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Glad it was helpful!
@Fshhady
@Fshhady 5 ай бұрын
It's great Gary Can you please implement Middleware, Authentication and Authorization. Bunch of thanks
@GaryClarkeTech
@GaryClarkeTech 5 ай бұрын
Yes that's all included in the full course www.garyclarke.tech/p/php-framework-pro
@TheRcfrias
@TheRcfrias 5 ай бұрын
Hey Gary!, what is your opinion about a framework named "Slim Framework"? Is this somenthing related to what you explain in this list of videos?
@GaryClarkeTech
@GaryClarkeTech 5 ай бұрын
It's great..I'm using it in PHP API Pro (www.garyclarke.tech/p/php-api-pro) Highly recommended to anyone learning because it helps you get a good understanding of PSR and all the framework components because it's much smaller and lighter then behemoths like Symfony and Laravel Give it a try!
@user-su1dw3vw8t
@user-su1dw3vw8t Жыл бұрын
1:09:00 - Why not just spreading the $vars as parameter of the controller method? "(new $controller())->$method(...$vars)"
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Good question...the handler might not be a controller object, later on I also make it possible to use an inline function in the web.php file. In addition to that, I later also use the container to resolve and autowire controllers...but spreading would still work with that. A lot of answers come later as the course progresses
@user-su1dw3vw8t
@user-su1dw3vw8t Жыл бұрын
@@GaryClarkeTech Looking forward for May 2nd!
@mamadoualysy3708
@mamadoualysy3708 Жыл бұрын
Thanks for your time we appreciate it
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
My pleasure...thanks for watching
@truthteachers
@truthteachers Жыл бұрын
Hi Gary, at timestamp 44:23, you are using "REQUEST_URI". I found that there are instances where this parameter may not be available. How is that handled?
@devhenry9054
@devhenry9054 8 ай бұрын
I love your this short mvc framework tutorial. Want to learn more from your framework course. Can you publish that mvc framework course in udemy?
@GaryClarkeTech
@GaryClarkeTech 8 ай бұрын
I don't use Udemy but you can find the full course at my site: www.garyclarke.tech/p/php-framework-pro
@RuslanKrietsu
@RuslanKrietsu 10 ай бұрын
Thank you for this very important video.
@GaryClarkeTech
@GaryClarkeTech 10 ай бұрын
You're welcome..thanks for watching
@beticohernandez9536
@beticohernandez9536 2 ай бұрын
Excelente
@mohammedb7538
@mohammedb7538 Жыл бұрын
Great, beautiful work🤓
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thank you! 😊
@scott-richardson
@scott-richardson 2 ай бұрын
What's the performance difference between running this kernel/router in PHP versus just having your routes in .htaccess? Is there a point in which the request is handled faster in one or the other?
@GaryClarkeTech
@GaryClarkeTech 2 ай бұрын
I don't know about performance but the php router is used to direct the request to the appropriate request handler...which is also php code. It would only be possible to do that using .htaccess by directing to different php files (I think)..which means you'd lose your single point of entry, amongst other things
@scott-richardson
@scott-richardson 2 ай бұрын
@@GaryClarkeTech I have implemented a new php router since watching this video and I see zero issues with performance.
@mdazhardware
@mdazhardware Жыл бұрын
Interesting tutorial, thanks for all.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
You are welcome!
@AlwinAugustin
@AlwinAugustin Жыл бұрын
Great work !! waiting for next videos !!
@nbizzle
@nbizzle Жыл бұрын
Great video! Thanks so much!
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Welcome...thanks for watching!
@gman8361
@gman8361 5 ай бұрын
FastRoute simpleDispatcher is deprecated and the documentation doesn't have any other method to use in its place that isn't deprecated.
@GaryClarkeTech
@GaryClarkeTech 5 ай бұрын
Yes..very strange. Just use version 1.3 to work along with this.
@AlianVesuf
@AlianVesuf Жыл бұрын
Great work. Thank you sir
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
You are welcome..thanks for watching!
@danio0227
@danio0227 Ай бұрын
Hello, I am having problems purchasing your course. Is it still available? Specifically, I have a problem with the payment gateway.
@GaryClarkeTech
@GaryClarkeTech 4 күн бұрын
Email info@garyclarke.tech and we'll try to help ya
@nadetdevfullstack7041
@nadetdevfullstack7041 10 ай бұрын
Excellent !
@kennedymuthui8835
@kennedymuthui8835 Жыл бұрын
Nice course
@mairahs16
@mairahs16 Жыл бұрын
amazing !!!!! Thank you very much
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thanks for watching!
@hamadadel1947
@hamadadel1947 Жыл бұрын
Thanks, awesome work, can I use this framework for production?
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Yes, you can but I'd recommend swapping the Request / Response classes for Symfony HttpFoundation ones...that's why I used the same public API...easy substitution. I'll include some recommendations at the end of the full course for production use.
@atomeksss
@atomeksss Жыл бұрын
Hi, maybe you'll add some examples on how to use MySQL db, user authentication, registration, maybe some email sending, reCAPTCHA with this framework?
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
@@atomeksss DB will be agnostic, using a DB abstraction layer, auth yes, registration likely, email..dunno, recaptcha don't think so ..other priorities. Good suggestions
@atomeksss
@atomeksss Жыл бұрын
@@GaryClarkeTech Thanks for the reply. Today I realised of more important things. Like title, meta-description, breadcrumbs and how to output some alert.. Like, 'thank you for your registration' message. Ofc you can simply redirect user to another page, but you're not going to redirect users after every form submit on site... Sometimes you just wanna add a message below breadcrumbs. Anyways, thanks for the knowledge and will be waiting for the course! Yes, registration can be just a few words about... Maybe it's not necessary to show exactly how it's done.
@atomeksss
@atomeksss Жыл бұрын
Actually, two more topics for your consideration: views (but I think you'll cover that... Also all these things like title, meta-description, breadcrumbs and how to output some alert are in the view topic if I'm correct) and file uploads, thanks!
@paradisia4494
@paradisia4494 Жыл бұрын
thanks for this but you lost me a little bit when introcing the rooter because you use the already built Fst routing component and i did not understand how rooting works... anyway of you can do everything fro, scrash the should be good to understand
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
I used FastRoute mainly for its handling of regex and splitting of paths. I still needed to do some work to match those paths to handlers so that's why I created my router class. The league/route library also does this as FastRoute alone does not suffice
@user-ys3uu5un6l
@user-ys3uu5un6l Жыл бұрын
Thank you for your lessons. How can I contact you to ask questions about the course?
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thanks for watching. You can email info@garyclarke.tech or message me on Twitter / LinkedIn
@lwa.dev74
@lwa.dev74 Жыл бұрын
Hi Gary, what software are you using? is there anything specific which is needed? cheers :-)
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Just PHP and an editor / IDE is all you need
@joshdevofficial
@joshdevofficial 2 ай бұрын
is this works only with docker? or not?
@GaryClarkeTech
@GaryClarkeTech 2 ай бұрын
It works with anything. Using my Docker setup is just a recommendation..it means the student will have the same setup as me.
@houssemrahrah2358
@houssemrahrah2358 Жыл бұрын
great work
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thank you! 😊
@truthteachers
@truthteachers Жыл бұрын
Hi Gary, when i install FastRoute it installs Version 1.3 and not 2.0. Is there something wrong?
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
I'm gonna say either your php version..that might be unlikely though cos v2 just requires 7.4 or it could be your minimum-stability setting. By default this will be stable unless specified otherwise in your composer.json. To use the dev-master of fastroute your minimum-stability would need to be dev Just check my setting in the repo to see how your compare: github.com/GaryClarke/php-framework-pro
@truthteachers
@truthteachers Жыл бұрын
@@GaryClarkeTech Yep, got it. Thank you so much. Just a note that github code does not appear to be for this video course
@eritech
@eritech Жыл бұрын
I would buy but it's a bit expensive
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
My mailing list subscribers get discounts
@_chris_6786
@_chris_6786 Жыл бұрын
Hello Gary. In the minute 46:00 you create this structure that is like an array but reverted: [$status, $handler, $vars] = $routeInfo; What is the name of this structure? I've searched "assign array to variable" but nothing is shown. Can you (or someone) point me to the right direction please? Thank you.
@GaryClarkeTech
@GaryClarkeTech 11 ай бұрын
This is called array destructuring...or list unpacking if you're old skool
@_chris_6786
@_chris_6786 11 ай бұрын
Thanks a lot Mr. Gary, is more clear now 💪🏻
@alphayowakarindi
@alphayowakarindi Жыл бұрын
You rock!
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Cheers buddy..you rock too!
@paultoma
@paultoma Жыл бұрын
Thank you very much! Appreciate a lot your hard work!
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thanks for watching!
@lahoucineoldakdim7778
@lahoucineoldakdim7778 Жыл бұрын
What about support middleware how to implement into Router!!!
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
That's done in the full course. An entire chapter on middleware in fact
@truthteachers
@truthteachers Жыл бұрын
Hi Gary, the code at timestamp 1:11:07 should not work as the call_user_func_array is passing an array but the show method is still typed as int. I am getting the same error. Additionally, $vars contains a string for "id" and not an int.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
It should still work like mine. The $vars array contains the same number of items as the method signature so they will just be mapped. Also PHP will try to cast strings to ints if an int is type-hinted by the method...this will work if the string can be cast to an int i.e. it is a string containing whole numbers only.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Having thought about it, could it be possible that you're declaring strict types somewhere where I'm not?
@truthteachers
@truthteachers Жыл бұрын
@@GaryClarkeTech Yes i declared strict types in all my scripts. I removed it and it worked fine but do not feel good about it. The regex declared as digits but what is transmitted is string. I guess that how http get works. Thank you for clarifying.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
@@truthteachers Cool..glad you got it working. Personally I think it's fine to relax on the strict types declaration in controllers cos it's very common to receive data in string format that you wish to cast to ints. It's all a trade-off! Controllers are a fairly unique part of the puzzle
@truthteachers
@truthteachers Жыл бұрын
Bought your full course. Thank you for the discount coupon.👍
@alionides
@alionides Жыл бұрын
Thanks for great tutotial. It would be nice if you added Models and templating such as blade or twig to be complete MVC framework. I hope you will add this later.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Yes both of those get added. I build a complete framework...you can check the contents here: www.garyclarke.tech/p/php-framework-pro
@alionides
@alionides Жыл бұрын
@@GaryClarkeTech great thanks )
@ddobren
@ddobren Жыл бұрын
Add middlewares
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Added in the full course
@AtomTCP
@AtomTCP Жыл бұрын
thanks you siiiiir
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
You're welcome..thanks for watching
@omarabdelwahhab30
@omarabdelwahhab30 11 ай бұрын
How can I get a coupon for this course ?
@GaryClarkeTech
@GaryClarkeTech 11 ай бұрын
I do discounts for subscribers. There are sign up boxes on the course page www.garyclarke.tech/p/php-framework-pro
@rjtech.gaming
@rjtech.gaming Жыл бұрын
how to return a file like the view in laravel
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Templates is covered later in the course
@lwa.dev74
@lwa.dev74 Жыл бұрын
lol just realised its PhpStorm :-)
@lwa.dev74
@lwa.dev74 Жыл бұрын
Subbs!!! to the channel BTW
@truthteachers
@truthteachers Жыл бұрын
Looks like the course may be more aligned to symfony framework which is used by Laravel as well.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
I've recreated some of my fave parts from both. There are occasions where I prefer how one framework handles things. I also consider which way of doing things would be the easiest to teach.
@truthteachers
@truthteachers Жыл бұрын
Hi Gary, nice job. In the description you gave us the link for the full course but when i clicked the link i just got into you website but not the full course. Advise please. Additionally, many of us dont like using additional components/tools like Docker. We would like to stick to basics that way Docker can die for all we care. We want to use XAMPP because that deployment to CPanel will be straight forward.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Cheers Mani..the link for the full course is here: www.garyclarke.tech/p/php-framework-pro I used Docker here because I only have to share one file with you and you run one command and have the same setup as me on any operating system. But if you have a setup that you are comfortable with then defo stick with that. Your commands will be the same, minus docker compose exec app
@truthteachers
@truthteachers Жыл бұрын
@@GaryClarkeTech Hi Gary, The link still does not provide the full course. All it does is show description and codes in text form. there is no videos there. Is that what it is meant to be? Tq for the advise on Docker. I figured out that too. The only thing is the image part. Do do not understand that.
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
@@truthteachers The full course will be released in March and you'll be able to enroll on that same page. There are some sample videos at the bottom and I'll add some more there in a few days.
@truthteachers
@truthteachers Жыл бұрын
@@GaryClarkeTech Thank you so much.💗
Docker and PHP Complete Tutorial
2:00:04
Gary Clarke
Рет қаралды 38 М.
Worst flight ever
00:55
Adam W
Рет қаралды 14 МЛН
The Most Legendary Programmers Of All Time
11:49
Aaron Jack
Рет қаралды 561 М.
PHP Attributes 50 Minute Tutorial
50:12
Gary Clarke
Рет қаралды 10 М.
PHP is the future
34:27
Aaron Francis
Рет қаралды 177 М.
This Chess Bot is IMPOSSIBLE ELO.
28:04
GothamChess
Рет қаралды 280 М.
No, Einstein Didn’t Solve the Biggest Problem in Physics
8:04
Sabine Hossenfelder
Рет қаралды 295 М.
DHH - Ruby on Rails, 37signals, and the future of web development
1:09:57
Laravel + Livewire todo app (and so much more)
16:41
Aaron Francis
Рет қаралды 44 М.