<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anubhav Malik on Medium]]></title>
        <description><![CDATA[Stories by Anubhav Malik on Medium]]></description>
        <link>https://medium.com/@anubhavmalik97?source=rss-291b66fa4bd2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*W6kD7VZxitomok0me7hRpA.jpeg</url>
            <title>Stories by Anubhav Malik on Medium</title>
            <link>https://medium.com/@anubhavmalik97?source=rss-291b66fa4bd2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:06:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anubhavmalik97/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Lets MVP]]></title>
            <link>https://medium.com/@anubhavmalik97/lets-mvp-a10b9b547363?source=rss-291b66fa4bd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10b9b547363</guid>
            <category><![CDATA[model-view-presenter]]></category>
            <category><![CDATA[mvp]]></category>
            <category><![CDATA[android-mvp]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-architecture]]></category>
            <dc:creator><![CDATA[Anubhav Malik]]></dc:creator>
            <pubDate>Wed, 19 Dec 2018 09:27:15 GMT</pubDate>
            <atom:updated>2018-12-19T09:32:08.517Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Let’s get started</strong></h3><p>The MVP implementation or as we may call it “THE MODEL-VIEW-PRESENTER”. First things first, it derived from MVC.</p><h3>Theoretically Speaking</h3><h4>The Model</h4><p>Just as the name suggests it holds the data for a model class, a POJO and the presenter updates and gets data from the model.</p><h4>The View</h4><p>Remember activities and fragments? Yup. That’s the view part and it’s not meant to contain any business logic just like I said in the <a href="https://medium.com/@anubhavmalik97/architecture-in-android-6f1f70244e0c">previous post</a>. The view will only be concerned with getting its components updated. Eg. Start/Stop the progress bar or trigger animations.</p><h4>The Presenter</h4><p>The presenter is responsible for executing the business logic and not only that but also updating the data in the model and then getting that data whenever necessary. Not only that, but also it tells the view to get updated and provides the data to be presented.</p><p>Let’s try to connect this with the analogy we used in the original post of Lets Architecture (<a href="https://medium.com/@anubhavmalik97/architecture-in-android-6f1f70244e0c">click here to read</a>).</p><p>And here’s a diagram you’d like :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*eh3XE32ZjFvmLCUJV9Fobw.png" /><figcaption>Presenter is on top of everything (PUN NOT INTENDED, stop it you troll)</figcaption></figure><h3>The Analogy</h3><p>I’m gonna be using some Two &amp; a Half men reference because, that’s what I’ve been watching nowadays.</p><p>You are the presenter, Charlie.</p><p>View is the cook, let’s say Alan is going to cook. You’re letting him stay at your home he may very well prepare some food.</p><p>Model is your help, Berta.</p><p>According to MVP pattern, you (presenter) have to tell Berta what to get from the market so you could give Alan the ingredients so that he can cook what you want him to.</p><p>Get it Mr. Presenter? You’re the one controlling everything here.</p><h3>Enough words, where’s the code? (GITHUB LINK HERE)</h3><p>We’ll build a simple application with just a login screen.</p><h4>Model is gonna be the good old POJO</h4><p>Assume the model is of a user who’s gonna log in.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fca72227474393c2ace655c740d6cdd/href">https://medium.com/media/2fca72227474393c2ace655c740d6cdd/href</a></iframe><h4>Contracts</h4><p>Refer to them as guidelines if you will, which have certain number of methods and need to be implemented accordingly. We’ll have a General View Contract for View part (for handling the toggling of progress bar and other generic stuff) which we most probably need in every Activity and Fragment and similarly a General Contract which contains the methods which we most probably need in every presenter (switching activity/fragments).</p><p>GeneralContract.java</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ca99f8e4b03fb8b79642598d1d7f4b6/href">https://medium.com/media/8ca99f8e4b03fb8b79642598d1d7f4b6/href</a></iframe><p>GeneralViewContract.java</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71745ad1e3263bce4928692d8ddeab01/href">https://medium.com/media/71745ad1e3263bce4928692d8ddeab01/href</a></iframe><p>Now, comes the LoginContract which is specific to my LoginActivity and is going to have two interfaces one contains methods to execute activity specific business logic and other one to execute activity specific UI code.</p><p>Remember, this is where my GeneralContract and GeneralViewContract come in handy. I can extend them and create new interfaces which would contain my LoginActivity specific code.</p><p>LoginContract.java</p><p>I just needed an additional method to verify my user’s credentials.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e53edf2f5503f9a5b8a112c772e7c5bc/href">https://medium.com/media/e53edf2f5503f9a5b8a112c772e7c5bc/href</a></iframe><p>Now that the contracts are made and guidelines have been laid. Lets see how the presenter is going to handle the interaction made with the UI.</p><p>LoginPresenter.java</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7eda2ecd547a9035856453babec13b80/href">https://medium.com/media/7eda2ecd547a9035856453babec13b80/href</a></iframe><p>You can see here, that my presenter has a constructor in which I am getting a reference to the context of the parent view and a reference to the implemented methods of the view (showToast() etc etc).</p><p>Lets have a look at the Activity (View part).</p><p>Our activity is going to follow the View contract and implement just the view specific methods.</p><p>LoginActivity.java</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c32d7011b589f1702d51e425b6b6a27d/href">https://medium.com/media/c32d7011b589f1702d51e425b6b6a27d/href</a></iframe><p>Phew, with that out of the way. You can access the full project <a href="https://github.com/anubhavmalik/LetsMVP">here</a>.</p><p>Remember, this is aimed at facilitating newbie developers to get started with MVP but anyone trying to get a clearer understanding can too have a look.</p><p>Let’s connect on Linkedin (<a href="https://www.linkedin.com/in/anubhav-malik-developer/">Linkedin Profile</a>).</p><h3>The Problem with MVP.</h3><p>Yeah, it’s not perfect. Very mature but not perfect. Remember, what was the purpose of having a good architecture? To make the business logic separated from the UI part and ultimately make the application more testable.</p><p>Writing tests still is not so efficient in MVP pattern because of the involvement of context in presenter. You still have to use the context while making changes to the view, and you cannot rely on it when writing tests. However, the business logic is successfully separated from the UI part.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10b9b547363" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architecture in Android]]></title>
            <link>https://medium.com/@anubhavmalik97/architecture-in-android-6f1f70244e0c?source=rss-291b66fa4bd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f1f70244e0c</guid>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mvvm]]></category>
            <category><![CDATA[android-architecture]]></category>
            <category><![CDATA[mvp]]></category>
            <dc:creator><![CDATA[Anubhav Malik]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 19:14:04 GMT</pubDate>
            <atom:updated>2018-12-14T19:14:04.969Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Now, what is architecture… exactly?</strong></h3><p>Not a framework, not a library, it’s a pattern of implementation that you use in your code to make it more clean, structured and testable. Yes, just this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*BZ8HZzjq3XxMl7SPmQronA.jpeg" /></figure><h3><strong>What is wrong if I don’t use one?</strong></h3><p>Well, remember when you created your first Android app. Adding everything in your activity. The business logic, the code for manipulating the view, network calls. Actually that doesn’t belong here.</p><p>Imagine, you have a chef at your home. His duty is to cook food. You have a domestic help who picks your grocery, and you are paying both of them.</p><p>Now, you tell the help what to pick up from the grocery store, he gets it from the store and the chef cooks it. This is exactly how this is expected to work, right?</p><p>What if, the chef decides what will be cooked and goes to the grocery store to pickup stuff, the help cooks it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*x8zL6J5yvb_hT3x751iJAA.jpeg" /></figure><p>I know right!</p><p>That’s exactly what you’ve been doing with the activities and fragments. Putting network calls and database queries in the activity or your fragment. See, it doesn’t belong there. Activity or a fragment contains all your views they shouldn’t be concerned about what data you’re getting and from where you’re getting it.</p><h3><strong>So, how does having an architecture help that?</strong></h3><p>Well, for starters. Your chef’s just gonna cook the food and your help’s gonna just pickup your grocery (and other things you expect from him).</p><p>Think of your activity or fragment as your cook, and let’s say the domestic help here is an actual helper (presenter or controller) that you’ll make.</p><p>Of course, they need to have some contracts right? Which mentions what all things they’re supposed to do. We can do that using interfaces.</p><p>Just realised importance of interfaces apart from handling clicks in recycler view, huh?</p><p>Your view is going to have some sort of contract and be bound by it, depending on the implementation and design pattern, you could divide the responsibilities of handling both of them via a Controller ( in MVC), a Presenter (in MVP) or via the view model in MVVM implementation.</p><p>We’ll be taking a good look over that soon. I’ll add a demo of all three types we broadly use in Android and share code on Github too.</p><p>Till then, Sayonara.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f1f70244e0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Walkthrough of / My experience with Associate Android Developer Certification.]]></title>
            <link>https://medium.com/@anubhavmalik97/walkthrough-of-my-experience-with-associate-android-developer-certification-e736573305ae?source=rss-291b66fa4bd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e736573305ae</guid>
            <category><![CDATA[google-aad]]></category>
            <category><![CDATA[google-certified]]></category>
            <category><![CDATA[associate-android]]></category>
            <category><![CDATA[aad]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Anubhav Malik]]></dc:creator>
            <pubDate>Sun, 03 Jun 2018 08:56:26 GMT</pubDate>
            <atom:updated>2018-07-30T05:54:27.904Z</atom:updated>
            <content:encoded><![CDATA[<h3>UPDATE : The exam is back now. You can take it <a href="https://app.trueability.com/google-certifications/associate-android-developer">here</a>. However, there are a few changes in the examination pattern. The code submission time has been reduced to <strong>8 hours</strong>. You will have to install a custom plug-in for your Android Studio (This will probably also log stats during your exam, so that you don’t cheat during the exam). Also, make sure you are logged into your Android Studio from the same account from which you have paid for the exam. The exit interview will be recorded after you have submitted your exam. Submit your exam, take a break and then record your exit interview.</h3><p><strong><em>I am also adding screenshots of some important things you should take care of while giving the exam.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*8XNi3AZklSZDSW2ppyfgmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*_480ZohPGkrbefWD4dbMvg.png" /></figure><p>I learnt about this certification last year in 2017 when I was learning Android Development. It was a random session of browsing Youtube and watching the Keynotes when I came across an Associate Android Developer success story.</p><p>That’s when I realised Google provides certification too! And I fell in love with the idea of having my name on a certificate. However, I had just started learning Android Development back then so I wanted to make sure I had enough experience and skills before I took the exam. Since I was a novice I first focused on developing my skills.</p><p>So after my course had completed I worked on some projects which helped me develop essential skills and I gained enough confidence to call myself a ‘Good Android Developer’.</p><p>Before I start sharing my experience with the Exam. I highly recommend you read these two articles by Mr. Rohan Taneja.</p><ul><li><a href="https://medium.freecodecamp.org/google-certified-associate-android-developer-my-journey-381a8e514f3a">Google Certified Associate Android Developer: Tips, FAQs &amp; my journey</a></li><li><a href="https://medium.freecodecamp.org/google-certified-associate-android-developer-exam-walkthrough-ce09a039b29a">Google Certified Associate Android Developer: Exam Walkthrough</a></li></ul><p>You can find how the exam interface looks and feels by going through his “Exam Walkthrough” article. So, I won’t be adding images of the interface. You can find the exam <a href="https://developers.google.com/training/certification/">here</a>.</p><p>The exam starts off with a scenario, which is : A developer had been working on the application I was provided but he had left &amp; now I had to complete the project.</p><p>I was provided a link from where I had to download my exam project and the page itself had a list of features, functional requirements, debugging tasks, testing tasks and UI requirements that had to be taken care of.</p><p>The first thing I did, was to plan the sequence in which I would complete the tasks. My application had 3 screens to be completed and nothing was visible on the Main screen as well. So, my plan was to first get the main screen to show a list and then proceed to the other screens.</p><p>They provide you with all the resources (data, images, icons, sounds .etc). So you won’t have to worry about that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*WGTCNCemUgsBIun05VbpEw.png" /></figure><blockquote>You can pay for the exam and then start anytime. I had paid for the exam on 15/05/2018 and started it the next day on 16/05/2018 at 1:20pm . Once you start you will have to complete the exam in 24 hours.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*MThEqFbGr2G4js3CODpl2Q.png" /></figure><p>If I said I was not at all tensed during the exam I would be lying. But, it wasn’t because I hadn’t prepared or I had doubt about my skills but because this was something I had built up for in my mind for almost 7 months now and this was 10% nervousness and 90% excitement!</p><p>I was able to complete all the requirements other than the testing requirements within 7–8 hours.</p><p>Then came the testing part, which I wasn’t very confident about but I was able to complete it very quickly too (Thanks to Pluralsight!).</p><p>I didn’t have much experience with UI testing beforehand but I studied it on the AAD track course material provided on Pluralsight. You can prepare by studying from course material on Udacity as well. I am just more comfortable with pluralsight, that’s all.</p><p>Since, I had been sitting in my chair for about 8 hours I needed a break. So, I got up, went for a walk for about 30 minutes, had dinner and came back with a fresh mind. Last thing was to just cross-check that I had completed all the requirements and the application was working fine. Being done with that I clicked on the submit button and uploaded my exam.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*Nrwxcu9e0bs1_T5ZisjGaQ.png" /></figure><p>and recieved an email in some time which stated this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vo89pOCyq3gu-VC46B5zKA.png" /><figcaption>Again I’ve hidden some details.</figcaption></figure><p>Now began the most difficult phase of the whole examination process!</p><h3>The waiting period….</h3><p>I submitted the exam around the midnight on 16/05/2018 and got the approval e-mail on 22/05/2018. Thanks to the weekends for adding 2 days in the waiting time!</p><h3>The exit interview!</h3><p>The next part was the exit interview. It was a 10 minute long interview which had 5 questions about my exam and basic Android development. The interview won’t be difficult if you have completed your project by yourself. The interview wasn’t conducted by a person and wasn’t a video call either. It was a video recording. Five questions are displayed on the screen sequentially and you have ten minutes to answer them all. Failure in answering all the questions or an incomplete interview will result in a failed attempt so please make sure to divide your time and answer all the questions carefully.</p><h3>The Email. Right, THE EMAIL !</h3><p>I got my approval email the next day of my taking the interview (This was quick!). Yay! I became a Google Certified Associate Android Developer!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wy7dcSSm1ULlFbPeAf_a3A.png" /></figure><p>The first thing I did was telling my mom &amp; dad about this e-mail and thanked them for always being supportive of me. Then I called my mentor Mr. Rohan Arora who is also the organiser of Google Developers Group, New Delhi &amp; thanked him for his support.</p><p>I would like to thank my family for always being there for me and my friends Rupali &amp; Kushal for getting me on track when I am distracted.</p><p>I received my credentials in sometime after I got this email.</p><p>Here’s the link.</p><p><a href="https://www.credential.net/etqep12b">Google Cloud Certified : Accredible : Certificates, Badges and Blockchain.</a></p><p>Still have some doubts about the process?</p><p>Reach me at : -</p><p>LinkedIn: <a href="https://bit.ly/2HfSlHm">https://bit.ly/2HfSlHm</a></p><h4>More where this came from</h4><p>This story is published in <a href="http://blog.usejournal.com/">Noteworthy</a>, where thousands come every day to learn about the people &amp; ideas shaping the products we love.</p><p>Follow our publication to see more product &amp; design stories featured by the <a href="https://usejournal.com/?utm_source=usejournal.com&amp;utm_medium=blog&amp;utm_campaign=guest_post">Journal</a> team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e736573305ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>