I guess if you are reading this, you are working with web applications or web services. There are a number of posts on the internet that explain what shouldn’t be in a controller or in a model, but I didn’t find any proper summary of what should be in the MVC. So here is this blog post to collect our concepts.
Logging is essential during development. Therefore, the Android SDK provides the public with a default logger. It is easy to use: we can add tags and also separate logs by different levels.
The SDK’s defult logger is not bad and it’s enough for the basics. But hopefully developers think logging should result in far more than just the basics.
If you have a website on which users can register and login, then you also want to protect your application from attackers. We recommend you to protect your application’s actions not only from attackers, but from users, too. For example, if you want to make a user who can upload Excel files on a specific UI, then that user should neither see other UIs, nor should s/he be allowed to take any other actions.
At Wanari, we usually prefer native Android & iOS development and my colleagues have recently written quite a few articles on these topics. However, as a web developer, cross-platform mobile app development options stand closer to my heart. In this article, I provide an example for creating a custom Cordova plugin. Cordova is a […]
There are many tutorials and articles describing basic module functionality and how you can build it. These articles sometimes leave blanks of the needed information, so this post will do an in-depth tour of the topic applied in the Play framework. What is a module? In Play framework the modules are small functionality packages. These […]
Introduction: What is Reactive Cocoa? What does functional and reactive mean, in terms of programming? Why is it useful, and generally a good practice? Getting started: How do I set up my project to start developing with RAC? Basics: Classes and methods used in RAC. General data flow representation. A small task: A short […]
Introduction to the new Android ConstraintLayout
ConstraintLayout is a new Android layout type presented at the Google IO. It has several new features including a new Layout Editor built in the new Android Studio. (currently on the Canary channel v2.2 Preview 2) The reason for this new layout is to reduce the view hierarchy’s depth and complexity. By using ConstraintLayout, you can optimize and speed up the UI rendering phase of your application. It is compatible with all the currently available Views and ViewGroups and it is part of the Android Support Library. It works down to API level 9.
If you are a budding mobile (iOS or Android) developer, this could be a good place to start with your first release, but if you are a seasoned veteran, maybe this can widen your knowledge or even show you a few new ways worth trying.
If you let a version of your app out of your hand, you will know nothing about it – just bad reviews in the AppStore or on Google Play, but not a single detail you can rely on. This makes crashlogs a must have kit. I recommend you add crashlogs not only to the release versions of your app, but before the first alpha tests.
Your tests will transform into a meaningful report, not just “Something went wrong here and here…”.
Previously, there was one catch-all solution for crash reports, BugSense. But now there are far more, some are even integrated into beta test systems, like Fabric and many others.
We wanted to deploy a Play! framework application to the cloud but we didn’t want to take care of all security updates on a virtual machine. Heroku is very expensive and Amazon has had no suitable solutions for our needs. We decided to go with Windows Azure.
About JSON in general
In today’s world, most of the mobile and web applications we write include some background activity with an API, like handling user info, or fetching data. Over 90% of the time (I didn’t look up the exact number, I’m sure you will forgive me) the servers respond with a JSON object containing the information we desire. If you’re unfamiliar with the structure of a JSON object, it’s definitely worth looking into. There are quite a few greatly designed tutorials on the topic, there’s one on W3Schools, for example.
Once we receive the API response, we generally want to pass this information to our business logic, and eventually to our viewcontrollers.
The most straightforward way would be to deserialize this string (it is essentially nothing more than textual data) into a valid JSON object. These objects are usually a hierarchy of dictionaries and arrays. However, accessing these values from the root object is a pain in the rear. It’s time-consuming, produces messy code, and it’s unsafe. A typo in our code while accessing a key will not produce any errors, since the keys are strings. Without the keen eyes of an experienced developer, who can spot a typo from a mile off, debugging these coding errors takes a lot longer than it should.