Mobile

Mobile

Techniques

Insight: CoreLocation provides services that determine a device’s geographic location, altitude, and orientation, or its position relative to a nearby iBeacon device. The framework gathers data using all available components on the device, including the Wi-Fi, GPS, Bluetooth, magnetometer, barometer, and cellular hardware.
 

Insight: Apple’s XCode development environment lets you create and run unit tests for iOS apps, utilizing their XCTest framework. It is often used together with Kiwi, an Objective-C unit testing framework, which aims to improve the readability of tests and make test running and error reporting more seamless. Some highlighted projects are Espanyol, Inshelf & Ayoba.
 
Related Post: iOS snapshot testing

Insight: We opted for an architecture called Pure Model-View-Presenter (which we also usually label as controllerless architecture) that allows us to completely uncouple the view of the model layer. This is possible thanks to the presenter, whose sole function is to connect a single view with a single application service (also called interactor, or use case); so that, to build a screen, we can use N presenters, one for each pair of view-services. We used this architecture for Bwom.
 

Insight: Rx-Swift is a reactive programming library. It makes it easy to develop dynamic applications that respond to changes in data and respond to user events. Also, it solves the issues related to asynchronous development.
 

Insight: Today all apps are connected at some point with servers to show data. This is why it is very important to have a well defined (and simple) client implementation to avoid problems in this very important layer of the application. In Apiumhub we simplify the Data layer with MoyaRx and Codable. Some projects that used this are Espanyol, Inshelf, Ayoba & b4work.
 

Insight: MVP is (and has been for a while) an industry standard for Android Applications development. It’s a pattern that provides a valid guidance about how you should split the view (and the logic related to it) on different layers inside your application. Using it makes it easier to test and reuse much of the code you write, as most of the work on a mobile application is done on the view side.
 

Insight: In Apiumhub we focus on publishing multi-module Android libraries, especially on how to set Gradle up so we can publish our own modules in a comfortable way, without the need to duplicate the publication’s logic.
 

Insight: It is important, when it comes to valuation, to be very clear about the objectives and problems that need to be resolved with a transition to microservices, for example, fast builds at component level, manageability of projects, very clear and rigid boundaries, deployment independence and quality of service, possibility of polyglot programming/persistence.

Insight: Building mobile app with JavaScript is fast and responsive.Also, it creates interactive and dynamic UI/UX.
 

Insight: TDD enables teams to spot issues early in development, which reduces the number of bugs in your application and saves you time and headaches later. Also, increased test coverage is one of TDD’s key benefits as well as clean codebase with readable, non-redundant code.
 

Insight: The lenses provide an elegant way to update immutable states of an object. A lens, as the name suggests, allows us to zoom in a particular part of the structure of an object to obtain, modify or enter a new value.
 

Insight: Combine has three main attributes: generic, type safe, composition first. It has been built by Apple’s engineers with a 100% focus on performance.
 

Insight: The MVP pattern was invented in the 90s as a common C++ initiative from Apple, IBM, and HP as an alternative to the MVC pattern. It is an acronym for Model, View, Presenter, which are the vital components of this pattern. There are different implementations of this pattern and some important variances like Supervising Controller or Passive View. One of the benefits of doing MVP is to be able to test the biggest part of the UI logic without testing the UIViewController itself.
 
Related Post: MVP pattern in iOS

Insight: It gives us a way to test view-related code and it can be used to visualize view states without jumping through hoops in the simulator or real devices. Another advantage is that snapshot tests are fast.
 
Related Post: iOS snapshot testing

Insight: The adapter pattern is used to transform one interface into another that our system will use instead.
 

Insight: The biggest disadvantage of the classic MVP is the increase of the difficulty to test a presenter as it grows; that is why we decided to evolve it until we can decouple it from services. For this we created a class “Binder”, which is a subclass of the presenter that allows us to link service events with a response in the view, and thus avoid having dependencies with the services in the presenter, so that to test it we do not have to mock the same ones.

Insight: The fundamental basis of Fastlane is that it allows us to create a kind of ‘scripts’ that are called ‘Lanes’ where a series of preprogrammed ‘commands’ called ‘Actions‘ are executed. There are a series of actions by default in the tool that allow us to manage different aspects of the life cycle of mobile applications.
 

Insight: This technique is based on testing our production environment causing intentional failures in it, so we can know how our system reacts to these failures in a controlled environment. For example, disconnecting one of the microservices of our system, knocking down a database, or simulating a fall in the network.
 
Related Post: Chaos engineering

Insight: SwiftUI helps you build great-looking apps across all Apple platforms with the power of Swift — and surprisingly little code. It leverages programmatic control over your app’s navigation behavior to set its launch state, manages transitions between size classes, responds to deep links, and more. SwiftUI is designed to work alongside other interface frameworks. Now you can easily write custom UICollectionView cells using the declarative syntax of SwiftUI. These custom cells fully integrate with UIKit, providing all the expected functionality, such as swipe actions and cell backgrounds. Build advanced, reusable layouts to power the design of your app. In addition to VStack and HStack, SwiftUI now offers a new Grid API to simultaneously align views both horizontally and vertically. There’s also a new low-level custom Layout API, giving you full control to build exactly the layout your app needs. And SwiftUI now includes ViewThatFits, which lets you specify multiple variations of a given view and lets SwiftUI automatically choose the one that best fits in the available space. SwiftUI was used for Bitpanda.
 

Insight: Dependency Injection (DI) is a design pattern and a fundamental concept in software development that helps manage dependencies between different components of an application. It is used to achieve loose coupling between classes and improve maintainability, testability, and flexibility.
 

Languages & Frameworks

Insight: Swift is a powerful and intuitive programming language for macOS, iOS, watchOS, tvOS. Is built using a modern approach to safety, performance, and software design patterns and replaced the Objetive-C used from the beginning of the iOS apps. Also is easier to read and write. It is very concise, which means less code is required to perform the same task, as compared to Objective-C. AtApiumhub we used Swift for projects like Espanyol, Inshelf, Ayoba, BwomAdidas & Cornerjob.
 
Insight: Use Espresso to write concise, beautiful, and reliable Android UI tests.
 
Related Post: Espresso Testing
Insight: Java has been the main language for developing Android applications since the platform was created. This led to some issues between Google and Oracle, which made Android being stuck on Java 7 for ages (with some features from Java 8, but definitely not all of them); this made Android applications development hard due to the lack of compatibility with those new features and many of the libraries that were developed for new versions of Java.
 
Related Post: Java vs Kotlin

Insight: Key benefits of room in Android: the intensive use of annotations, which means that we do not have to write any code to interact with the database. And room in Android provides integration with LiveData and RxJava out of the box, which makes it much easier to create reactive applications without having to deal with the creation of the Observables, which allows us to observe changes in the database to react immediately.
 

Insight: Kotlin is a JVM-based language that came to the rescue after years of struggling with Java 7. It provides all of the functionality that we couldn’t use from newer versions of Java, plus many Kotlin specific features, such as coroutines. By using Kotlin on our projects, we noticed a boost on both productivity and stability of our applications.
 
Related Post: Java vs Kotlin

Insight: Redux offers a lot of benefits in developing android applications, but it also comes with it’s own set of drawbacks. We found out that it helps to encapsulate the domain logic in pure funtions and decouple it from presentation logic. But in big Android apps the proliferation of actions and the need for side effects in things like network calls, prevents us to take full advantatge of it. We also encountered a steeper learning curve than with other patterns, making it harder for new team members that don’t know Redux. They tend to take more time and make more mistakes compared with MVP or MVVM. Another of the main benefits is that the code easilly testable and is a good pattern to implement using TDD without any trouble.
 
Related Post: Demystifying Redux

Insight: Motion Layout is an evolution of an already very good foundation ConstraintLayout. It uses all the power of a constraint based layout and applies the concept of “in-between animation” with the possibility to use keyframes. Bundled with it comes an easy way to trigger this animation on a variety of situations: swipes, clicks.. all can be done declaratively through XML. On top of that Android Studio offers a useful UI editor, defining initial and final state everything is automated. A good example of using MotionLayout is Espanyol project.
 
Related Post: Motion Layout

Insight: Moya has a reactive extension called MoyaRx that allows encapsulating the response of a request in an Observable of Rx. You can simplify the Data Layer with Moyarx and Codable.
 

Insight: One of the novelties of Swift 4 was the introduction of Codable. The Codable protocol is a typealias of the combination of the existing Encodable and Decodable protocols. You can simplify the Data Layer with Moyarx and Codable.
 

Insight: Koin is a smart Kotlin dependency injection library to keep you focused on your app, not on your tools. Koin gives you simple tools and API to let you build, assemble Kotlin related technologies into your application and let you scale your business with easyness.
 

Tools

Insight: One of the basic pillars of Apiumhub is our premise to the clients to always deliver working software with the highest possible quality levels. In order to do it, we work with Continuous Integration that allows us to have versions of their applications available for them, tested, used and that can be passed to production as quickly as possible. To carry out this task, we developed through a series of Jenkins plugins a DSL that allows us to have the latest software versions after having passed the integration tests, functional tests and QA tests and that are ready and validated to distribute them when the client requires it. This allows us to have short development cycles with significant value delivery and very fast feedback from end users on any of the new features added to a client application.
 

Insight: Currently, security is one of the hottest topics.Users, companies, and legislators are taking the subject of data security and privacy more and more seriously. This trend also applies to mobile applications due to their proximity to the user. Frequency of use and convenience mean that mobile apps often store important private data. iOS, due to its closed system and restrictions imposed by Apple, is considered one of the most secure mobile operating systems. This does not mean, however, that you can neglect security when developing an iOS application. Look at: The target, Static Analysis and Dynamic Analysis.

Insight: Continuous integration is a software development strategy to help teams consistently integrate new code often (at least daily, or even several times a day), and test that code before merging the code with master. The fundamental benefit of continuous integration is that it helps you get your software product to the end user faster. This allows the end user to get the benefits of your product faster, and you get a return on investment faster. In addition, you get faster feedback on your product, allowing you to iterate and improve your products, getting you to market fit ahead of your competitors.
 

Insight: Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java, C/C++, and JavaScript. Go monorepo or multi-repo. And rely on Gradle’s unparalleled versatility to build it all. Gradle offers rich API and mature ecosystem of plugins and integrations to get ambitious about automation. Model, integrate and systematize the delivery of your software from end to end. It allows to scale out development with elegant, blazing-fast builds. From compile avoidance to advanced caching and beyond, Gradle pursues performance relentlessly so your team can deliver continuously.
 

Insight: Jetpack Compose is Android’s recommended modern toolkit for building native UI. It simplifies and accelerates UI development on Android. It quickly brings your app to life with less code, powerful tools, and intuitive Kotlin APIs.
 

Secured By miniOrange