Clean Architecture iOS [MVC vs MVVM]

  Рет қаралды 25,632

Rebeloper - Rebel Developer

Rebeloper - Rebel Developer

Күн бұрын

Clean Architecture iOS [MVC vs MVVM]
Escape Tutorial Hell 👉 rebeloper.com/mentoring
Recently I just dived deep into clean architecture! This video is perfect for you if you want to learn clean architecture ios, MVC vs MVVM, advanced swift. I go over mvc vs mvvm swift, swift architecture patterns, ios patterns, and the steps that could help you get closer on building your app better. While there is no easy shortcut on software architecture I will share an awesome clean architecture example and I will guide you step by step on clean architecture use cases. In this mvvm tutorial I will talk about clean code principles, mvc vs mvvm vs mvp, mvvm ios example and clean code github. I hope this video can give you some tips on mvc mvvm mvp and clean code! If you want to learn ios app development you are in the right place!
Don’t forget to subscribe to my KZfaq channel for more mvvm ios tutorial and clean code videos. Join me as I break down ios engineering and mvvm ios swift example.
Enjoy!
Don’t forget to download the resources:
→ store.rebeloper.com/youtube-c...
**VIDEOS I RECOMMEND**
→ MVVM & MVC videos:
• MVVM SwiftUI - Model V...
• MVVM in Swift - (Model...
• Design Patterns MVVM a...
→ PLAYLIST: Core Data iOS in 2020
• CORE DATA SWIFT TUTORI...
DO YOU WANT TO BE MY APPRENTICE?
HIRE ME → rebeloper.com/hire-us/
TOOLS I RECOMMEND:
→ rebeloper.com/tools
__________
Say hi on social:
Get in touch:
→ support@rebeloper.com
SUBSCRIBE to weekly tips & tutorials for building iOS apps!
→ kzfaq.info?su...
Github: github.com/rebeloper/
Hire me: rebeloper.com/hire-us/
LinkedIn: / rebeloper
My Blog: rebeloper.com/blog
Follow me on Instagram: / rebeloper
_____
• Clean Architecture iOS...
#rebeloper
CHAPTERS:
_____
00:00 INTR0
00:22 EXAMPLE PROJECT OVERVIEW
02:00 MVC EXPLAINED
04:59 MVC DRAWBACKS
06:06 MVVM EXPLAINED
10:18 WHAT TO DO NEXT

Пікірлер: 48
@rebeloper
@rebeloper 3 жыл бұрын
Which is you favourite MVC or MVVM?
@aravindhann9772
@aravindhann9772 3 жыл бұрын
MVVM is very useful for large application
@antonilin3123
@antonilin3123 3 жыл бұрын
comprehensive explanation ) Thanks a lot )
@rebeloper
@rebeloper 3 жыл бұрын
Agreed! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .kzfaq.info/get/bejne/pcCcoqykq5esZJs.html
@captainmichaelj2321
@captainmichaelj2321 2 жыл бұрын
Exactly the tutorial I was looking for, thanks so much for the great video :)
@rebeloper
@rebeloper 2 жыл бұрын
You're very welcome! BTW what do you think of my latest video on Flexible Header in SwiftUI: kzfaq.info/get/bejne/isd8dJaLp9GaiqM.html
@Eugene.Berezin
@Eugene.Berezin 3 жыл бұрын
How about binding? One of the benefits of MVVM that you can create binding and update your view reactively.
@rebeloper
@rebeloper 3 жыл бұрын
Best comment on this video :) I just did not have the time to explain bindings. Reactive programming may be confusing for starters :) BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .kzfaq.info/get/bejne/pcCcoqykq5esZJs.html
@samuelpmilanez
@samuelpmilanez 3 жыл бұрын
Thanks for the video. I will integrate a new project and the architecture is Clean MVVM; your video was amazing for my compreension.
@rebeloper
@rebeloper 3 жыл бұрын
Glad it was helpful! If you liked this video you will love *Swift Encryption with Crypto Manager* : kzfaq.info/get/bejne/hql7hJl5va-qn2g.html
@casadogaspar
@casadogaspar 2 жыл бұрын
This is the best explanation I ever saw about the theme. Make it so simple for beginners understand it by comparison.
@rebeloper
@rebeloper 2 жыл бұрын
Glad it helped. MVC and MVVM can be tricky to understand. BTW now you can have a Slide in Menu easily in SwiftUI: kzfaq.info/get/bejne/b717ibt5zKuqhWw.html
@jhngolan
@jhngolan 3 жыл бұрын
I already implemented MMVM architecture in Java MVVM hopefully can implemented it in IOS Swift after knowing detail of Xcode, newcomer in Apple Gadget , thank you Mr for the nice explanation
@rebeloper
@rebeloper 3 жыл бұрын
You are welcome, Johan! BTW if you liked this video you will love my newest tutorial *Google Maps Swift: How to Implement Google Map in iOS* kzfaq.info/get/bejne/hqych9R2l8nPl30.html
@MrBrunomalo1
@MrBrunomalo1 3 жыл бұрын
In your example, is not the same thing that create a utility class wich receive a skillLevel and return a levelname ?
@rebeloper
@rebeloper 3 жыл бұрын
Yes, classes are also okay. If you enjoyed this video I suggest taking a look at Fira Code: kzfaq.info/get/bejne/nLubbMt9sbbaoaM.html
@svitlanagrytsai4190
@svitlanagrytsai4190 3 жыл бұрын
Thanks for the explanation!
@rebeloper
@rebeloper 3 жыл бұрын
Glad it was helpful! If you enjoyed this video you might want to take a look at my lates video: Chart in iOS in SwiftUI -> kzfaq.info/get/bejne/ab5iq9mYs9zQoHk.html
@SourovDattacse
@SourovDattacse 3 жыл бұрын
Thanks for your video. However, I did not understand the separation of concern using a view model. Getting Puzzled
@rebeloper
@rebeloper 3 жыл бұрын
Short story: make sure that your views only display, your controller only controls the views and everything else is moved out of them. It may be confusing at first, but practice makes perfect. BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .kzfaq.info/get/bejne/pcCcoqykq5esZJs.html
@BigCarso
@BigCarso 2 жыл бұрын
Where did you get this definition of MVVM from? It seems quite different to the original idea from windows
@rebeloper
@rebeloper 2 жыл бұрын
Don't really know where from, it's just is in the iOS community. BTW if you did like this video I think you will enjoy "How to Publish an App to the App Store": kzfaq.info/get/bejne/r9GZd5io1t23lWg.html
@BigCarso
@BigCarso 2 жыл бұрын
Hmm I think your example was too simple to really show the benefit of MVVM. Without databinding or the mediator pattern all you have is a simple mapping function.
@user-xk6eg7dh2x
@user-xk6eg7dh2x 3 жыл бұрын
Cool video!Thx!
@rebeloper
@rebeloper 3 жыл бұрын
Glad you liked it! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .kzfaq.info/get/bejne/pcCcoqykq5esZJs.html
@mohamednidhalmrad1228
@mohamednidhalmrad1228 2 жыл бұрын
Thanks for your video. ✅ 1/but when we have logic in cell and in its viewController. we one ViewModel contains all the logic or create one for the cell and another for viewController. "/ when we have for example three viewController that contains the three steps of creating something. we make one ViewModel instantiated in each ViewController or we make three different ViewModels class (first ViewModel, second view model, their ViewModel)
@rebeloper
@rebeloper 2 жыл бұрын
I would go with one view model moved through the 3 view controllers. BTW if you enjoyed this tutorial make sure you take a look at my latest video about Progress Indicator Examples: kzfaq.info/get/bejne/pK6iZcuZkrHLhJ8.html
@alexzvarich
@alexzvarich 3 жыл бұрын
Amazing!
@rebeloper
@rebeloper 3 жыл бұрын
Thank you! Cheers! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .kzfaq.info/get/bejne/pcCcoqykq5esZJs.html
@indomitabletr1834
@indomitabletr1834 Жыл бұрын
Sir, can you add also MVP and VIPER architectures?
@rebeloper
@rebeloper Жыл бұрын
Noted. Till than take a look at my lates video about 30 Xcode Keyboard Shortcuts You NEED to Know: kzfaq.info/get/bejne/eb2ae6xk28Cwg58.html
@abelhancco4349
@abelhancco4349 Жыл бұрын
nice
@rebeloper
@rebeloper Жыл бұрын
Thanks, Abel. Here's the easiest realtime app I’ve ever built 👇 kzfaq.info/get/bejne/qqxxZpOhlt3DpoU.html
@josephtsui8365
@josephtsui8365 2 жыл бұрын
good explanation
@rebeloper
@rebeloper 2 жыл бұрын
Thanks and welcome! Making MONEY just got EASIER on the App Store (and you didn't even know it!) 👉 kzfaq.info/get/bejne/baeGi5ejnc-6XZ8.html
@davidnitzsche-bell5418
@davidnitzsche-bell5418 3 жыл бұрын
10:10 couldn't you just create computed properties, name and level, in the model and put the logic in there? Then, for both the MVC and the MVVM, filling in the TableViewCell would be the same two lines.
@rebeloper
@rebeloper 3 жыл бұрын
Yes, but I would not be talking about MVVM. BTW if you did like this video make sure to take a look at how to create a MEME generator in SwiftUI: kzfaq.info/get/bejne/h9-ohJljmcCxaWg.html
@davidnitzsche-bell5418
@davidnitzsche-bell5418 3 жыл бұрын
@@rebeloper Thank you for answering. Let me rephrase.... I'd like to see a case where MVVM would be 'required' or noticeably better; a case where using computed properties simply wouldn't work. I ask because I'm still trying to really understand the difference between the "C" in MVC and the "VM" in MVVM. So far, no video I've seen really does that.
@kishannakum104
@kishannakum104 3 жыл бұрын
💥💥💥💥
@rebeloper
@rebeloper 3 жыл бұрын
💥💥💥💥 indeed! BTW check out my latest video about building your very own *Custom Frameworks in Swift* : .kzfaq.info/get/bejne/pcCcoqykq5esZJs.html
@Neographic84
@Neographic84 3 жыл бұрын
Rebeloper thanks always for your tutorials they are very clear and help the whole community a lot! Thank you! I need help .. I have a struct struct TimeSelModel { let hour: String let minute: String } ------------------------------------------------------ I recover data this way because I need to view some data in section 0 of my collectionview and other data in section 1 struct TimeSelData { static func dataSec (section: Int, _ completion: @escaping (Result ) -> ()) { if section == 0 {completion (.success (dataSec0))} else {completion (.success (dataSec1))} } } let dataSec0 = [ TimeSelModel (hour: "09", minute: ": 30"), TimeSelModel (hour: "17", minute: ": 00") ] let dataSec1 = [ TimeSelModel (hour: "12", minute: ": 00"), TimeSelModel (hour: "19", minute: ": 00") ] --------------------------------------------------------------- I use the data this way inside my controller private var section: Int = 0 var data: [TimeSelModel] = [] private func fetchData () -> Void { TimeSelData.dataSec (section: section) {(result) in switch result { case.success (let data): self.data = date case.failure (let error): print (error.localizedDescription) } } } func collectionView (_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { self.section = section return data.count} func collectionView (_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell (withReuseIdentifier: TimeSelCell.cellID, for: indexPath) as! TimeSelCell cell.dataModel = data [indexPath.item] return cell } It doesn't work I don't get the right data for the sections of my collectionView .. Using your example in your tutorial how can I achieve my goal of displaying different data for 2 different sections of a collectionView?
@rebeloper
@rebeloper 3 жыл бұрын
Explaining this in a comment is hard. I can help you in a mentoring session: rebeloper.com/mentoring BTW take a look at my latest video: SwiftUI Animation kzfaq.info/get/bejne/sJqoltNots-5onk.html
@Neographic84
@Neographic84 3 жыл бұрын
@@rebeloper thanks Rebeloper it's interesting ! if i have big problems i create a session with you! thank you
@rebeloper
@rebeloper 3 жыл бұрын
Awesome Fabio. Looking forward to the sessions when you need them. Do you like SwiftUI? Check out my latest Live Stream on SwiftUI Button Styles: kzfaq.info/get/bejne/oOB8ldxnmM-rpn0.html
@abdullahshahid6637
@abdullahshahid6637 Жыл бұрын
But what is Clean Architecture?
@rebeloper
@rebeloper Жыл бұрын
Sorry the video did not give you an answer.
@cagriporti
@cagriporti 3 жыл бұрын
Thanks for the explanation!
@rebeloper
@rebeloper 3 жыл бұрын
No problem! BTW do you like the Previews in SwiftUI? Find out everything you have to know about Previews here: kzfaq.info/get/bejne/qN6Wp8ijxN2xiH0.html
MVVM is BAD for SwiftUI - Use MVC Instead! (Yes, MVC)
13:28
Rebeloper - Rebel Developer
Рет қаралды 4,1 М.
🤔Какой Орган самый длинный ? #shorts
00:42
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 21 МЛН
Which Software Architecture Should You Use: MVC, MVP, or MVVM?
24:27
Everything You NEED to Know About Client Architecture Patterns
5:51
MVVM Vs MVC | MVVM & MVC Architectures | Intellipaat
14:10
Intellipaat
Рет қаралды 25 М.
MVVM in Swift - (Model View View-Model) Getting Started 2020
15:46
Rebeloper - Rebel Developer
Рет қаралды 34 М.
MVVM + Dependency Injection in Swift | Unit Testing | iOS
29:29
MVVM Architecture in iOS (Swift)
34:25
Venu Gopal Tewari
Рет қаралды 6 М.
MVVM vs MVP: what's the difference? 🤔
9:27
Vincent Pradeilles
Рет қаралды 9 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,4 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 422 М.
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2 МЛН
low battery 🪫
0:10
dednahype
Рет қаралды 698 М.
ВАЖНО! Не проверяйте на своем iPhone после установки на экран!
0:19
ГЛАЗУРЬ СТЕКЛО для iPhone и аксессуары OTU
Рет қаралды 6 МЛН