The First Step To Clean Architecture | Flutter SOLID Principles

Поделиться
HTML-код
  • Опубликовано: 12 июн 2024
  • Dive deep into the SOLID Principles and understand how to convert your code from spaghetti to something other engineers can contribute to! We'll be using Dart(Flutter) to demonstrate the code examples however this video is independent of any programming language.
    📌 Discord Server - / discord
    Timestamps:
    (00:00:00) Introduction
    (00:01:00) S
    (00:05:34) O
    (00:13:11) L
    (00:18:07) I
    (00:22:54) D
    Connect With Me Here:
    GitHub: github.com/rivaanranawat
    Linkedin: / rivaan-ranawat
    Medium: / namanrivaan
    X: x.com/RanawatRivaan
    Instagram: / optimalcoding

Комментарии • 58

  • @manfredkernMK
    @manfredkernMK 3 месяца назад +16

    I watched some videos now - and they are all fantastic. Also this one.
    But here are some thoughts from C++ / C# projects I know - and I mean really big ones - not toys like the n-th ToDo-App.
    There is always a need to find compromises. Every now and then new terms and ideas are introduced for very, very old principals.
    E.g. the Solid-Principle: Tearing UserManager class apart into 2 pieces for Authentication and Profile-Management looks good. But are they really independent? Neither one can live without the other because they belong both to user management.
    So I need to define an additional interface or class to tie them together, because they belong together. And if one change, I have to change it anyway in one of the classes. No time saved, no additional benefit.
    Also very often, there is a need that an inherited class needs to be extended by additional functionality. This is one essence of OOP.
    And very often additional abstractions just shifts the complexity to somewhere else e.g. leading to many more files, ...
    So what I would like to say. Don't follow blindly all the theoretical approaches and check if they really make life easier. Consider possible changes of project requirements in the near and midterm future. Ignore abstractions only for the sake of abstractions. Big projects have experienced architects anyway.
    Anyway as I mentioned in the very first sentence. I like your videos very much and I am looking forward to the next one.

    • @anandpatel3580
      @anandpatel3580 Месяц назад

      Very well said

    • @kishanbhuta1229
      @kishanbhuta1229 27 дней назад

      So you mean learning all these SOLID principles will amount to nothing? :( In bigger projects they are useless?

    • @manfredkernMK
      @manfredkernMK 27 дней назад +2

      @@kishanbhuta1229No, that's a misunderstanding. Clean architecture and SOLID principles are not new. Separation between presentation, logic and data is also very old, to have the possibility to swap parts. So you surely apply these principles in your project in one way or the other depending of the modules / parts / libraries in your application.
      In C++ it is very common to factor out parts of your application into libs. In Dart these will be packages.
      Please think about how you will handle nested data structures (simple example above)? You can do it full blown with models, entities and mappings for the nested data structures. Is it worth to have these many classes, polluting your directory structure. Yes, if in the short-/midterm these will change (maybe the requirements are still not settled). Very often you shift problems. Your class looks "clean", but your directory structure is cluttered.
      A lot of architectural patterns are hyped at a certain time. Think of TDD, DDD, MVVM, MVC, MVP, prototyping, agile development, ..., object oriented, functional, ...
      If you benefit from theses principles --> do it., If not, just don't. And be careful if someone just says, it looks "cleaner".
      In real business projects, you have so many drivers, especially money and time. So, the job of a software architect is to balance between application architecture and the business needs.
      Just ro repeat myself: "So what I would like to say. Don't follow blindly all the theoretical approaches and check if they really make life easier. Consider possible changes of project requirements in the near and midterm future. Ignore abstractions only for the sake of abstractions. Big projects have experienced architects anyway."

  • @abinashkarki5237
    @abinashkarki5237 3 месяца назад +26

    Bro is the messiah for the Flutter Developers.

  • @seamensclubltd7603
    @seamensclubltd7603 3 месяца назад +1

    Cool! Thanks! You are the best of the best!

  • @fernandezjasper
    @fernandezjasper 3 месяца назад

    Looking forward to the next video!

  • @akashmurugesh3509
    @akashmurugesh3509 Месяц назад

    Nicely said my brother. Clear as a crystal. Thanks

  • @pranayramteke2848
    @pranayramteke2848 3 месяца назад

    Really needed this

  • @farz3670
    @farz3670 3 месяца назад +1

    Great vid as always

  • @leoe.r.7338
    @leoe.r.7338 3 месяца назад

    Great video!! Had a couple of more videos about SOLID on my list to watch and after this one I removed most of them. Also really like the memes and Tom&Jerry intro. Lol.

  • @parameshmamidisetti8167
    @parameshmamidisetti8167 3 месяца назад

    Please Make more videos like this. This video is very knowledgeable 😮 thanks a lot ❤

  • @manishgautam2424
    @manishgautam2424 3 месяца назад

    Superb videos and main think in free , Thank You So Much , Keep it Up

  • @entertainment-iw6fd
    @entertainment-iw6fd 3 месяца назад

    a pretty good video buddy thank you for your valuable time

  • @wraith3108
    @wraith3108 3 месяца назад +1

    6 minutes into the video and I am really liking it
    Keep it up dude and, keep on Making flutter app

  • @gurparvesh38
    @gurparvesh38 Месяц назад

    Thank you for great explanation :)

  • @cromuelbarut9859
    @cromuelbarut9859 19 дней назад

    well explained, keep up the good work

  • @yasserhy
    @yasserhy 14 дней назад

    I love your tutorials. I think it is easier for everyone if you use the "I" in the name of the interface so it will not be confusing. Similar to what we do in C#. Example: Shape interface => IShape

  • @kianooshsafapour3926
    @kianooshsafapour3926 3 месяца назад

    Like always video describes the principle easy to understand. thanks for the video. I suggest using background music (with very low volume) to improve the videos

  • @murshidm
    @murshidm Месяц назад

    This guy can explain Rocket science to me and i will understand. 🙏

  • @marlonsubuyu2012
    @marlonsubuyu2012 Месяц назад

    Amazing!!!

  • @Programmer-je4by
    @Programmer-je4by 3 месяца назад

    i thought about you 10 mins before and your video came :)

  • @TheNightValley
    @TheNightValley 3 месяца назад +4

    Rivaan is absolutely a genius. You have made great tutorials so far over years, but there are certain things I wish you could make some tutorials on, as I haven't seen any better tutorials on that
    1) flutter Localization
    2) flutter offline apps with backing up data with something like Google drive

  • @0x-adios
    @0x-adios 27 дней назад

    Great

  • @pravinprince3221
    @pravinprince3221 3 месяца назад

    thank you bro for the wonderful video bro it is so helpful for me and my team, thanks again bro
    one request bro
    can you do videos on bloc concurrency
    and transformers used bro

  • @from_whatch
    @from_whatch 3 месяца назад +2

    bloc clean architecture video please 🙏 😢

    •  3 месяца назад

      there's one already on the channel

  • @flutterflex
    @flutterflex 2 месяца назад

    🎉🎉

  • @pranayramteke2848
    @pranayramteke2848 3 месяца назад

    Sir can you complete the design patterns series

  • @urm1n
    @urm1n 3 месяца назад

    Can you make video on flutter app with remote and local database like firebase and hive and sync them

  • @abhinavkprajapati
    @abhinavkprajapati 3 месяца назад

    which plugin do you use to print out debug messages on vs code in flutter. I have seen your virtual assistant application video but i am not getting the same messages printed in debug console as you please help me

  • @kennethmuriungi
    @kennethmuriungi 3 месяца назад

    Bro,make a video on how to install Vs code,flutter SDK and Android studio on Kali Linux please

  • @CodeWithMaya07
    @CodeWithMaya07 3 месяца назад

    Rivaan can you guide flutter projects where to start… like which project has to start first second and so on… I’m confused which project to start first…

  • @antongrekov7710
    @antongrekov7710 3 месяца назад +1

    hot success

  • @ss-mm2kn
    @ss-mm2kn 3 месяца назад

    Sir we need the bloc flutter large applications tutorial.

  • @devkumar9889
    @devkumar9889 3 месяца назад

    Here are my understandings :
    S : Single Responsibility = Make your class such that it only performs single Independent task. Like Authenticating user && Generating tokens are 2 different classes
    O : Open to Extension Close to Modification = You don't want to make hole and spread wires to get new electrical device. You already provide holes for wires while construction similarly you write code such that you can extend features without modifying code.
    L : 😢
    I : Try to break Interfaces into smaller independent units
    D : Dependency Inversions = You have a class where you write functions to authenticate user and save user to db using 3rd party libraries so just write their methods separately outside class and get their results in that class this way if you need to change something in future you just need to modify that specific part. Basically u just reduced dependcy to 3rd party libraries

    • @holy4908
      @holy4908 3 месяца назад

      Liskov's principle of substitution is that subclasses can serve as replacements for their superclasses and the operation of the program should not change. For example, if our superclass has something like three methods, and for one of its children we don't want to implement one of them (methods), then we should rethink the logic of the superclass by removing the method that is not used in all subclasses and implement a new method in the subclass where necessary without violating the integrity of the parent superclass. In which case we can now substitute subclass and superclass types between each other, and L principle will be respected.

  • @TikTokTrendsCompilation
    @TikTokTrendsCompilation 3 месяца назад +3

    yeah try explaining this to nextjs developers 🤣🤣🤣

  • @randomcsguy2065
    @randomcsguy2065 3 месяца назад

    👑👑👑

  • @devkumar9889
    @devkumar9889 3 месяца назад

    Itni depth me oops to aj tak nai seekha

  • @chitrarajkpaul8223
    @chitrarajkpaul8223 3 месяца назад

    Please do a video on admob in flutter and create real ads in our app

  • @Zyzzbruh
    @Zyzzbruh 3 месяца назад

    w vide , make a clean architecture vid fast ?

  • @DK-ym9zv
    @DK-ym9zv 3 месяца назад +3

    I mean do we really need this? SOLID looks like new devs nightmare. It will be way more difficult to understand the codebase when joining a project

  • @vivekrahul
    @vivekrahul 3 месяца назад

    First comment❤

  • @vikashtiwari8360
    @vikashtiwari8360 3 месяца назад +1

    Please bring uber clone

  • @manavpatel787
    @manavpatel787 3 месяца назад +1

    Please make a video on how to make a full stack binance clone

  • @vipe7639
    @vipe7639 29 дней назад

    19:21 The developer only needs to work 🥲🥲🥲

  • @CodeWithMaya07
    @CodeWithMaya07 3 месяца назад

    Rivaan can you guide flutter projects where to start… like which project has to start first second and so on… I’m confused which project to start first…