Using domain exceptions in your app is an important step if you want to create abstractions over different 3rd party networking libraries like Retrofit or gRPC. Handling and mapping of these exceptions can quickly become a boilerplate that you and your colleagues have to think about and sooner or later you will probably forget to do it somewhere in your code. I want to explore how this task can be done automatically in a generic and clean way when using the Retrofit library. (more…)
Error handling is hard and every developer I know doesn’t like to do it. It’s almost always the last thing to be done in a new project. You have to handle different kinds of errors – from no network connectivity, to servers being down, to user-made validation errors (either local or server-side) all of which lead to a cumbersome correcting process for all parts of the app. I would like to show you our approach to this. (more…)
Some time ago I decided to try Kotlin in production and a few weeks ago I started developing an application that is the one, the one with Kotlin under the hood. When I discovered Anko library I was amazed by its simplicity and advantages over standard xml approach.
Programming for Android may be tricky due to several reasons. One of them is the poor separation of concerns. If some experienced developer is used to coding the “clean” way and now moves to Android, he may be quite confused by the relative mess of the native components inside. Often the Activities, Adapters or Fragments have to mix application logic, data access and presentation within because Android’s architecture doesn’t offer any effective mechanisms to separate them. The result is a loosely coupled, arduously extendable application which is vulnerable to errors, hard to test as well as maintain. Fortunately, Android’s development doesn’t stand still and more new patterns and interpretations of the old ones are appearing to make a developer’s life easier. We’re going to talk about one of them, the MVP pattern.