VIPER Architecture in iOS (Swift)
Вставка
- Опубліковано 6 лис 2021
- Welcome to our in-depth guide on the VIPER Architecture with interview questions ! 🚀 In this video, we'll delve into everything you need to know about VIPER - a robust and modular software architecture pattern that empowers developers to build scalable and maintainable iOS applications.
🧱 VIPER is an acronym that stands for View, Interactor, Presenter, Entity, and Router - each representing a specific role in the architecture. By adopting VIPER, you can enhance collaboration between team members, simplify testing, and maintain a clean separation of concerns in your iOS projects.
🎓 Whether you're a beginner or an experienced iOS developer, this comprehensive tutorial will equip you with the knowledge and practical insights needed to implement VIPER successfully. We'll explore real-world examples to illustrate how VIPER can be used to craft elegant and efficient iOS applications.
💻 From understanding the core components to implementing them in your projects, we've got you covered. VIPER might seem daunting at first, but fret not! We'll guide you step-by-step, ensuring you grasp the concepts and feel confident using VIPER in your projects.
📱 Learn how to architect your iOS apps with VIPER to improve code maintainability and make your apps more robust and scalable. VIPER is widely used in the iOS community, and mastering it will boost your app development career.
🔔 If you find this video helpful, please consider giving it a thumbs up and subscribing to our channel for more in-depth architectural patterns, iOS development tutorials, and software design tips.
🌟 Take your iOS app development skills to the next level with the VIPER Architecture! Let's dive in and build amazing apps together!
📁 Code Sample:
Access the complete source code and examples used in this video by sending email to us: venugopaltewari@gmail.com, Subject: VGT | Viper
#VIPERArchitecture #iosappdevelopment #softwarearchitecture #iosdevelopment #VIPERPattern #iOSArchitecture #mobileappdevelopment #iosprogramming #softwaredesign #appdevelopment #iosdeveloper #iosprogramming #iOSCommunity #codeoptimization #iOSDesignPatterns #cleancode #softwareengineering #ModularArchitecture #iosapps #viper #VIPER Architecture in swift,
#Viper architecture in swift iOS #Viper architecture swift #Viper architecture in swift iOS tutorial #Viper architecture in swift iOS app #Viper architecture in swift iOS development,
#Viper architecture swift example #Viper architecture swift iOS
📢 Connect with Us:
👉 LinkedIn:
/ venugopaltewari
👋 WhatsApp Channel:
whatsapp.com/channel/0029Va4o...
👍 Facebook:
/ venugopaltewari.tech
👨🏫 Twitter:
/ venugopaltewari
Venu Gopal Tewari is an IT professional & Mentor with more than a decade of industry experience. He is Member of Global Network of Enterprise Architecture Professionals and currently serving as Project Head & System Solution Architect. He has a rich experience of Mobility Solutions, IT Training, Business & Pre-sales and in-depth understanding Enterprise Architecture Frameworks.
For the past 2 years, Venu Gopal Tewari has been actively sharing content on UA-cam, LinkedIn, Facebook and Twitter amassing a following of 1800+ people.
He posts videos every week on his UA-cam channel, where he talks about Software Architectures, Design Patterns, How to grow in Job/Career & Life.
An alumnus of the world class companies as Wipro & Wipro Digital provides Consulting/Advisory services to Startups on a need basis.
वेणु गोपाल तिवारी एक आईटी पेशेवर और मेंटर हैं, जिनके पास उद्योग के एक दशक से अधिक का अनुभव है। वह एंटरप्राइज आर्किटेक्चर प्रोफेशनल्स के ग्लोबल नेटवर्क के सदस्य हैं और वर्तमान में प्रोजेक्ट हेड एंड सिस्टम सॉल्यूशन आर्किटेक्ट के रूप में कार्यरत हैं। उनके पास मोबिलिटी सॉल्यूशंस, आईटी ट्रेनिंग, बिजनेस और प्रीसेल्स का समृद्ध अनुभव है और एंटरप्राइज आर्किटेक्चर फ्रेमवर्क को गहराई से समझने का अनुभव है।
पिछले 2 वर्षों से, वेणु गोपाल तिवारी सक्रिय रूप से यूट्यूब, लिंक्डइन, फेसबुक और ट्विटर पर सामग्री साझा कर रहे हैं, जिसके 1800 से अधिक लोग फॉलो करते हैं।
वह हर हफ्ते अपने UA-cam चैनल पर वीडियो पोस्ट करता है, जहां वह सॉफ्टवेयर आर्किटेक्चर, डिजाइन पैटर्न, नौकरी/करियर और जीवन में कैसे आगे बढ़ें, के बारे में बात करता है। विप्रो और विप्रो डिजिटल के रूप में विश्व स्तर की कंपनियों का एक योगदानकर्ता आवश्यकता के आधार पर स्टार्टअप्स को परामर्श / सलाहकार सेवाएं प्रदान करता है।
Excellent Explanation 👏🏻👏🏻👏🏻👏🏻👏🏻❤
Glad you liked it!
You’ve got yourself a new subscriber. Viper is explained perfectly and it’s easy to understand even for beginners.
Thanks a lot Zion.
My efforts are all about making things simpler for learning.
@@VenuGopalTewari God bless you brother. Was stuck at understanding Viper till your video.
I second you on this Zion
Awesome , it's clear under standing code
The best explanation of Viper architecture. Thank you a lot.
You are welcome!
Really helpful video and explained very well. Thanks 😊 🙏
Thank you so much for sharing. Very helpful video. You explained it so well , hats off to you 🎉🎉.
Great job. By watching this video , now I understand how VIPER works. So thank you so much
I am absolutely delighted to know that it helped you. This made my effort sucess.
Vey beautifully explained and as simple as that . Thanks for sharing !!!
Stay Motivated, Keep learning with us ✌ We will resume very soon.
Very good explanation, easy to understand. Thanks Venu.
Your welcome Nikhil 😊
Quality content. Thanks.
Thanks
Nicely explained. Thanks a lot
Most welcome!
Really helpful video . Thanks for sharing it
Best of luck for restart ✌
It's so helpful video for new comers and who want learn to VIPER Architecture.Thank you sir
This made my efforts success Deepak. Thanks!
Great Job Venu . 👌
Thanks Akshay.
nice explanation
Very nice explanation, it is clear and not vague. Can you do similar for VIP(clean swift)? Thanks in advance :)
Thanks Ljubisa. I will try to accommodate your suggestion VIP(Clean Swift) in my future list.
@@VenuGopalTewari Thanks!
Very nice explanation
Thank you Pushpa.
Nice explanation 👍👍
Thanks apoorva
Great sir and Thanks for sharing code
Welcome
Nicely explained, shouldn't the Router be owning the Presenter and the Presenter would delegate to the Router when to move to the next screen or so?
Thanks for kind words. To answer your question - In the VIPER architecture, the Router should not own the Presenter. The Router is responsible for navigating between screens in the application, while the Presenter is responsible for formatting the data for display in the View. The Router should be able to communicate with the Presenter without having to know anything about the View, and vice versa. This decoupling of the layers makes the code more modular and easier to maintain.
@@VenuGopalTewari Thank you for the clarification
awesome
Thanks
bhai aap VM Factor Technology m job krte the na?
Yes Utkarsh.
This is an amazing video sir. Could you please share the repo link or where can I find the full code?
Thanks Dixy, email me at venugopaltewari@gmail.com
Subject: VGT | VIPER
I will send you the code.
Sample sent to you. Check!
@@VenuGopalTewari Sir i sent email for code , if you can please send it that will be great
Could you please share the full code?
Thanks for the clear explanation of the VIPER pattern.
Could you please share the code?
Thanks
Sure Waheed. Please email me at venugopaltewari@gmail.com
Subject: VGT | VIPER
@@VenuGopalTewari email sent!
@@waheedafolabi6929 Hope you received all the requested.
Thanks 🙏 I received the codebase!
It was nicely explained. Can you please share the source code ?
Email me at venugopaltewari@gmail.com
Subject: VGT | VIPER
I will send you the code.
Nice Video can u pls give the link in the description
Git link bro
Email me at venugopaltewari@gmail.com
Subject: VGT | VIPER
I will send you the zip
Nice explanation, Can I get the code for better understanding? I have already written you an email.
Replied to your email. Have a look.
@@VenuGopalTewari Hi Venu, Can you also please share the code with me as well?
Awesome ✨ can you share repo link sir?
Thanks, email me at venugopaltewari@gmail.com
Subject: VGT | VIPER
I will send you the zip.
@@VenuGopalTewari Done sir
He'll sir you are very good communications person for understanding code with coder. your English speaking very good . because i understanding code. because my English wik. Please share your code sir ?
Hi Ankur,
I am happy to hear that I could make it easier for you.
Email me venugopaltewari@gmail.com
Subject: VGT | Viper
I will send you the code.
Two Mistakes:
VIPER is not an architecture, its just a Design pattern,
you are making list component to do task of list fetching as well as details fetching, which is wrong.
This is the place where 99% people are confused.
Let me clarify it -
'Architecture' is always the high level structure of components, their inter-relationships, principles and guidelines which governs system's evolution overtime and Design Patterns are the low level structure of subcomponents like Rooms inside the Building.
There can be multiple design patterns inside an Architecture. Ex: VIPER can have Factory, Singleton, Observer, Decorator etc.
Now the second point in VIPER interactor is the place responsible for API communications you can refine it with the help of 'Repository' pattern also so either you want to fetch the list or you want to fetch the detail they should ideally route via Interactor only.
can yow pass data to previous controller using closure? send a example code.
Hi Rahul, This is very common urge to fall into closure trap to pass the data to previous view controller but in that way you will couple both of the view controllers. Right way is to use Router as follows:
(You can use delegate & closure both)
class ViewControllerA: SomeProtocol {
func testFunc(someData: DataType) {
}}
class ModuleARouter: AnotherProtocol {
............
............
func gotoModuleB(with vc: ViewControllerA) {
// your logic to navigate to module B, see sample code
ModuleBRouter.createModule(vc)
}}
------------------------------------------------------------------------------------
class ModuleBRouter: AnotherProtocol {
weak var delegate: SomeProtocol?
static func createModule(vCA: ViewControllerA) -> ViewControllerB? {
self.delegate = vCA }
func backToPreviousVC() {
..........
self.delegate?.testFunc(someData:value)
}}
Hi venu, actually while running app, it's get crashed by giving error message of invalid baseurl
I am able to run same sample its working. Send me the details/screenshot of your error on email.
Please share the source code for this lecture
Replied over email.
Arvind Sir ko jaante ho aap?
Yes, He was my first Teacher in this professional journey.
Venu sir, can you please share the repo link of this sample project?
Email me at: venugopaltewari@gmail.com
Subject: VGT | Viper
I will send you the zip.
@@VenuGopalTewari Thanks
Sent on your email.
@@VenuGopalTewari Got it. Thanks again. :)
Sharing information is not easy and not possible by everyone , Please Add the complete diagram of VIPER in your tutorial that is globally recognised , Because some people watching your videos to learn something new enhance their knowledge even taking reference of multiple tutorials , But some people in india follow such video when they have to take some interviews to get pre-prepared Questions & Answers Even they themselves don’t have actual idea of that topics.
Shiayat Khanam, I would love to know what exactly you found missing in the diagram ?
Please share code
where is a git link ?
Email me at venugopaltewari@gmail.com
Subject: VGT | Viper
best explanation please share the code as well using git ink
Thanks pooja,
Email me at venugopaltewari@gmail.com
Subject: VGT | Viper
I will send you the required.
Thanks for the explainatory video. Please share the code. I have sent a mail on your id.
Sent you the reply Akansha!
Thank you.
I have a doubt regarding the protocol file, as you have added all the protocols in the same file aren’t you breaking the single responsibility principle?
?
@@akanksha2143 Hi Akansha, Those protocols have a common responsibility "Movie List" so as long as your implementation is smaller & simple you can keep them in single file but yes for bigger projects you should definitly do finer separation on the basis on atomic responsibilities and each in separate file.
Can you send me this code sample! I have sent you email..!
Replied to your email Mohammad !