Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

This Week in Mobile: Avoiding Kotlin Pitfalls and Singletons in Swift

DZone's Guide to

This Week in Mobile: Avoiding Kotlin Pitfalls and Singletons in Swift

This week's news, tips and tricks are all about getting around problems, like the pitfalls for new Kotlin developers, or Singletons in Swift.

· Mobile Zone ·
Free Resource

Android 

It’s good to see a measured explanation from a Java developer about their initial resistance to Kotlin, and how they made the move, in Why and How I Switched to Kotlin

What are Coroutines in Kotlin takes the mystery out of the latest big reason to move to Kotlin. To be fair, it’s a very convincing reason, and a great approach to concurrent programming. 

This is a goldmine of an article for people who are new to Kotlin, with a list of Pitfalls and How to Avoid Them

Did you know that Firebase has two database solutions? Here’s how to choose between the two, Cloud Firestore and Realtime Database.

Here’s A Performance Comparison Between TreeMap and PriorityQueue so you can finally make a decision of which is faster. For fun, pick one before you read the article and see if you’re right!

Some projects to check out: 

  • android-job: Android library to handle jobs in the background.
  • JFoenix: JavaFX Material Design library.
  • AndroidUtilCode: Android developers should collect the following utils.
  • chips-input-layout: Highly customisable Android ViewGroup for displaying Chips.

iOS 

To be honest, I didn’t know this was a thing but here’s Why Many Developers Still Prefer Objective-C to Swift, with comments from some leading iOS developers. 

Here’s A Simple Approach to Thread-Safe Network in iOS Apps by extending URLSession.

Read more about how Xcode 9.1 Improves Display of Fatal Errors

I had completely missed this during all the WWDC hype, so make sure to read up on iOS 11: The Device Check API, especially if you are providing an app that relies on a subscription model. 

John Sundell’s posts are a highlight of the week at this stage. His latest on Avoiding Singletons in Swift gives some excellent reasoning behind why singletons might be bad, and how to refactor them out of your current code base in a manageable way. 

Some projects to check out: 

  • Closures: Swifty closures for UIKit and Foundation. 
  • http: Repository for development of cross-platform HTTP APIs. 
  • SwiftInstagram: A Swift client for the Instagram API.
  • SwifterSwift: A handy collection of more than 500 native Swift extensions to boost your productivity.
  • watch.user: Face tracking on iOS without the user knowing.
  • mapbox-navigation-ios: Turn-by-turn navigation logic and UI.

General 

An interesting article on how apps see everything - Tracking Friends and Strangers Using WhatsApp

Moving on to a leadership role? Check out Julie Zhou’s take on Managing More Experienced People.

Topics:
android ,ios ,swift ,kotlin ,java ,mobile ,mobile app development

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}