Add an authentication layer to your REST APIs

Photo by Debby Hudson on Unsplash

This section describes the way Keycloak acts as an authentication module that gives a temporary token to the consumer. This temporary token can then be used by a resource to verify if the request is from an authenticated source.

Add a Realm

  • Name the realm as “Project Alpine” (or anything of your choice)
  • Use the Keycloak public URL as the endpoint
  • Create a user as “admin@alpine.com” and assign the client role of “manage-users”

Create a Client

  • Name the client as…


Send data from the server to the client — implemented in Xamarin

Photo by Tim Mossholder on Unsplash

Until recently, I was under the impression that there were only a few widely accepted options available for the server to push messages to the connected client, especially the mobile application

  • Polling (long and short): The client, continuously, makes an HTTP request to the server and checks for a response. In the long polling, the request is completed after a few seconds. Minimum or no change is required on the server-side. Only works when the app is in foreground/active
  • Push Notifications (Mobile): Use the APNS/FCM for mobile applications…


With no rules at all

Yes! You read it right. Agile has no rules that need to be followed. It has no regulations that need to be abided with, nor it is a path that will lead to a glorious project. Agile can be visualized as the signboards that, if followed, can make the journey of project development and delivery smooth.

What Agile is NOT? 👎

To understand what is Agile, we must ret rid of the misconceptions of what we think about agile. Agile is always thought to be the following. But in reality, it isn’t anyone of these.

  • Methodology: A system of methods…


Distribute APIs and have control over who is authorized to use it

Photo by King's Church International on Unsplash

Being in the software industry, there is always a need to exchange data between applications. Much of the data is available free nowadays, however, there are several pieces of data that need to land into the correct hands.

Data exchange is so easy that one has to develop an API and share the details with the consumer. Having said that, one should also safeguard the API by implementing checks on what the consumer is authorized to access.

In this post, we’ll try to implement an API authorization mechanism…


in an elegant and scalable way

Photo by Maksym Kaharlytskyi on Unsplash

Every other software application developed has a requirement to save data, either to the backend or locally. This data could be the user’s preferences, game scores, login credentials or anything else.

This article picks up an iOS application and demonstrates an easy and scalable way to persist data locally.

Note:
- We’ll not discuss the advantages or disadvantages of different mechanisms.
- We’ll only talk about a way to design the Storage class so that the underlying implementation can be changed without impacting the functionality
- This article is in no way applicable only to iOS app…


Photo by John Barkiple on Unsplash

Having worked with several software engineers over recent years, I have noticed that many of them lack the concept of Abstraction in software development. No wonder they are good programmers, but they tend to write code for JUST THEMSELVES. I have tried to explain the use of Abstraction in day to day programming

What’s Abstraction?

Abstraction is a way to hide the complexities of software and expose only the essential features to the user.

Confused?

Let’s consider the below example.

You are a customer and want to have a soft drink from a vending machine.

  1. You select the beverage
  2. Pay…

Photo by Bruno Nascimento on Unsplash

I don’t have time — is what I often hear many of the people around me in response to keeping oneself fit. They are so engaged in their daily routine that they cannot even imagine of sparing an extra 30 minutes for a healthy life.

I’m no different from them. I’m a software engineer by profession with over a decade in this industry. It is an interesting profession, however, my job requires a lot of focus and I’m often on my toes. Like others, I too cannot find a way to spare time and stay healthy. …


Credit: PhillyTechWeek

I have been programming for quite some time now along with managing a team of some good developers. After many app crashes, maintenance problems and performance issues, I have tried to write down a few practices that my team and I have learned. These are very basic in nature and are extremely helpful when multiple people intend to work on the same project.

1] Code formatting

This is the first and foremost advice I give to developers of all groups i.e. freshers, mid-level or highly experienced. A code that is readable by self and others is also maintainable. …


Lately, for one of the projects I had to develop a Cocoa Touch Framework that would be integrated into a client’s iOS application. I thought of writing a beginners guide for it.

The prime benefits of a framework or library are as below

  1. Security: Only the framework developers have access to the source code. The one’s consuming the library aren’t aware of what’s happening under the hood
  2. Abstraction: As the consumers of the library/framework do not have the source code, they — most of the times — will have to invoke just a few functions of the framework. …

I recently started working on an iOS project (Swift 4 and Xcode 9) and had to display custom alerts. Reading the UIAlertController reference documentation I found that Apple doesn’t have public API’s to customise the design of the alerts. It has specified that

The below tutorial demonstrates how a UIAlertController can be customised using Apple’s public API’s. This tutorial is limited to only two design layouts. …

Sahil Khanna

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store