ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
#4 - BLoC Architecture - Presentation, Business Logic & Data Layer + Model, Repository, DataProvider
ฝัง
- เผยแพร่เมื่อ 18 ก.ย. 2020
- Hi there!
Today I'll try to explain you why the BLoC Architecture is the key to building a strong and stable app. So, we'll dive into the Presentation Layer, Business Logic Layer and Data Layer (which includes other small sublayers like Models, Repositories and DataProviders (APIs)).
All animations were done in VideoScribe, you can try it by clicking my affiliate link --- www.awin1.com/...
You can contact me directly here:
Join my Discord Server --- / discord
Twitter --- / letsgetwckd
Instagram --- / letsgetwckd
Also, if you want to support me furthermore you can become an TH-cam Member, donate or buy my courses on Udemy, using the following links:
Become an Official TH-cam Member! ---- / flutterly
Buy my Udemy Courses! ---- www.udemy.com/...
Support me on Revolut! ---- revolut.me/let...
Buy me a Ko-fi! --- ko-fi.com/wckdyt
Donate me on Paypal! --- www.paypal.me/...
Support me on Patreon! --- / wckdyt
Hello, everyone!
The entire course is now live on Udemy too, get it while it's hot --> www.udemy.com/course/bloc-from-zero-to-hero/?referralCode=E689592633984B34DBEF
Also I have just managed to finally finish the entire BLoC - From Zero to Hero Complete Course, based on this tutorial series. You can check it out here -> th-cam.com/video/THCkkQ-V1-8/w-d-xo.html
I see high-quality TH-camr here 😍
Thank you so much!
I vouche for that! Please keep making videos! @Flutterly
Thanks to your tutorials I've corrected lots of my mistakes and made my project more efficient. Thanks for the tutorials, keep it up!
I'm really glad to hear that, thanks!
It's just amazing how much effort you put into these videos - Impressive.
Thank you so much! I appreciate it!
How can someone explain such complex concepts with such ease and clarity 🔥🔥🔥
This is GOLD! Every single tutorial has been very brilliantly dealt with so far! Thank you!
Whenever I am learning new technology, I'm struggling to find tutorials like these. Great tutorials.
you are best teacher of Flutter that i have ever see...keep it up...
This is the first group of tutorials that I have watched that actually makes sense. Thanks for this, I might finally be able to code properly now.
Awesome, I think no one has explained it the way Mr. WCKD has. Simple, intuitive, and complete.
Thank you so much! ✨
I was literally waiting for your next video in the series...good work!
Thank you, more to come!
I guess No one has ever explained such things in such simple manner. Thank You for taking out your time and creating such videos.
You are most welcome!
This is the best bloc tutorial ever..I'm so grateful
After watching the ResoCoder TDD with Flutter BLoC series, I thought nobody would be able to match that quality of content. I have to admit that I was wrong. The quality of content in your entire BLoC series is amazing! 🔥
Thank you so much for your kind words! I appreciate it! ResoCoder has put more accent on TDD rather than BLoC on that series, but it's still an amazing series nonetheless!
the best bloc course ever in the internet thanks a lot
Bro, I fell in love with your content
Thank you so much!
I immediately subscribed without hesitation. I've learned a lot in just 15 minutes, man you are great!
Thank you for your feedback! ✨ I am glad you like my content!
no way! even the creator of bloc flex didn't explain it the way u did
KEEP GOING U R AWESOME
Thank you so much! Actually, Felix, the creator of BLoC is one of the best and most helpful people I have ever had a chance to talk too! He helped me a lot with these videos and overall with all the concepts back then when I firstly encountered bloc and Flutter. ♥ Thank you for your feedback though! I appreciate it!
The most simple and comperhensive tutorial about BLoC. Thanks Man! I appreciate your work
Thank you so much
Loved the architecture comparison between the human body and code. Can't humanize tech more than that. Great work!
Thank you so much!
Finally clear up my doubts on where to implement try - catch.
So i should now wrap all my blocs functions in try- catch now
Yes, it's a great solution to take care of problems caused by the data layer. You should also wrap the repositories and data providers too
Flutterly you mean I have to wrap try - catch for ALL layers?
Yeah, I meant you should wrap any operation that you know may cause issues into a try/catch
I have no idea of Flutter, was only looking for videos that describe business logic. You put so much work into it and explained it very well!
Thank you so much, I appreciate it!
A clear explanation, indeed. Bravo!
Thank you! 🌟
Great video as always! Loving this series! It's like a introduction to the DDD of ResoCoder but teaches more easily somethings that aren't said there. Really glad that the next video will be about bloc testing!
I'm glad I could help. ResoCoder's TDD series is also amazing and well structured! Lots of things to be learned from that too!
@@Flutterly man, I don't know if you know that but Feliz (creator of bloc) posted this video on the bloc discord channel. Congratulations! I think your videos will be very helpful to the community!
Thank you so much! Didn't know, but I know Felix is an amazing and helpful person! 🌟
This channel is gonna blow up for sure!
Haha, hopefully it will, man, I really appreciate it!
I love your tutorials... I had dreaded BLoC pattern for some time now... But with these tutorials I can conquer the world
Thank you so much! I am really pleased and happy that you find them easy to understand and learn. Keep going!
I am literally unlearning what l thought I learnt properly through other content creators. Thank you, and keep it up! I am binge-studying and making changes to my apps
Thank you so much! ✨
Thank you so much! I've finally learned these difficult concepts after many months of reading and watching videos over the entire internet with no results. And you in 15 minutes explained, in an understandable way, what others couldn't do in hours! From now on, you are my idol! 👍
i just cant thank you enough.
you have made it so clear and concise for a beginner like me !!
lots of love and respect for you & your hard work !!
Thanks a lot !!
Excellent videos dude, I keep coming back to certain frames of the video to get that one overview, just to refresh my memory. Keep up the good work!
Thank you so much! I appreciate it!
very clear and from what i can tell this will immensely useful... What i need is to make my code maintainable
Fantastic!! This is by far the best tutorial I have seen on bloc and application architecture. Amazing. Thanks a lot 😃😃🙏
Thank you so much, I appreciate your feedback!
You are a king man, thank you so much for this BloC series
Wonderful, composite easy to understand with pictorial presentation, Can't wait for the coding part.
Thank you so much!
Sir you are just amazing. I can`t believe these videos are free. Thank you so much for these valuables videos.
Yesterday i searched google "understanding flutter bloc for beginners" and this video came out and today i am watching from the beginning because it gives me what I was looking for as a newbie in flutter bloc. Amazing explaination, a newbie like me understand it very well lol. Keep it up please. Btw i also want to understand flutter clean architecture in laymans terms or how you are explaining it here. Thanks, done subscribing. 👍🏻
Thanks - it explains the purpose of the different layers really well - I'm going to refactor some of my existing code and try it out now :-)
Thanks so much for your extensive feedback, let me know how the refactoring works for you in the end, looking forward
@@Flutterly The refactoring went ok, getting error messages from APIs back to the bloc was a bit tricky (eg working out which technique to use), but the overall structure looks tidy and should scale well, as I add more features. Looking forward to the next vid -)
I'm really happy that it went amazing for you, more real world app examples will come in the near future so that you can practice the architecture even more!
Thank you. The best tutorial I saw about how it works Bloc.
Thanks a lot! ✨
Excellent and super clear explanation
Perfect diagram for the bloc architecture workflow.
Your course on Bloc is really good!
Your content has helped me a ton! Thank you for the time and effort that you put into these. Keep up the good work, I’m sure more viewers will come!!
Thank you so much for your kind words! I appreciate it! I'll keep the content coming!
Hi, Thanks to your tutorials and It's amazing.
I've corrected lots of my mistakes and made my project more efficient.
one suggestion bro.. pls make real time code in video.
Nice, you help me a-lot on understanding the concept of Bloc. Thanks, Great video BTW.
I think I will be back for this channel, Good work!
Question: at 8:19, you have calls to 2 different APIs (one of them is commented out). How can you safely do something like ‘Weather.fromJson(rawWeather)’ considering that (as you mentioned earlier) the JSON responses might be completely different from one API to the next?
I feel like I missing something here @Flutterly?
Also, thank you for making awesome series. It is really quality content!
i swear my god i am so happy to find your videos you r the best mannn !
WOW !!! amazing and high quality content !! Thanks
Thank you so much!
Great combination of illustrations and clear explanation. Keep it up! :)
Thank you so much!
Thanks a lot, these videos are beneficial, I don't know how do I thank you
Amazing video, everything was well explained, thanks!
This is absolutely amazing! Perfectly explained. Well done!
Thank you so much! ✨
Only 2 minutes in and my current way of developing webapps is being called a complete failure, this is going to be good :D
Haha, thanks for the feedback, man! ✨
Thank you soo much! Amazing explanations !!!
Thank you, brother 🤍
So amazing, zero to hero for real.
Thank you! I can understand easier.
very good explanation, thanks!!
You should do more architectural courses!
Let's fucking go , I finnaly found someone that explains bloc very well :))))))))
Thanks a lot! ✨
Awesome! Thanks! I just notice that on 13m58s there is a small error in the Weather class. Dart language doesn't have float type) Anyways this is brilliant video and I'm full of respect for the author.
I only there could have only intermediate-advanced Dart-Flutter tutos like these on the internet and not basic ones that are so easy to find 👍
Simply amazing video, could not wait for the real coding part 👍🏻
Thank you so much!
Thank you very much, I understood all the concepts, your explanation is beautiful and understandable ، I wish u all the best 💙
Thank you for the positive feedback! Seeing that everyone understands and learns something I am trying to explain is the best reward for me!
Amazing Tutorial Series 🔥
If youtube alows me: HOLY DDDDAANNNG FKKK!!! THIS IS GOLD! I understood more in this video than in LITTERALLY 3 hours of my flutter teacher on Udemy.
BEST EXPLANATION EVER!!!!
Thank you so much!
Perfectly explained man! Way to go!
Hi. Thank you so much. I'm looking forward to the 5th video.
Thank you so much! It will come soon
Great video! Like you said, need to watch it at least 2 or 3 times. :) Thanks!
You're welcome! Glad it helped
Awesome explanation!
Thank you so much! It's super clear :D
You're welcome, man, thanks! 🌟
Thanks a alot. Your video is very great!
Thank you so much! ✨
Perfect Explanantion Thanks
Great explanation with clear illustrations, I can say I didn't see something like this before. Keep doing the great job, and please make real, really real application apps, even if it is paid I am the first subscriber.
Thank you so much, I will! They'll be free, I want everyone to have access to my content! ✨
awesome! thanks for the sharing
This is BEAUTIFUL!
thankyou for this essential knowledges. new subscriber here 💗
Really appreciated these videos, really clear and clever even for a flutter beginner like me, been looking around for something like that for weeks;
anyway when will the full data layer explanation video be available?
Thank you for your kind feedback! The full data layer explanation will make and and will be available right when I get into developing real apps with flutter and bloc! That's going to be the next series on this channel, so stay tuned!
@@Flutterly looking forward for it, can't wait😁
Man you your so amazing, Thanks a lot❤️
Thank you again!
you are amazing !
thanks for your effort.
good video, thank you. waiting from you practice lessons
Thank you so much!
Amazing! Thank you so much for this.
It would be wonderful if you could implement an actual weather app. I very much would appreciate how it works!
Thanks you! It's really useful
Very very nice. Thank yo so much.
Absolutely stunning course!! A must watch for any flutter and bloc noob like me, I know :D
I have one question tho. Here you have split the architecture into three layers: Presentation, Business Logic & Data layers.
However, in Clean Architecture tutorials, they always split the layers in Presentation, Domain & Data layers! So is the domain layer same as the business logic layer? Am I supposed to put my bloc & cubits in the domain package in my project? Or the Domain layer is some completely different concept you've skipped over to reduce complexity?
Yes, mostly yes. However, I'll recommend you watch my latest video on very good cli and notice the structure I'll be using from now on on my projects! ✨
I have a question about The models. You mentioned about independency. So all your models should have actually dependent. when you parsing data, you can not change "temp" key value to "temperature". Can you explain that what I'm missing there?
Hello @Flutterly I have one doubt Bloc Architecture which pattern are you using? like mvc or mvvm
nice :) thanks for not asking to subscribe or to like your video. Liked and subscribed
Haha, thank you, man! 😂
Me too!
Hypotheticaly, if I have multiple sources (someAPI, otherAPI) for the same model how can I call the same fromJSON? I've got different JSONs (In Dart represented as Maps) with different keys.
Isn't it model's responsibility to transform multiple rawData? So fromSomeApiJson and fromOtherApiJson?
But that wouldn't work with code generation well. They expect one fromJson method.
So maybe create one abstract Model that ModelSome and ModelOther will implement and then call the right one's fromJSON?
Which extension you are using for the File and Folder icons?
Thank you Wckd for the clear and easy to understand video. I was wondering if my application uses sqlite for data storage, then the data provider is the thing that makes the SQL query to the database, right? I see somewhere people create another kind of class called DAO (data access object I guess) but I'm not sure that is really needed.
Btw, may I ask what is the plugin you used to display the tree structure of the widgets?
You're welcome! Yes, the data provider makes the connection with the internet/databases or whatever data sources you might have. What do you mean by showing the widget tree? It was an animation I overlayed over the video.
@@Flutterly Ah I mean the Vscode plugin that display the child elements of a class like in th-cam.com/video/NqUx-NfTts4/w-d-xo.html
thank you, very much bro
You're welcome, bro!
Nice explanation
Thank you, mate!
Best explanation on the web.
I've also seen that people do an abstract Repo or ApiClient class and then like implement repoImpl or ApiClientImpl for different sources and mocking. Don't remember what class exactly, can you please explain this part also? Thanks
I have a big question. If I am using firebase auth, can the data provider be skipped? since firebase auth already has it's api created, and it wouldn't it be redudant to create it?. Thanks
I can't get what must include RawWeather class? If it is just jsonString then why to decompose to another class?
thank you Wikd for this amazing series and helping out the flutter community. is there a possibility that we can get the slides used through the course !
I am Addicted.
hi thnx :) i have a question plz are there any differences from flutter_bloc and bloc Api? And in some videos use another way in bloc class, override initial state and mapToEvent method. Which one is better? Using streamContoller or another way with using mapToEvent and initialState method in Bloc class?
I don't quite understand your question, mate. You should use what I mention in all my tutorials, since that's what is recommended by the creator of bloc, and if he doesn't know it's stuff... I don't know who else does. When learning something, you should stick to a tutorial series, watching multiple ones will mess up your concepts. Believe me, been there, done that. That's why I decided to make this tutorial series, everything mentioned inside will answer all of your questions. 👍
sir! you're god, thank you
Thanks
You're welcome!