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

This Week in Mobile: Cleaner Swift Code

DZone's Guide to

This Week in Mobile: Cleaner Swift Code

Among the highlights this week is some excellent advice on how to keep your code clean by using Child View Controllers in your app.

· Mobile Zone ·
Free Resource

Thinking of building a new app over the Thanksgiving weekend? Maybe you'll find inspiration in these articles and projects.

iOS 

In Using Child View Controllers as Plugins in Swift, John Sundell takes a neat approach to avoiding subclasses to create pluggable view controllers, so your code is so much cleaner. Make sure to check it out. 

You can’t create a good app without dealing with concurrency, so make it your business to read this Intro to iOS Threading. At the very least, it works as a good refresher to make sure you’ve got a handle on it.

It’s too easy to skip unit tests with the typical excuses. Applying Unit Tests to MVVM with Swift shows how to mock network states and use stubs to test user interaction.

Design patterns are a great way to communicate your application architecture. Learn all about how to apply the Facade Pattern in Swift, hiding complex logic behind a simple facade - essential for API developers. 

Some projects to check out: 

  • Receiver: Swift framework implementing the Observer pattern. 
  • SwiftyMocky: Framework for mock generation. Adds a set of handy methods, simplifying testing. 
  • ARVideoKit: Capture & record ARKit videos, photos, live photos and GIFs.

Android 

Learn about how to de-risk an app update on the Play store in The Art of Staging A Rollout. It’s one of the best practices recommended by the team at Google, so it shouldn’t be ignored. 

Last week, Twitter release Serial, which claims to provide Improved Data Serialization on Android. The performance benchmarks in the blog post are impressive, with a 5X improvement in serialization. If you suspect your app is suffering because of serialization bottlenecks, it’s worth a look.

If you’re like me, you might have missed the MVI pattern. In The Contract of Model-View-Intent Architecture, find out how it can simplify your app development, once you’re comfortable with reactive programming. 

Starting out with a fresh app is great, but once you’ve gained some traction and need to release updates, you need to start worrying about maintaining the user’s data. This topic is covered in Android Architecture Components: Room - Migration. If you’ve started using the architecture components, you’ll need to know this. 

Some projects to check out: 

  • Serial: A light-weight, fast framework for object serialization in Java with Android support.
  • PRDownloader: A file downloader library for Android with pause and resume support. 
  • CacheWebView: Custom Android WebView cache for offline websites. 

General 

With all the best intentions of the agile manifesto, development teams encounter blockers daily. Here are some tips on How to Stop UX Research Being a Blocker.

Sketch files taking over your machine? Follow these Three Quick Tips on How To Reduce Sketch Filesize.

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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}