What in the world is a Facade?

preview_player
Показать описание
Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods. It's perfectly fine if you don't totally understand how facades work - just go with the flow and continue learning about Laravel.

Facade Documentation:
Рекомендации по теме
Комментарии
Автор

Gotta be honest, for the longest of time I've read Facades/Facade in my head as "fa-ka-de"

guillermocava
Автор

Did anyone understand anything from this video? As facades were a mystery, so it remains for me. Why not create your own facade from scratch, to show in practice what problem it solve.

0:35
“allowing you to have that flexibility of testing or dependency injection”

Why/how, where are the answers to these questions? They say “it's cool and that's it”, but where are the real examples, show how solving some practical problem looks like without facades and how development/testing/other things are easier with facades. It appears that the video is published just so something would be on the channel and views, and not to educate people and popularize framework, and showing what problems developers face and how laravel effectively solves them.

The person in the comments wrote:
"Facade pattern is not what static
Facades in laravel are. This make your code 100% coupled with laravel. You don't want that! Use IoC instead... I don't like that in laravel - just ugly and wrong design!"

You could have elaborated more on this as well, not only the advantages but also the disadvantages of using facades.

freizusavera
Автор

No matter where you look on the laravel documentation you're bound to run into the word facade, indeed! 😂

TalesGrechi
Автор

Very well done, Josh! Facades as a concept are a tough topic to explain well and you knocked it out of the park!

taylorackley
Автор

What a voice. It feels you're speaking directly to my soul

Автор

First rule of learning about Facades, don’t worry about learning Facades.

sllkevin
Автор

At 2:03 implementation wise - when the binding is being resolved would that potentially involve calling one of PHP's magic methods like '__call()', '__invoke()' '__get()' or similar? I'm trying to understand what happens under the hood when you call a facade and I'd really appreciate some guidance.

BiskitSlippers
Автор

High quality video, well spoken! Yet, I still don't get it. I would have hoped to see a coding example of a piece of code written without extending facade comparing it with a simpler version that does make use of the benefits of facades. Thanks! Chris

chris-uit-balen
Автор

Hi Josh, just a feedback on your Mic volume. Do you really prioritize the ASMR sound rather than the volume level of it? I mean its really good if one is wearing a headset but for those who not, the volume level is kinda low. Thanks!

devi-idxp
Автор

what do you mean no need for static keyword? for example if i want to have User::getDefaults() method, i add public static function getDefaults() to my user model. is this a bad practice?

narrei
Автор

Need to read about it. As i do understand helper function/custom helper functions. I do not get the facades.

elgoogssie
Автор

Excelent content although I'm still very convict that Facades are a bad thing haha

joao-pedro-alves
Автор

I still don't get it but I am fine going on without knowing it 😅

coolcha
Автор

Facade = Front side of a building in French 😅

DiDiR
Автор

save yourself this video and just google the word. it means the front of a building.

MauiWowie
Автор

Hi Josh, what's with this guru voice?

lerizmor
Автор

So a face is basically a lie 😊. It’s literally int the name. 😂

necmettinb
Автор

Facade pattern is not what static
Facades in laravel are. This make your code 100% coupled with laravel. You don’t want that! Use IoC instead… I don’t like that in laravel - just ugly and wrong design!

lenkowski-net
Автор

Laravel team becareful you guys are making Laravel a complex framework it was a hell of coomlex route i almost gave up on Laravel when i started learning it and i assure you future developers wont care about your fancy tech or names they like simplicity and if Laravel keep getting complex ill ditch it and go back to CodeIgniter

algeriennesaffaires
Автор

It's also called "buzz word".

winter-survivor
welcome to shbcf.ru