There's no place like the main thread

In my experience as iOS developer, I've seen some inclination to do lots of things in separate threads just for the sake of performance and to avoid blocking the UI thread.

Stuff like blocks, GCD and NSOperations seem really neat for this kind of tasks and they're super easy to use, but with great power comes great responsibility.

Read more…

Bye bye, Fever! Hello Plex!

It's been two months already since I left my position as iOS Lead Engineer at Fever and started working at Plex developing the iOS app.

I've learned lots of things developing the whole Fever app: both from the experience itself and from my colleagues' knowledge (thank you David, Saúl, Jorge, Viti, Eddie, Adri, Danny, Josu…).

This new phase at Plex will be very different: a completely American company building a product with all their employees working remotely, developing an app about audio/video streaming with lots of active users already loving the app, and a lots of new projects and ideas to implement with focus on quality.

Fortunately, I get to work with awesome people including some former co-workers at Tuenti like Luis Recuenco and Manuel Peinado, so I've already learned a lot of stuff by just working here.

I'll try to share the new knowledge I get in this blog :)

Dependency Injection: Providers

In the last post I introduced Dependency Injection as a way to decouple a class from the specific implementation of its dependencies. This way, we could replace those dependencies with mocks in a unit test.

But there is a special kind of dependency: sometimes a class A needs to create an arbitrary number of instances of class B and then uses them. It is clear that A depends on B but… how can we decouple it so that A can be tested without using the actual instances of B?

Read more…

Dependency Injection

Dependency Injection is not a complex concept.

When you use DI, your business logic classes don't instantiate the objects they need, and they don't access to singleton instances either. They ask in their constructors (preferably) for the objects they need.

Read more…

Welcome!

My name is Sergio Padrino and I'm an iOS Engineer at Plex, former iOS Lead Engineer at Fever and iOS Software Engineer at Tuenti, the Spanish social network and MVNO.

During this series of blog posts I'll be writing about my work and thoughts as iOS developer, specially based on my experiences working at Plex, Fever and Tuenti. Here you will read some posts about our workflow, the app architecture, problems we found (and how we solved them), etc.

Have questions or suggestions? Feel free to open an issue on GitHub or ask me on Twitter.

Thanks for reading!