- 12
- 34 091
Desk Nook
United States
เข้าร่วมเมื่อ 15 ต.ค. 2021
Welcome to my channel! Join this community and learners to get delve into the lesser-known aspects of software development with PHP.
5 Necessary Design Patterns in 30 mins
This course covers the top 5 most popular design patterns in software engineering including concepts and coding examples. The patterns include Factory Method, Strategy, Adapter, Observer, and Decorator.
♨️ Recommended
--------------------------------------------------
Speed Comparison for Popular PHP Frameworks (Fastest): th-cam.com/video/Dk8YHQZ6jfY/w-d-xo.html
PHP Fibers & Asynchronous: th-cam.com/video/Db-GFBGyD4w/w-d-xo.html
PHP 8.2 Whats New: th-cam.com/video/5JW6jnNcOnw/w-d-xo.html
PHP Generators & Iterators: th-cam.com/video/dTnis2_jIPs/w-d-xo.html
🔗 Reference
--------------------------------------------------
en.wikipedia.org/wiki/Software_design_pattern
en.wikipedia.org/wiki/Factory_method_pattern
en.wikipedia.org/wiki/Strategy_pattern
en.wikipedia.org/wiki/Adapter_pattern
en.wikipedia.org/wiki/Observer_pattern
en.wikipedia.org/wiki/Decorator_pattern
🧾 Timestamps
--------------------------------------------------
0:00 Intro: Top 5 Most Popular Design Patterns
1:04 What Are Design Patterns, In Short
1:30 Factory Method Pattern: What Is It?
2:22 Factory Method Pattern: Coding Example
7:29 Strategy Pattern: What Is It?
8:12 Strategy Pattern: Coding Example
12:23 Adapter Pattern: What Is It?
12:47 Adapter Pattern: Coding Example
18:15 Can A Human Fly?
18:48 Observer Pattern: What Is It?
19:44 Observer Pattern: Coding Example
26:58 Decorator Pattern: What Is It?
28:05 Decorator Pattern: Coding Example
34:58 Outro
#course #designpatterns #softwareengineer #strategy #adapter #observer #decorator #factory_method #factory #software #designpattern #tutorial #tutorials #DeskNook #php #softwareengineering #softwaredevelopment #software #human #fly #bird #coding
♨️ Recommended
--------------------------------------------------
Speed Comparison for Popular PHP Frameworks (Fastest): th-cam.com/video/Dk8YHQZ6jfY/w-d-xo.html
PHP Fibers & Asynchronous: th-cam.com/video/Db-GFBGyD4w/w-d-xo.html
PHP 8.2 Whats New: th-cam.com/video/5JW6jnNcOnw/w-d-xo.html
PHP Generators & Iterators: th-cam.com/video/dTnis2_jIPs/w-d-xo.html
🔗 Reference
--------------------------------------------------
en.wikipedia.org/wiki/Software_design_pattern
en.wikipedia.org/wiki/Factory_method_pattern
en.wikipedia.org/wiki/Strategy_pattern
en.wikipedia.org/wiki/Adapter_pattern
en.wikipedia.org/wiki/Observer_pattern
en.wikipedia.org/wiki/Decorator_pattern
🧾 Timestamps
--------------------------------------------------
0:00 Intro: Top 5 Most Popular Design Patterns
1:04 What Are Design Patterns, In Short
1:30 Factory Method Pattern: What Is It?
2:22 Factory Method Pattern: Coding Example
7:29 Strategy Pattern: What Is It?
8:12 Strategy Pattern: Coding Example
12:23 Adapter Pattern: What Is It?
12:47 Adapter Pattern: Coding Example
18:15 Can A Human Fly?
18:48 Observer Pattern: What Is It?
19:44 Observer Pattern: Coding Example
26:58 Decorator Pattern: What Is It?
28:05 Decorator Pattern: Coding Example
34:58 Outro
#course #designpatterns #softwareengineer #strategy #adapter #observer #decorator #factory_method #factory #software #designpattern #tutorial #tutorials #DeskNook #php #softwareengineering #softwaredevelopment #software #human #fly #bird #coding
มุมมอง: 184
วีดีโอ
Fastest Frameworks? Speed Comparison for Popular PHP Frameworks
มุมมอง 6Kปีที่แล้ว
Performance/Speed comparison between the popular frameworks for web programming based on the minimum bootstrap cost of in the real world, PHP 8.2 📺 Recommended Top 5 Design Patterns in Software Engineering: th-cam.com/video/YQDLrHsu-Ik/w-d-xo.html PHP Fibers & Asynchronous: th-cam.com/video/Db-GFBGyD4w/w-d-xo.html PHP 8.2 Whats New: th-cam.com/video/5JW6jnNcOnw/w-d-xo.html PHP Generators & Iter...
Fastest PHP Version? PERFORMANCE comparison
มุมมอง 1.8Kปีที่แล้ว
Which PHP version is faster and how much each one really got performance improvements? do you need to consider upgrading the PHP? check up on this video. 📺 Recommended Top 5 Design Patterns in Software Engineering: th-cam.com/video/YQDLrHsu-Ik/w-d-xo.html PHP Fibers & Asynchronous: th-cam.com/video/Db-GFBGyD4w/w-d-xo.html PHP 8.2 Whats New: th-cam.com/video/5JW6jnNcOnw/w-d-xo.html PHP Generator...
A Beginner's Guide to Design Patterns in Software Engineering
มุมมอง 323ปีที่แล้ว
In this brief video, I introduce design patterns for beginners in software engineering. The explanation covers the concept of design patterns and highlights the reasons why developers should learn them. If you're a beginner developer looking to level-up your skills and expand your knowledge of software development, this video is for you. Don't miss it! Recommended Videos PHP 8.2 Whats New: th-c...
PHP 8.2: Is This the Update That Will Change Everything?
มุมมอง 1.4Kปีที่แล้ว
PHP 8.2 has been released with some new features, deprecations, and changes! Let's see what's new & changed in PHP 8.2 This release contains new features, including readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements, and more. 🔗 References PHP 8.2 Change Log: www.php.net/releases/8.2 PHP 8.2 DNF: wiki.php.net/rfc/dnf_types PHP 8...
PHP Tutorial: Generators and Iterators - Quick Guide
มุมมอง 3.4K2 ปีที่แล้ว
Generators and Iterators are two powerful features of PHP and other programming languages such as Java, Python, etc. In this tutorial video, I'll be covering the Generators and Iterators. This a quick guide, I'll be covering the basics, and how they can be used to make code more efficient and even more readable. After watching this video, you'll better understand these two features and you shou...
PHP Fibers & Asynchronous Under 11 Minutes
มุมมอง 15K2 ปีที่แล้ว
This is an introduction and a quick start with Fibers. This new feature in PHP 8.1 enables lightweight and controlled concurrency in PHP. By implementing Fibers, developers can create high-performance applications. Watch this tutorial to gain an in-depth understanding and learn how to implement Fibers to optimize your PHP code. 📺 Recommended Top 5 Design Patterns in Software Engineering: th-cam...
PHP 8 TDD Tutorial | Quickstart for Test Driven Development
มุมมอง 1.1K2 ปีที่แล้ว
This is a tutorial video to get understand what is Test Driven Development, why & benefits, and to get a quick start with TDD. Other Videos: PHP Fibers & Asynchronous | Under 11 Minutes: th-cam.com/video/Db-GFBGyD4w/w-d-xo.html What Are Design Patterns: th-cam.com/video/ZdjbRT-jNDY/w-d-xo.html OPCache Benchmarks | Frameworks Comparison: th-cam.com/video/BUcxalvD92U/w-d-xo.html FatFree PHP Frame...
OPCache Benchmarks, Popular Frameworks Comparison | echo PHP
มุมมอง 1.9K3 ปีที่แล้ว
This is a performance comparison between popular frameworks with OPCache & PHP 8.0. PHP Frameworks Bench: github.com/myaaghubi/php-frameworks-bench 📺 Recommended Videos PHP Frameworks Speed Comparison 2023: th-cam.com/video/Dk8YHQZ6jfY/w-d-xo.html PHP Fibers & Asynchronous: th-cam.com/video/Db-GFBGyD4w/w-d-xo.html What Are Design Patterns: th-cam.com/video/ZdjbRT-jNDY/w-d-xo.html PHP Generators...
FatFree PHP Framework QuickStart, Performance Comparison-Popular Frameworks
มุมมอง 1.7K3 ปีที่แล้ว
This is an introduction to the PHP Fat-Free micro-framework. It's a very useful micro-framework to use. In this video, I have a performance comparison between Fat-Free and some of the popular frameworks. 📺 Some Useful Links FatFree documentation: fatfreeframework.com PHP Frameworks Bench: github.com/myaghobi/php-frameworks-bench Composer: getcomposer.org 📺 Recommended Videos PHP Frameworks Spee...
please add mezzio php
PHP for Life! ❤❤❤
please please please - add Codeigniter 3 on here as well - I think it will be much faster that CI4 - and many others
👏🏻
Yo Your Channel Is Amazing you Gotta make A Full Series for Design Patterns in php
For those who ask, what is the use of the multi-thread capability? This feature will be useful for those working on very large data or processes, such as 10 million pieces of data that need to be processed individually. for PHP is a single thread it will definitely take a very long time to process one by one, with multi threads the work will be completed much more quickly (by using CPU and RAM resources more optimally). but I'm tired of researching PHP, it seems PHP is not designed for true multi-threading. I've moved to C#, a real multithreading language and don't want to go back 😅 thank you for the video , mate!
Laravel! 😊😊😂😂😊😊 PS: Thank you for your work.
thank you so much, brother!
For Lavarel to be the most popular, it has some of the worst performance based on the graphs shown.
Long live pure PHP!
Nice. Next time add Trongate framework. It’s mentioned ont the website that is fast.
Test Trongate PHP. Thx.
Let's test Nicotine Framework for PHP & MySQL!
Un poco de volumen no vendría nada mal.
I would love to see similar test but with using pure php + pure sql vs frameworks and ORM
Lol, why?
@@hrabianero So that people would see that those frameworks make most things orders of magnitude slower. And don't get me started with ORMs and many-to-many relations...
Laravel is so shitty nowadays....
I really like Codeigniter a lot! But unfortunately, since version 4, it has been bloating and losing performance. In many benchmarks, it's shown to be lagging behind only Laravel :-(
phalcon, trongate?
missing to add KumbiaPHP :(
Thank you so much! This is very valuable information, keep doing this great work & benchmarks!
So which one is fastest, and has smallest footprint? Pure php?
Smaller frameworks has lower footprint, for the case, micro-frameworks are better considering OPCache On, between frameworks Symfony is faster and between micro-frameworks leaf & fatfree are in the same range however for micro-scale projects I prefer pure php
Like & Subscribe Like & Subscribe Like & Subscribe
can you add leaf php in benchmark?
Check out th-cam.com/video/Dk8YHQZ6jfY/w-d-xo.html
can you please benchmark fomo framework and laravel with octane ?
For a new framework 1:00 make sure to add it in the repo and ask for PR, asyn base stuff is out of the scope for the library
Why isn't Leaf more popular? It's one of the best PHP frameworks out there, and this benchmark proves it. It can even work with Swoole.
The competition between frameworks is high and speed is one of the factors however it wins in this comparison
@@DeskNook Can you try a new test with Laravel Octane and Swoole, this can give a really best performance, and test with pure php of course, this is really better than OPCache...
@@Trance_Code it's not better, it's also ridden with problems and the apparent speedup is negligible as you get better results with PHP-FPM without sideffects that come with Swoole and Octane. Octane is one big, big problem and shouldn't be used by serious apps.
I always knew Laravel is an overloaded mess. The developers became greedy and. integrated too much rubbish into it. Hit a bug and Laravel will send you to the loony bin, especially newbies. My advise: stay away from it.
Laravel has its pros and cons and one of the cons is the performance
@@DeskNook That is why o decided to create my own framework using pure php and basic libraries.
Yes we all should do that. Use Laravel only as template model. Only then innovation and intelligence begins.
As with all benchmarks, the relative performance depends heavily on the functionality you use in your benchmark code. If you are selecting a framework to do a "hello world" application, the best framework is the "none" framework. It is startlingly fast. It loads only 1 file. But if you're benchmark includes the sort of functionality that Frameworks provide, like ORM usage, html templates, data manipulation, the results will be different. Also, why would you ever run a complex framework with opcache off? Any benchmark with opcache off is irrelevant. That said, frameworks trend to preliad the entire framework and make zero effort to lazyload only the parts of the framework and application that are actually used. Doing this would be very beneficial to performance.
And this will scale with biger apps. As creator of PHP said all freimworks suck and as PHP progress this will be more and more true to the point of switching from framework to custom php solutions as it will yield much more stability, security and performace
Nice one ! You did massive work !! Maybe you could also compare Async Frameworks ?
Thanks buddy, not sure about it actually its challenging to have fair benchmarks on PHP Async libs
Great work, well explained. Thank you for creating this video about design patterns. That is one of concepts that I was looking forward to know about. I appreciate how you simply explained it, looking forward to see your other videos about some of design patterns.
Glad to hear that Planned for that video however it's not the next one, make sure to hit the bell button to get notified of upcoming videos
So ArrayIterator won't check if current() is using a valid key, but your MyIterator class didn't check that and it worked with a foreach loop... what am I missing?
For the current() function it will validate the current position of the key too For MyIterator which is an implementation of the Iterator interface, validity gonna check by valid() method, the same thing for ArrayIterator
You don't need a for loop if you want to keep track of the index, you can just do foreach($files as $index => $file)
Thanks a million for the Tutorial. It was fun. But may require watching repeatedly a number of times, to enable internalization. But, please zoom in a bit more to help those of us with aging eyesight.
👏🏻ساعت چارونیم خوابم نبرده پناه اوردم ب ویدیوهای ترسناک پی اچ پی
I apologize for the inconvenience, I have another question, you did not test the execution time by a normal loop script and by Fiber, to notice that it is faster than normal
Its not faster than normal, thats not the point about Fibers. Check out 0:35
@@DeskNook I didn't really understand what is the purpose of using Fiber, I tested your code in both cases the case with normal loop and the case with Fiber, the execution time is the same 0.003s. Please can you explain to me even in a line what is the best to use fiber (Do you mean that it is available for making a multitasking framework) do you know a multitasking framework that uses fiber, instead of using pcntl fork, I want to execute the same code in parallel on several hundreds of data, each processing takes 3s to finish, I want everything to finish in 3 sec, not in 3s X 100 ? Thank u.
@@daviddavid-zl6gw As a short answer to your questions, Fibers are good for non-blocking stuff. I highly recommend you watch the video again. That example in the video is just about how to use Fibers, neither async nor performance. In case, you may use pthreads via cli mode too.
th-cam.com/video/3C1S84sTEwQ/w-d-xo.html
Curios in performance !
file_put_contents() is blocking, this won't work unfortunately.
Thats blocking so our files are created in order from a to z, actually the code works fine with file_put_content however it's not optimized for async
at 6:02 , how did the $myIterator object started behaving like an array? am i missing something? please shade light on this.
Check out 2:21 (Example: Iterator OOP)
so basically yii2 is almost on the 2nd-3rd place?
In that diagram, yii2 has won the first place among the frameworks, and the 3rd place among microframeworks But thats updated, check out the link in the description
But what do you think about the performance difference between native PHP vs frameworks?
In the updated version of that chart, pure php is about 52 times faster than laravel 9.1 for a simple hello world github.com/myaghobi/PHP-Frameworks-Bench#results-2022522
@@DeskNook Oh Wooohhooo. 52 times? That serious.
@@gillesashley9314 Yes it is, however, this is just for a simple hello world so for a full project the speed rate should be different
@@DeskNook Well I still believe pure PHP would be faster than laravel in huge projects. There are lots of hooks constantly been called per every request, and that is the main weakness of frameworks. I think Rasmus Lerdorf explained something like that. Well, Laravel's performance can be super charged with Octane though, so it's still a great framework.
Never knew Phalcon was that fast.
They made it via C just like the PHP so its fast
greate vid!
Your are back ! Good to see you !
Thanks, I'm a bit slow for videos but always around
Here’s the GitHub repo containing the examples (source code) from this video: github.com/myaghobi/examples-generators-iterators
💙awli
seda ghashng😂
Great video, but I didnot get the idea of this function
The Fiber is an easy way to have async in PHP
@@DeskNook keep it up, great way to explain, need more videos for php 8.2
@@issamjaafari5519 Thanks, sure
still dont understand what thsi featreu can give me in any project
There is not use for fibers in usual projects, its for low level programming better for async purpose
i used to work in both node and php , for web development there is hardly any need of aysnc code , cause i found myself using aysnc await always for thing to work on node as its async by default , while php is sync by nature which is mostly u will be needing if working on web devlopment. But if there are some tasks where IO operation needs to be performed then i can see this beign usefull , as now i use to call python or c# to process the data , now i guess that will change. Hard to digest that it took them decades to put this in php ecosystem.
Great video showing actual TDD, thanks
Thanks
Subscribe Subscribe Subscribe ...
Hello why fiber is not activated for php-v8.1 in debian 11, how activate fibers the extension isn't loaded, thank u
@@daviddavid-zl6gw I'm using ubuntu 22 which is a debian based distribution with the latest update of php8.1 & php8.2. Fibers work fine with both, so for your issue, I suggest to try with a clean install of php
@@DeskNook Thanks for your reply, it's good, "fiber" it works very well, the problem is in my code I used an old script which uses fiber->create instead of fiber->strat() I want to ask you a question that can help me, which use is the most efficient in parallel execution time: to use fiber or pcntl_fork. Thank you.
@@daviddavid-zl6gw pcntl_fork is more efficient than Fiber, however I prefer to use fibers or pthreads