Dependency Injection for Absolute Beginners with C# and .NET

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ก.ย. 2024

ความคิดเห็น • 293

  • @lukaskarlgerhard
    @lukaskarlgerhard 2 ปีที่แล้ว +24

    The value of interfaces clicked for me while watching this video, thank you so much for your easy to understand explanations!

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

      That is great! Glad you liked it :)

  • @vadimvadim2351
    @vadimvadim2351 3 ปีที่แล้ว +11

    1) Clear understandable English for non-native listeners 2) very good technical explanation 3) subscribed :)

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Aw thank you! Appreciate kind words! :) welcome aboard, let me know if you need anything!

  • @zanarkdev3904
    @zanarkdev3904 2 ปีที่แล้ว +1

    Thanks a ton for this vid! This is the ONLY video on TH-cam that explains Dependency Injection properly

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

      Wow thank you so much! :)

  • @billmcbungabine9404
    @billmcbungabine9404 2 ปีที่แล้ว +15

    Trying to understand dependency injection and having watched almost every tutorial on youtube about it this is one of the best (and relatively short!) - looking forward to more content and any videos covering examples of the different types of dependency injection maybe? (constructor, property etc)

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Wow, thanks! That is great to hear!
      What would you like to know about constructor and property injection?

    • @billmcbungabine9404
      @billmcbungabine9404 2 ปีที่แล้ว +1

      As I understand there are different types of dependency injection - was just curious to see actual real examples of say constructor and property dependency injection and maybe some common use cases (the default .Net web api template in Visual Studio does show this but I find it a little confusing to follow)

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

      I know! Sometimes, we don't need a whole breakdown of a feature lol

    • @Pratapkumar-tg5ku
      @Pratapkumar-tg5ku ปีที่แล้ว

      @@jfversluis t

  • @ht1590
    @ht1590 ปีที่แล้ว +1

    I spent an hour reading through blogs and SO. Your explanation cleared it all for me. Awesome work !

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

      So happy to hear that, thanks Himanshu!

  • @jean-francoispedneault3632
    @jean-francoispedneault3632 2 ปีที่แล้ว +5

    Great synthesis about dependency injection and interface! It helped to make it clearer for me. Thank you!

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

      Great! Glad to be of assistance!

  • @basmedia5885
    @basmedia5885 2 ปีที่แล้ว +16

    Thanks for this video. I discovered that I've been doing Dependency Injection for years - I just didn't know it was called that!

  • @DifferentTurn
    @DifferentTurn 3 ปีที่แล้ว +8

    Thank you, Gerald for a great explanation. Awesome vid!

  • @kimktb
    @kimktb 3 ปีที่แล้ว +4

    Thanks for breaking this down. Makes so much sense now.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Thank you! That is great to hear! :)

  • @muaathasali4509
    @muaathasali4509 2 ปีที่แล้ว +7

    This is the only video that made sense to me; I can properly understand all the docs that mention it now. I don't get why many tutorials make it so complicated and use different frameworks with many abstractions instead of explaining the basic concept. Your explanation, on the other hand, was clear and concise.
    Do you have any plans in making a rest web api in ASP NET following some architecture for scalability? Many of the videos I have seen are somewhat lacking and make use of a lot of dependencies and interfaces without ever really explaining what they do.
    Regardless though, thanks so much for the video!

  •  2 ปีที่แล้ว +6

    Thank you, Gerald. I had an idea about D.I., and now, your explanation has confirmed I had It right and has given me a wider understanding of it.
    Keep the great job!

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Thank you Andrián! That is wonderful to hear! Let me know if there are any topics you’d like to learn about

  • @yourwelcomematt
    @yourwelcomematt 2 ปีที่แล้ว +4

    What a great explanation, thank you so much! Definitely saved me a lot of time from having to read through a bunch of articles :D

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

      That you Matthew! Glad it clicked for you now 😄

  • @dripcode2600
    @dripcode2600 ปีที่แล้ว +1

    Gerald... thank you for explaining the way I explain... hitting the important points and the why. I'm sharing this with people I mentor in OOP development! Thanks for the great explanation.

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

      That is amazing to hear! Thank you so much! What are other concepts you have to explain to them? Always looking for some inspiration:)

  • @_samirdahal
    @_samirdahal 3 ปีที่แล้ว +15

    If possible please, also cover differences between
    * Singleton
    * Transient
    * Scoped

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Thanks Axemasta! I love how people are starting to help out each other here 😄

    • @_samirdahal
      @_samirdahal 3 ปีที่แล้ว

      @@Axemasta Thank you 😄.

    • @_samirdahal
      @_samirdahal 3 ปีที่แล้ว +1

      @@jfversluis True Story

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

    This video removed all my doubts about dependency injection, thank you!

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

      Perfect, glad to hear that!

  • @evildoer1606
    @evildoer1606 3 ปีที่แล้ว +9

    This is really underrated content! I want to know more about DI and containers in Xamarin. Would be great if we could build something like Prism DI from scratch. This topic is harder to process than others, but it's really valuable, you can add more screenshots or illustrations, it will make it easier to understand. Good job and thanks for your effort!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +2

      Thank you so much! I’ll think about it. As mentioned in the video; there are a lot of good options already so you probably want to stick with one of those unless you have really good reasons not to.
      Nevertheless it’s always good to build something yourself to really understand the inner workings

    • @mdharvey1985
      @mdharvey1985 3 ปีที่แล้ว +1

      I've started a small attempt at making a Prism-like IoC container. It's pretty basic right now. Please feel free to do what you want with it. I haven't updated it in a couple weeks. github.com/mdh09/MyFlyIoc

  • @채규봉-j9i
    @채규봉-j9i 2 ปีที่แล้ว +2

    Thank you for this great explanation!

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

      You’re very welcome!

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

    Have seen a lot of Videos on Dependency Injection, but this is like the GodFather of all. You videos have great clarity of concept. Keep doing such videos :)

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

      Wow, thank you! That is amazing to hear!

  • @alexiapouyaud5756
    @alexiapouyaud5756 3 ปีที่แล้ว +3

    This was a very well constructed video - really enjoyed it!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Thank you Alexia! Appreciate the kind words! Any other concepts you would like to see?

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

    You are really really good at teaching and breaking down concepts. Thank you so much.

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

      Appreciate it, thanks!

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

    Thank God I picked this video. Thing is I actually understood it in the first explanation. And I just knew it was gonna be an amazing video

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

      Thank you so much friend!

  • @MrBigdogtim69
    @MrBigdogtim69 3 ปีที่แล้ว +8

    Great video! I would benefit from looking at a project that is consuming DI. I would also like to see some practical comparison of the built in DI vs TinyIOC vs AutoFac.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Thank you Tim! There is definitely more to come about this!

  • @jfversluis
    @jfversluis  3 ปีที่แล้ว +57

    Just rewatching this myself... _WHAT_ is up with that hair?! :D

    • @عبدالمجيدالعتيبي-ز6ع
      @عبدالمجيدالعتيبي-ز6ع 3 ปีที่แล้ว +3

      It's looks good 😁

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      @@عبدالمجيدالعتيبي-ز6ع haha thank you!

    • @scottferguson866
      @scottferguson866 2 ปีที่แล้ว +4

      Reminds me of the movie, "There's Something About Mary". 😃

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +5

      @@scottferguson866 i can assure you that was not the same😆

    • @liborhlavac2181
      @liborhlavac2181 ปีที่แล้ว +1

      I like it. But fortunately, if you don't, you can easily change your IHair interface implementation.. 😄 Thank you very much for beautiful thorough explanation of dependency injection concept...

  • @aliakseimakaranka4681
    @aliakseimakaranka4681 3 ปีที่แล้ว

    You explain perfectly, a very simple and useful video, after it became clearer, thanks! And cool English, clear pronunciation, simple words, it's cool for foreigners like me)

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      That is wonderful to hear Aliaksei! Where are you from? This made my day! Thanks for reaching out and letting me know!

  • @user-zg7ld9se1g
    @user-zg7ld9se1g ปีที่แล้ว

    love your voice. soothing to the ear and good explanation.
    i gots alot to think about form this 17min vid. :D

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

      Haha thank you! 🥰

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

    My heartful appreciation for your explanation of D/inject.

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

      Thank you so much Abdul!

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

    Thanks buddy for explaining DI in easy form. Please make specific video for design patterns.

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

      What design patterns are you thinking of?

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

    Wow i finnaly understand it. Now i also understand why Dependency Injection is used in tests which are testing user input, its much smarter than force fake input to console using StringReader and Console.SetIn method. Thanks again!

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Perfect! Glad I could help with that :)

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

    Simple and understandable with great presentation. Thank you so much.

  • @nagarajanthammannasrinivas4948
    @nagarajanthammannasrinivas4948 3 ปีที่แล้ว +4

    Great Video.. Suggestion:: Just take an example(logger) and code along(using container, Interface) like you did for Messaging centre video. It would be easy for beginners like me to grasp easily by seeing the output. Thanks!!.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      I still want to make a follow up one with some code, this is a great suggestion. Thank you!

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

    Great explanation. I must have been asleep in college when they talked about DI, so simple.

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

    your explaination is really helpful, I just came across the "dependency injection" concept and have no idea what it is. But after what your video, I think I understand it a little bit. Thank you!

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      That is great! Thank you so much!

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

    I got this asked in an interview, and even though I understand how it works because I currently use it in my job, I didn't know how to explain it. So thanks.

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

      Hope you do know now! Thanks for watching Charles!

  • @exogendesign4582
    @exogendesign4582 2 ปีที่แล้ว +1

    Where Can I look for this type of Term? "Dependency Injection" I try looking solid principle in C# but found nothing about this.
    I have found it through someone's video he mentioned "DIP", "Interface Segregation Principle", etc. What is the exact name or keyword to find all related content concerning principles?
    Also thank you for the brief explanation about interfaces it helps me a lot understand the core concept of interface in C#.

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

    Awesome explanation on interfaces and containers, kindly share a video link on containerization based on frameworks, any .Net framework is fine. Thanks

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

    Thank you. The way u explained it's really good.

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

      Thank you! That is wonderful to hear! Any other concepts you'd want to learn about?

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

    Simple and amazing explanation. Thank you for such a wonderful video.

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

    Watched a lot, but this one given the answer. Great, thank you.

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

    This is the best explanation I have seen so far 👏

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

      Thank you so much 🥰

  • @RockalaCarta
    @RockalaCarta 3 ปีที่แล้ว +1

    Good explanation... i have used that (react, .Net core) , but it was difficult to me to explain it... until now!... thanks!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      You have no idea how big of a compliment this is! :) thank you!

  • @nagagotama
    @nagagotama 3 ปีที่แล้ว +1

    thanks for your simple easy to understand explanation, you got 1 new sub.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Woohoo! Awesome and welcome! Thank you!

  • @Console.WriteLine
    @Console.WriteLine ปีที่แล้ว

    of course we want to see!

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

    It's worth watching.. nice video..made clear concepts.

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

    Thank you! this was the best video.

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

      Awesome! Thank you so much!

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

    Спасибо двойник Папича за понятное объяснение!

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

      You’re welcome!

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

    Awesome, thanks Gerald. Clear and concise!

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

      Glad you enjoyed it John, thanks!

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

    No-One on this TH-cam Explained this concept better than you. Good Job Man!!!!

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      That is so very nice of you, thank you so much!

  • @mandarinnu
    @mandarinnu 2 ปีที่แล้ว +1

    Enjoyed watching this video and your speaking.

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

      Wow! Thank you so much!

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

    Thank you, fairly new to this. Very much from a procedural background. Dubious still of the whole OO Class based paradigm. Got lost on containers to be honest but will look further.

  • @lespinoz
    @lespinoz 3 ปีที่แล้ว +1

    Lovely start point! Now I got it!

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      That is awesome to hear! Any questions you have left?

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

    Your explanation is great. Thanks for this video!
    Only thing that I didn’t get yet is how can DI effectively helps with testing?

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      Thank you! For testing... Imagine that you are dependant on a service that gets stuff from a remote server through the GetStuffService. If you're doing unit tests, you don't want to actually go out and do that call to the remote server. To overcome that, you make an IGetStuffService interface and implement that in the GetStuffService. Now, for unit testing you make a MockGetStuffService that also implements the IGetStuffService. But this implementation just returns static data instead of going out to the remote server to get it. This makes the unit tests faster, predictable (you know what data is supposed to come back) and less prone to errors. Does that make sense?

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

      ​@@jfversluis Absolutely. Thank you so much for your answer. I am finally getting a better understand with dependency injection.

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

    Thank you so much for explaining interface stuff in DI

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

      Sure thing my friend! Glad you liked it!

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

    I wish you could explain life as well as you did DI. Great job

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      Haha you're on your own for that one, but please let me know when you figure it out! Glad I was able to help with this topic though! 😆

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

    After 4 years of my graduation, I finally learned this shit! hahaha
    Thanks for the amazing content.

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

      Haha well I’m glad I was able to help out there Tainara!
      Thank you for watching!

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

    Very good explanation. Showing how its accomplished without injection and then with injection help it click for me. Wouldve loved to see the example be carried all the way through with the container but Im sure you did that in later videos. Thank you!

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

      Awesome Garrett, glad it was helpful, thanks for letting me know!

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

    Great explanation. Learn, Laugh, Share & Dev for sure.

  • @mdharvey1985
    @mdharvey1985 3 ปีที่แล้ว +5

    Great video! I like to give real world examples with tangible things when I can. Do y'all have a go-to real world example of DI? Mine is the idea of a pen and ink cartridge. The high level overview of the explanation the pen doesn't care about what cartridge gets put in it as long as the cartridge implements ICartridge.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +2

      Great example Michael! I should’ve added something like that. Thank you!

    • @mdharvey1985
      @mdharvey1985 3 ปีที่แล้ว

      @@jfversluis thank you! You're doing great on these videos. I like the changes you've made like the lighting and some of the structure. It brings the videos to the next level!

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

    really well explained, thanks!

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

      That is so nice of you, thank you!

  • @bs7448
    @bs7448 3 ปีที่แล้ว +1

    Quite useful and well explained.. thanks 🙏

  • @seun.daniel.omatsola
    @seun.daniel.omatsola 2 ปีที่แล้ว

    Great video, truly cleared up Dependecy Injection for me. Thanks

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

      That is wonderful to hear thanks for letting me know!

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

    Thanks. Super explanation 🔆

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Yay thanks! Glad it was helpful!

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

    I am not sure why so less likes on this, Very good explanation :-)

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

      Haha I know, right?! Thanks so much!

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

    최고 입니다!! 2년 전이라 엄청 젊어 보입니다 !!

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

    good thing i clicked on this video..thanks

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

      I’m also glad you did! Thanks for watching!

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

    Great video, thanks !

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

      Glad you liked it Antoine! Thanks!

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

    Very nice explanation!

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

      Thank you!

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

    To put it simply, DI is basically passing classes to other classes via parameter

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

      Yes and no, that is a nice summary but there is also property injection, in that case it’s not a parameter.

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

    GREAT video!

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

      Thanks so much Ruben!

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

    Nice Gerald, fairly succinct. Now if you can do a video on Blazor Dependency Injection, specfically Server vs. WASM. Server is relatively easy, I have done that, but I had a research project that used server dependency injection and needed to use WASM and the way we setup D.I. in server is easy, but WASM was a bit more challenging. Would be great to see that and comment as well as with WASM you have all the specifics of D.I. with Scoped, Singleton, Transient, etc. I was using Mudblazor specifically the Dialog method. Ty

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

    Beautiful explanations man! Just subbed👌... I wanna check out your other videos.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Welcome aboard my newly subscribed friend! What other topics are you interested in?

  • @girishgalla
    @girishgalla 3 ปีที่แล้ว +3

    bro your explanation is awesome, i am searching for this kind of videos since week. if you start videos on .net core concepts that would be great.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Thank you so much! 😄 any specific concepts in mind?

    • @girishgalla
      @girishgalla 3 ปีที่แล้ว +1

      @@jfversluis Middlewares, different types of Filters, boxing unboxing, How linq will work, what are singleton, transient and scopes, still there are lot of concepts

    • @girishgalla
      @girishgalla 3 ปีที่แล้ว +1

      Authentication, authorization, JWT Token, how, where and when to create JWT, how jwt is passed in a request, Cookies

  • @parsalotfy
    @parsalotfy 3 ปีที่แล้ว +1

    Thank you for this explentation

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      I hope it was clear :)

  • @davidblackuk
    @davidblackuk 3 ปีที่แล้ว +3

    i would love to know how to use a DI container to resolve a viewmodel against a ContentView. I have a system im place that works for ContentPages through a ViewModelLocator, but can't get it to work for views.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Sorry for never responding to this one, it slipped through! 😴
      Have you been able to figure it out?

  • @donmikkodanm.olmillo8154
    @donmikkodanm.olmillo8154 3 ปีที่แล้ว

    Automatic Dependency Containers in .NET 5 please for absolute beginners :) Thank you for this in depth detail about DI

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Great suggestion! I will look into it! Thanks!

    • @donmikkodanm.olmillo8154
      @donmikkodanm.olmillo8154 3 ปีที่แล้ว

      @@jfversluis Thank you so much :) I'm an absolute beginner regarding with C# and .NET 5.

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

    Good job! Bravo

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

      Thank you my friend!

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

    I love it thanks!!!!

  • @alaaageela1174
    @alaaageela1174 3 ปีที่แล้ว

    explained smoothly....upvote

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Great! Thanks :)

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

    Thanks for the video, quick question, suppose we Inject and Interface `car`, which has implementation `make` into two different classes `ford` and `toyota`, so when using the method for injected interface how it know which method implementation to pick up from `ford` or `toyota`?

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

    great video! thanks!

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

      Glad you liked it! Thank you!

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

      @@jfversluis I'll be happy if you could make a video about threads vs. tasks in c# :)

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

    So in short it is a way of passing in a object that will be used instead of initializing an object within the class?
    What is the benefit of this over initializing something in a public static class and referencing that as needed, or storing methods in the static class to be used?

  • @henriknielsen8097
    @henriknielsen8097 3 ปีที่แล้ว +1

    Very good video. Maybe you could do a video with Microsoft.Extensions.DependencyInjection

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Great suggestion! Will definitely do that!

  • @unparalleledworld5162
    @unparalleledworld5162 3 ปีที่แล้ว +1

    So clear and simple. Love the content.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Thank you! That was exactly what I was going for!

  • @OldGrymza
    @OldGrymza 3 ปีที่แล้ว

    Hello, thank you so much for a video. I would really be interested in a follow-up on Speclow BoDi

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Thanks! I’d love to help you but I have no idea what you mean 😅

  • @SeanSmith73
    @SeanSmith73 3 ปีที่แล้ว

    Great explanation. Thanks for this. Really useful.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Awesome! Thanks! 😄

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

    love it! like the hair as well :)

    • @jfversluis
      @jfversluis  ปีที่แล้ว +1

      😂😂 thank you!

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

    Thanks!

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

    thank you. at 02:00 but what if we will use static class with static function? we will not have to make new instance

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

      Sure if you do everything static you can, but that kinda defeats the purpose

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

    I'm interested on MS Frameworks to manage DI. Thank you!

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

      Voila! Dependency Injection with Microsoft.Extensions in Xamarin.Forms
      th-cam.com/video/abORCOhklUg/w-d-xo.html

  • @EdRawrDev5813
    @EdRawrDev5813 3 ปีที่แล้ว

    I love this channel , I learn a lot, I think a great topic to discuss will be how to use design patterns with xamarin, I always have struggle with that. Thank you very much.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Great suggestion! Thank you Ed! Any particular patterns you're interested in?

    • @EdRawrDev5813
      @EdRawrDev5813 3 ปีที่แล้ว +1

      @@jfversluis I 've been working for almost a year now in the states, and I assure that almost any pattern is useful, but by sure factory, decorator , observable, those will be great to know. I think the most used in xamarin will be adapter, cause we use adapter for list in xamarin native, but you know anything is useful, thank you very much for your time I really appreciate it.

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

    Great explanation. Would you consider making a video on automatic DI but without any frameworks? Or maybe point me towards the right direction

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      So basically write your own framework? 😅

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

      @@jfversluis oops didn't mean that 😅 I was trying to refer the part at 9:39 where you mentioned that it's possible to implement automatic DI without frameworks, or maybe I misunderstood?

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      @@rushas ​ Yeah I see what you're saying. Here's the thing: a plugin or library is nothing more than a way of making things easier for you. So in theory, you can implement everything by looking at the source of a library, add that to your source and don't need the library anymore. So sure, you can implement the automatic DI, but you will just be rewriting code that is already in a library somewhere. So in a way: you're building your own library 😉

  • @shadikiller9431
    @shadikiller9431 3 ปีที่แล้ว

    Thank you for the explanation! you got a new (Dutch) sub ;)

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Heel graag gedaan! :D
      Awesome, thanks!

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

    The performance hit you speak of, is that at compile time or at runtime?

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

      Runtime. The dependency has to be resolved when requested.

  • @tedstidham
    @tedstidham 3 ปีที่แล้ว

    Great video. Explained very well.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Appreciate it Ted! Thanks!

  • @saikirangattu8252
    @saikirangattu8252 3 ปีที่แล้ว

    Good content and very well explained, but I wish there was some code shown as explanation goes on.

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      I am showing code snippets and there are other videos now posted that show it applied in different scenarios and with different frameworks :)

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

    thank you

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

      You’re very welcome!

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

    Gerald please can you make a video or get me an orentation about how to create a sort by ascending or descending on listview. I am struggling to find something that could function.

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

      You’ll probably want to sort the underlying collection.

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

      ​@@jfversluis Solved

  • @penzesl
    @penzesl 3 ปีที่แล้ว +1

    Thank you Gerald, great video!
    I took a project over recently where not only such commonly used things like logging, but basically everything (e.g. business logic) was implemented as dependencies. It makes code changes a headache because every time I amend business logic, I have to start with modifying the interface first, then do actual implementation. Does it make sense to use interface-based dependency injection for business logic in your opinion?

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว +1

      Hm that sounds a bit like overkill. Do you have the chance to ask the original author(s) to ask what the reason for that was? Everything _can_ make sense. But like you say; if you feel less productive while doing so and you don't really have a compelling reason to keep doing then I would say: no, it doesn't make sense.

  • @shivaganga9148
    @shivaganga9148 3 ปีที่แล้ว +1

    good need to explain with some simple code

    • @jfversluis
      @jfversluis  3 ปีที่แล้ว

      Do you have any specific framework in mind?

    • @shivaganga9148
      @shivaganga9148 3 ปีที่แล้ว +1

      @@jfversluis .Net core or .Net MVC

  • @parsalotfy
    @parsalotfy 3 ปีที่แล้ว +1

    great video

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

    Great video. Subbed.

    • @jfversluis
      @jfversluis  2 ปีที่แล้ว +1

      Awesome David, thanks! Any other concepts you would like to see a video about?

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

      @@jfversluis Something related to architecture, so that I can easily swap out UI and/or Data Access Layers. I am learning about 3 tier design now to accomplish this but could use a good video such as this to help explain how to do it correctly. The other videos I have seen on here haven't been that great so far, but maybe I just couldn't find a good one.
      The tutorials I have seen so far were also a bit underwhelming and just didn't go into the depth I needed. If you could make it where you have 2 UI projects (Console and WPF perhaps) using the same Business Logic Layer, and 2 Data Access Projects (One for SQL, one for something like Azure cloud storage) that would be pretty neat. I need to see someone with more experience implement this properly. I believe the Repository Pattern is used in the DAL in this scenario, so that would be cool to hear you explain as an added bonus.