Desk Nook
Desk Nook
  • 12
  • 34 091
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
มุมมอง: 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...

ความคิดเห็น

  • @alihammadshah
    @alihammadshah หลายเดือนก่อน

    please add mezzio php

  • @vasiovasio
    @vasiovasio 2 หลายเดือนก่อน

    PHP for Life! ❤❤❤

  • @gowork2973
    @gowork2973 6 หลายเดือนก่อน

    please please please - add Codeigniter 3 on here as well - I think it will be much faster that CI4 - and many others

  • @mobinamahmudian2243
    @mobinamahmudian2243 8 หลายเดือนก่อน

    👏🏻

  • @thenightwolf224
    @thenightwolf224 8 หลายเดือนก่อน

    Yo Your Channel Is Amazing you Gotta make A Full Series for Design Patterns in php

  • @indrasaputra87
    @indrasaputra87 8 หลายเดือนก่อน

    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!

  • @This-Is-The-End
    @This-Is-The-End 9 หลายเดือนก่อน

    Laravel! 😊😊😂😂😊😊 PS: Thank you for your work.

  • @johnsteve1276
    @johnsteve1276 10 หลายเดือนก่อน

    thank you so much, brother!

  • @rhtservicestech
    @rhtservicestech 10 หลายเดือนก่อน

    For Lavarel to be the most popular, it has some of the worst performance based on the graphs shown.

  • @rafageist
    @rafageist 10 หลายเดือนก่อน

    Long live pure PHP!

  • @JanezNovak-fk4qr
    @JanezNovak-fk4qr ปีที่แล้ว

    Nice. Next time add Trongate framework. It’s mentioned ont the website that is fast.

  • @tanjakahlo5255
    @tanjakahlo5255 ปีที่แล้ว

    Test Trongate PHP. Thx.

  • @aurelian3401
    @aurelian3401 ปีที่แล้ว

    Let's test Nicotine Framework for PHP & MySQL!

  • @snithfferx
    @snithfferx ปีที่แล้ว

    Un poco de volumen no vendría nada mal.

  • @AllanSavolainen
    @AllanSavolainen ปีที่แล้ว

    I would love to see similar test but with using pure php + pure sql vs frameworks and ORM

    • @hrabianero
      @hrabianero 7 หลายเดือนก่อน

      Lol, why?

    • @AllanSavolainen
      @AllanSavolainen 7 หลายเดือนก่อน

      @@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...

  • @vinniv6806
    @vinniv6806 ปีที่แล้ว

    Laravel is so shitty nowadays....

  • @bgeneto
    @bgeneto ปีที่แล้ว

    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 :-(

  • @midophriya3657
    @midophriya3657 ปีที่แล้ว

    phalcon, trongate?

  • @ivan.melendez
    @ivan.melendez ปีที่แล้ว

    missing to add KumbiaPHP :(

  • @MelroyvandenBerg
    @MelroyvandenBerg ปีที่แล้ว

    Thank you so much! This is very valuable information, keep doing this great work & benchmarks!

  • @RaineWilder
    @RaineWilder ปีที่แล้ว

    So which one is fastest, and has smallest footprint? Pure php?

    • @DeskNook
      @DeskNook ปีที่แล้ว

      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

  • @DeskNook
    @DeskNook ปีที่แล้ว

    Like & Subscribe Like & Subscribe Like & Subscribe

  • @naranyala_dev
    @naranyala_dev ปีที่แล้ว

    can you add leaf php in benchmark?

    • @DeskNook
      @DeskNook ปีที่แล้ว

      Check out th-cam.com/video/Dk8YHQZ6jfY/w-d-xo.html

  • @TariqSajid
    @TariqSajid ปีที่แล้ว

    can you please benchmark fomo framework and laravel with octane ?

    • @DeskNook
      @DeskNook ปีที่แล้ว

      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

  • @terryweb
    @terryweb ปีที่แล้ว

    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.

    • @DeskNook
      @DeskNook ปีที่แล้ว

      The competition between frameworks is high and speed is one of the factors however it wins in this comparison

    • @Trance_Code
      @Trance_Code ปีที่แล้ว

      @@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...

    • @maxymajzr
      @maxymajzr ปีที่แล้ว

      @@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.

  • @truthteachers
    @truthteachers ปีที่แล้ว

    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.

    • @DeskNook
      @DeskNook ปีที่แล้ว

      Laravel has its pros and cons and one of the cons is the performance

    • @truthteachers
      @truthteachers ปีที่แล้ว

      @@DeskNook That is why o decided to create my own framework using pure php and basic libraries.

    • @truthteachers
      @truthteachers ปีที่แล้ว

      Yes we all should do that. Use Laravel only as template model. Only then innovation and intelligence begins.

    • @SodalisUK
      @SodalisUK ปีที่แล้ว

      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.

    • @LtMatrix1
      @LtMatrix1 ปีที่แล้ว

      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

  • @sliceem88
    @sliceem88 ปีที่แล้ว

    Nice one ! You did massive work !! Maybe you could also compare Async Frameworks ?

    • @DeskNook
      @DeskNook ปีที่แล้ว

      Thanks buddy, not sure about it actually its challenging to have fair benchmarks on PHP Async libs

  • @amirhosseinsafari1662
    @amirhosseinsafari1662 ปีที่แล้ว

    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.

    • @DeskNook
      @DeskNook ปีที่แล้ว

      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

  • @GonzaloMassa
    @GonzaloMassa ปีที่แล้ว

    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?

    • @DeskNook
      @DeskNook ปีที่แล้ว

      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

  • @GonzaloMassa
    @GonzaloMassa ปีที่แล้ว

    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)

  • @NedumEze
    @NedumEze ปีที่แล้ว

    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.

  • @mobinamahmudian4257
    @mobinamahmudian4257 ปีที่แล้ว

    👏🏻ساعت چارونیم خوابم نبرده پناه اوردم ب ویدیوهای ترسناک پی اچ پی

  • @daviddavid-zl6gw
    @daviddavid-zl6gw ปีที่แล้ว

    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

    • @DeskNook
      @DeskNook ปีที่แล้ว

      Its not faster than normal, thats not the point about Fibers. Check out 0:35

    • @daviddavid-zl6gw
      @daviddavid-zl6gw ปีที่แล้ว

      @@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.

    • @DeskNook
      @DeskNook ปีที่แล้ว

      ​@@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.

  • @SachinSingh-vy7pm
    @SachinSingh-vy7pm ปีที่แล้ว

    th-cam.com/video/3C1S84sTEwQ/w-d-xo.html

  • @sliceem88
    @sliceem88 ปีที่แล้ว

    Curios in performance !

  • @nathanielsabanski
    @nathanielsabanski 2 ปีที่แล้ว

    file_put_contents() is blocking, this won't work unfortunately.

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      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

  • @karthikhebbar4485
    @karthikhebbar4485 2 ปีที่แล้ว

    at 6:02 , how did the $myIterator object started behaving like an array? am i missing something? please shade light on this.

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      Check out 2:21 (Example: Iterator OOP)

  • @vitaliejalbu8206
    @vitaliejalbu8206 2 ปีที่แล้ว

    so basically yii2 is almost on the 2nd-3rd place?

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      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

  • @gillesashley9314
    @gillesashley9314 2 ปีที่แล้ว

    But what do you think about the performance difference between native PHP vs frameworks?

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      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

    • @gillesashley9314
      @gillesashley9314 2 ปีที่แล้ว

      @@DeskNook Oh Wooohhooo. 52 times? That serious.

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      @@gillesashley9314 Yes it is, however, this is just for a simple hello world so for a full project the speed rate should be different

    • @gillesashley9314
      @gillesashley9314 2 ปีที่แล้ว

      @@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.

  • @gillesashley9314
    @gillesashley9314 2 ปีที่แล้ว

    Never knew Phalcon was that fast.

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      They made it via C just like the PHP so its fast

  • @preeper_
    @preeper_ 2 ปีที่แล้ว

    greate vid!

  • @sliceem88
    @sliceem88 2 ปีที่แล้ว

    Your are back ! Good to see you !

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      Thanks, I'm a bit slow for videos but always around

  • @DeskNook
    @DeskNook 2 ปีที่แล้ว

    Here’s the GitHub repo containing the examples (source code) from this video: github.com/myaghobi/examples-generators-iterators

  • @mobinamahmudian2243
    @mobinamahmudian2243 2 ปีที่แล้ว

    💙awli

  • @mobinamahmudian2243
    @mobinamahmudian2243 2 ปีที่แล้ว

    seda ghashng😂

  • @issamjaafari5519
    @issamjaafari5519 2 ปีที่แล้ว

    Great video, but I didnot get the idea of this function

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      The Fiber is an easy way to have async in PHP

    • @issamjaafari5519
      @issamjaafari5519 2 ปีที่แล้ว

      @@DeskNook keep it up, great way to explain, need more videos for php 8.2

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      @@issamjaafari5519 Thanks, sure

  • @kubaleman3440
    @kubaleman3440 2 ปีที่แล้ว

    still dont understand what thsi featreu can give me in any project

    • @DeskNook
      @DeskNook 2 ปีที่แล้ว

      There is not use for fibers in usual projects, its for low level programming better for async purpose

    • @smtkumar007
      @smtkumar007 8 หลายเดือนก่อน

      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.

  • @PQUdotCH
    @PQUdotCH 2 ปีที่แล้ว

    Great video showing actual TDD, thanks

  • @ZAcharyIndy
    @ZAcharyIndy 2 ปีที่แล้ว

    Thanks

  • @DeskNook
    @DeskNook 2 ปีที่แล้ว

    Subscribe Subscribe Subscribe ...

    • @daviddavid-zl6gw
      @daviddavid-zl6gw ปีที่แล้ว

      Hello why fiber is not activated for php-v8.1 in debian 11, how activate fibers the extension isn't loaded, thank u

    • @DeskNook
      @DeskNook ปีที่แล้ว

      @@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

    • @daviddavid-zl6gw
      @daviddavid-zl6gw ปีที่แล้ว

      @@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.

    • @DeskNook
      @DeskNook ปีที่แล้ว

      @@daviddavid-zl6gw pcntl_fork is more efficient than Fiber, however I prefer to use fibers or pthreads