Skip Navigation
Trulia Logo

Trulia Blog

A Web Developer Learns Swift

A Trulian Shares His Journey from JavaScript to Swift

By trade, I’m a Web developer. I’ve worked with JavaScript for the past five years and know it like the back of my hand. A few months ago, my manager approached me with an interesting opportunity – build a new Trulia Mortgage app for iOS, using Swift.

While an exciting opportunity to grow and learn, I have to say I was at first a little hesitant to jump in. JavaScript has always been my preferred programming language. I enjoy working with libraries like React, Angular, Backbone, Node, and MongoDB, and I love that with JavaScript you have both the simplicity to build something quickly and the flexibility to create something complex. I also love that there’s always something new to learn: JavaScript is the language of the Web; it has the largest community in the world, and almost everyone collaborates on an even level with it.

I’ve built mobile apps before using web-based technologies like Apache Cordova and React Native, but learning Swift, a native iOS language, was asking me to go a bit out of my comfort zone. However, knowing this was an excellent growth opportunity, I couldn’t pass it up. I thought back to my early days of learning JavaScript and remembered a quote from Jack Dorsey back in YC Startup School 2014, “he can work in any medium,” which he read in a book called The Art Spirit, by Robert Henri. I kept this quote in mind and dove in.

“He [an artist] can work in any medium.”

To get started, I downloaded the free version of the Swift Programming book, and started reading the basic concepts. Trulia also sent me to “iOS Bootcamp – Fast Track with Swift” by Big Nerd Ranch. It was a four-and-a-half-day crash course on Swift iOS development, and it was awesome. I learned in-depth about iOS development, and was able to build simple apps by the end of the course.

I was surprised that learning Swift came to me very quickly. It combines some of the best programming paradigms, and has taken a modern approach to software engineering. It was very flexible to work with, and it was actually fun to learn.

The hardest part of learning Swift for me was trying to understand iOS development in general. Native app development is a different landscape than Web development; a lot of the design patterns were built on Objective-C, an older language developed in the 1980s. But, all told, Swift made app development simpler. For example:

  1. Swift’s simplified syntax is much more concise and easier to read than Objective-C, which means you can write less code but achieve more.
  2. Swift is also very safe. Coming from a Web development perspective, this may not be a big deal, but when we’re dealing with critical memory leaks (can drain battery life, crash the app, etc.), memory management is a big deal. Swift makes programming safe by abstracting away memory management, so you can focus on building great software.
  3. Open source! With Swift being open source, there are a lot of cool things going on in the community. You can now write Web applications using Swift, and I’m excited for the future.

Leveraging Swift – among other things like reusable microservices – our small team of four was able to ship a brand new app in less than four months. The new Trulia Mortgage App for iOS launched last month as a simple-to-use tool that educates consumers on how much they can afford and what makes up a mortgage. It’s been so well received, that Apple even featured it as a Best New App of the Week when it launched. Go download it today!


The New Trulia Mortgage App for iOS