Тёмный

The Model View Approach in SwiftUI 

Code Cat
Подписаться 16 тыс.
Просмотров 2,8 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@CodeCat15
@CodeCat15 2 года назад
Hey there, I hope this session was helpful and if you have questions then please feel free to ask them in comment section. iOS cafe invite link: discord.gg/gB3mhP8DNq Download source code shown in the video from GitHub: github.com/codecat15/RU-vid-tutorial/tree/master/SwiftUI/ModelViewApproach
@nirajtiwari8141
@nirajtiwari8141 2 года назад
There was a buzz going on with this MV approach on Twitter and Apple Dev Forum so I watched this video till the end. As long as Apple doesn't provides any official way, there will come many opinionated ways to make SwiftUI apps, but in the end, we have to work in industry with best practises, using SOLID principles, design patterns with testability in mind to deliver quality apps. It seems to me that MV approach doesn't adds any value by violating software principles 😌. Will society accept me for putting this opinion 🤔?
@CodeCat15
@CodeCat15 2 года назад
The thing about developer forums is that the content that’s being discussed is not officially from apple, rather it’s a suggestion or perhaps an opinion. In programming domain if you decide to use a approach then that approach/suggestion needs to be tested throughly to make sure it adheres to all coding standards or at least does not break any object oriented principle. And maybe for saying this out loud the creative developer community won’t accept you or me both 😂😂😂
@prataprana2963
@prataprana2963 2 года назад
Great video and much needed..!! The main thing is that what we see in demos or tutorials is not true for organisation and enterprise app code. We should keep this in mind. Thanks for sharing
@CodeCat15
@CodeCat15 2 года назад
Indeed, demos are not writing in stone for best practices unless they specifically mention that this is the best practice and why
@dharamveergupta1305
@dharamveergupta1305 2 года назад
I am a professional Sr.Android App developer, Should I learn iOS? If not then what should I proceed with?
@CodeCat15
@CodeCat15 2 года назад
I did a video on career guidance for senior developers, it’s not specific to iOS but will surely give you a path to what to next & plan better ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MpFe0AaIsgQ.html Hope it helps, please do ask questions if you still have doubts
@nidhitiwari634
@nidhitiwari634 2 года назад
I have a doubt it's not related to this topic but hope you give me the answer of this..... Why do enum not have stored property???
@CodeCat15
@CodeCat15 2 года назад
before I respond to this, tell me why do you think they don't?
@Priyali05
@Priyali05 2 года назад
Hi, please make video on VIPER architecture
@CodeCat15
@CodeCat15 2 года назад
I try note to use that monstrosity as it's immense pain to build all those layers for no reason for a simple app tbh, but then I am still trying to learn and find reasons as to why folks use this pattern over something that's simple and more manageable to maintain, it almost feels like over-engineered
@weekendNavigation
@weekendNavigation Год назад
What we should use for a client application which we are planning to start ?
@CodeCat15
@CodeCat15 Год назад
Can you elaborate the question please, do you mean what architecture you want to use for client apps?
@weekendNavigation
@weekendNavigation Год назад
Yes app architecture, mvvm or viper or mvp , this application should be in iOS I i-watch and iMac all 3 platforms a bit complex ui means it have graph etc like a stock market app
@tundsdev
@tundsdev 2 года назад
Great video, clear breakdown with a clear comparison too!
@CodeCat15
@CodeCat15 2 года назад
Hey thank you for the comment 😊 I am glad this comparison was helpful
@VirenderDall
@VirenderDall 2 года назад
Thank you Ravi :)
@CodeCat15
@CodeCat15 2 года назад
Glad this was helpful Virender
@MultiGaurav1989
@MultiGaurav1989 2 года назад
I am very much thankful the way you are explaining each and every topics in details and in easy/understandable language . I request you to please make video for memory management attributes (Strong , weak , assign, retain, copy etc...) of objective for automatic & manual memory management which will clear many doubt of memory management for objective c developers.
@CodeCat15
@CodeCat15 2 года назад
there's a video on ARC, weak and unowned keyword, copy on write which will explain you those topics, I have not covered assign and retain, I guess I have touched few aspects on retain in the ARC video so its kind of scattered across than having a dedicated video.
@Jock3R87
@Jock3R87 2 года назад
Hey Mate... Thanks a ton for this video and appreciate your efforts for making this video to clarify and make us aware that what needs to be done when it comes to make a decision while choosing Best suited architecture. I personally came across this so called MV pattern on social media platforms and i was surprised and bit confused. But this video clarified everything, definitely this is not the best practice as this gonna lead to massive and messed up Views. Also from testing POV I think this MV pattern is disaster as there will be 0 testability. Thanks again and hoping this pattern should not have any place in Architecture world... Cheers
@CodeCat15
@CodeCat15 2 года назад
I agree, imagine using this in a large complex app, not sure what other principle will it break, when we deal with complex use cases, The matter of fact that it breaks abstraction it raises a red flag in my mind that maybe you should not be having functions in the model. There’s a reason why good code principles exists and are proven to be beneficial over decades and have stood strong the test of time.
@abhishekdhiman9771
@abhishekdhiman9771 2 года назад
We appreciate your initiative in adhering to the principles we were taught. The chaos was loud. let's hope heavy developers get convinced to consider beyond profit.
@CodeCat15
@CodeCat15 2 года назад
Maybe folks who care about coding principles and code maintainability won’t use this MV approach. Even if this is used, then I won’t be surprised if this becomes an anti pattern because of all the principles it breaks.
@vishalbhai123
@vishalbhai123 Год назад
Very nice explanation. Thanks a lot. Which one is better Future or AnyPublisher for API Client method? Please give overview If possible.
@vishalmalvi895
@vishalmalvi895 2 года назад
Thank you for sharing this amazing video.
@CodeCat15
@CodeCat15 2 года назад
I am glad this was helpful Vishal.
@rasinsahaji5296
@rasinsahaji5296 2 года назад
I saw this model in the apple forum but I was unable to explain to the senior manager, now I can huge thank you.
@CodeCat15
@CodeCat15 2 года назад
Glad it was helpful Rasin 😊 or better is you can just share this video with your senior.
@rasinsahaji5296
@rasinsahaji5296 2 года назад
@@CodeCat15 yes I did that..
@rasinsahaji5296
@rasinsahaji5296 2 года назад
One more question sir, if we use Uikit we can use the same view controller, with different ui code thanks to class type but how we can achieve that in Swiftui as it's struct I have no idea how we can achieve that, 3 text field to signup in Uikit I can inherit or conform and made that login page just hiding one text field and different button action (api call) , I want to achieve that in Swiftui
@CodeCat15
@CodeCat15 2 года назад
Can you elaborate the requirement that you are trying to achieve please
@rasinsahaji5296
@rasinsahaji5296 2 года назад
@@CodeCat15 I think RU-vid removed my comment?
@rasinsahaji5296
@rasinsahaji5296 2 года назад
@@CodeCat15 sir all I want is to achieve I want to create outlet once and I will use that in multiple places without writing everything, I can achieve that in Uikit thanks to class but I don't know is that possible in Swiftui struct
@CodeCat15
@CodeCat15 2 года назад
Ahh I know why I have strict mode on, and it blocks certain comments on its own I’ll turn it off, apologies
@rasinsahaji5296
@rasinsahaji5296 2 года назад
@@CodeCat15 let me ping you in discord
@mdfaizashraf487
@mdfaizashraf487 2 года назад
Ravi Bhai is going to bounce ☺
@mdfaizashraf487
@mdfaizashraf487 2 года назад
By the way, with the help of your first SwiftUI Api parsing video, I am working on a SwiftUI app.
@CodeCat15
@CodeCat15 2 года назад
That’s great Faiz I am glad the videos were helpful and I am happy you got working on SwiftUI. All the best 👍