<?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 Tania Goswami on Medium]]></title>
        <description><![CDATA[Stories by Tania Goswami on Medium]]></description>
        <link>https://medium.com/@taniagoswami?source=rss-63ed7dc6f698------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*QCQsA3Bg9i6GZrDbB5NZNA.jpeg</url>
            <title>Stories by Tania Goswami on Medium</title>
            <link>https://medium.com/@taniagoswami?source=rss-63ed7dc6f698------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:51:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@taniagoswami/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[Our First Android App!]]></title>
            <link>https://medium.com/compass-true-north/our-first-android-app-a4edfbcf1bcb?source=rss-63ed7dc6f698------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4edfbcf1bcb</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Tania Goswami]]></dc:creator>
            <pubDate>Wed, 29 May 2019 15:27:03 GMT</pubDate>
            <atom:updated>2019-05-29T15:27:03.085Z</atom:updated>
            <content:encoded><![CDATA[<p>In February of this year, Compass launched its first Android app! The <a href="https://play.google.com/store/apps/details?id=com.compass.compass&amp;hl=en_US">Compass Android app</a> allows consumers to search for listings, save those searches or listings, and communicate with their agents when buying or renting property.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzmf6XSF2JfSyxej7_sH7w.png" /></figure><h3>How did we build it?</h3><p>Since we already had an <a href="https://itunes.apple.com/us/app/compass-real-estate-homes/id692766504?mt=8">iOS app</a>, we wanted to leverage our existing code and architecture. This would ensure that our mobile developers could move between the codebases as needed. This minimizes the cost of context switching between platforms and makes it easier for new developers to get up to speed with both codebases.</p><p>We also made sure to use a standard tech stack for our development. We used Android Studio for our IDE and Gradle for our builds. Our code is hosted on GitHub and our CI is powered by Bitrise.</p><h3>Language</h3><p>We built our Android app in <a href="https://kotlinlang.org/">Kotlin</a> because it’s a concise alternative to Java and has full interoperability with it. Soon after we started exploring it, Google declared that Kotlin would have first class support on Android, which validated our choice. It also makes coding <a href="https://kotlinlang.org/docs/reference/basic-syntax.html#defining-functions">fun</a>. Another big benefit of Kotlin is that it looks very similar to Swift, making it easy for our developers to compare logic between codebases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sgMGOROiSpF-k4MkmniHFQ.png" /><figcaption>Swift vs Kotlin</figcaption></figure><h3>Architecture</h3><p>We built both our iOS and Android apps with <a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel">MVVM architecture</a>. This way, the model and view model layers are effectively the same in both platforms. Only the view layer needs to be different. We tried to make the codebases as similar as possible, right down to the folder structure and filenames.</p><p>We also use reactive programming to manage updates to our UI from user input or API calls. We built and open-sourced a lightweight reactive programming library called <a href="https://github.com/UrbanCompass/Snail">Snail</a> for iOS and <a href="https://github.com/UrbanCompass/Snail-Kotlin">Snail-Kotlin</a> for Android. Check out our previous blog post for a detailed explanation of the observables pattern in these libraries: <a href="https://medium.com/compass-true-north/snail-a-lightweight-observables-framework-7451b136de59">https://medium.com/compass-true-north/snail-a-lightweight-observables-framework-7451b136de59</a>.</p><h3>Model Generation</h3><p>Our products are currently on three different platforms: Web, iOS, and Android. To ensure model parity across platforms, our models are defined once in <a href="https://thrift.apache.org/">Thrift</a> files on our backend. We then use a code generator for each language to generate the models for each platform. Our Swift generator creates models for our iOS app and our Kotlin generator creates them for our Android app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*okgP6D3XUz_u_-3imiDPTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1Jca-E85fRMmqbKNCe9kw.png" /><figcaption>Thrift definition on far left; Swift model in the middle; Kotlin model on right</figcaption></figure><h3>Views</h3><p>We built our views a little differently than most Android apps. We use a library called <a href="https://github.com/Kotlin/anko">Anko</a> which allows us to build views in code rather than XML. There are a couple of big benefits to this:</p><ol><li>Our view code has to compile. This prevents runtime exceptions that happen when inflating malformed XML layouts.</li><li>View reusability is a lot easier. We can create an <a href="https://github.com/Kotlin/anko/wiki/Anko-Layouts#ankocomponent">AnkoComponent</a> to represent a view and then reuse that component anywhere in the app with no code duplication. While this reuse is also possible in XML, it is more difficult and error prone.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*NFJ_gPTKK9dsRiwgsyQHPQ.png" /><figcaption>Example of an AnkoComponent representing a small TextView that will be repeated in several places in the UI</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6_jl-rWaFMkZpjJcnHYog.png" /><figcaption>The AnkoComponent LastUpdatedTextView is converted here to a View on line 12 and used within another View on line 24</figcaption></figure><h3>Next Steps</h3><p>We have a lot of changes and improvements coming to our Android app. We will soon be releasing updates to both our iOS and Android apps that will allow users to search for listings without being logged in. We also hope to add features for our real estate agents to our Android app.</p><p>Finally, we’re looking into using <a href="https://flutter.dev/">Flutter</a>, a new cross-platform framework from Google, to rebuild both our iOS and Android apps in. If any of this sounds interesting to you, take a look at our <a href="https://grnh.se/9e17b6061">open positions</a>. We’re growing a lot and hiring a ton and we’d love to have you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*F69uXXPeRRICGeGgRumayg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4edfbcf1bcb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/compass-true-north/our-first-android-app-a4edfbcf1bcb">Our First Android App!</a> was originally published in <a href="https://medium.com/compass-true-north">Compass True North</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>