How Does Https Work?

Below card depicts how Https works. There are two parts. First part is Certificate generation. Certificates can be either self-signed or issued by Certificate Authorities (CAs). Obtaining certificate from CA is mandatory to allow clients to connect to application securely over Internet. Self-signed certificate are mostly used during testing. The second part is, how certificate is used while establishing a secure connection between a client and the server.

Consumer Driven Contract Tests - Part 4

In this blog series, we have covered Introduction Pact based Contract tests for services communicating in synchronous way Pact based Contract tests for services communicating in asynchronous way Let’s jump to the next topic. Pact broker! So far what we have seen is consumer publishes the contract to the local directory. Provider picks up the contract from this directory. This is the simplest way of sharing the contract.

Consumer Driven Contract Tests - Part 3

This is the third blog in the Consumer driven contract tests blog series. I introduced the concept in the first blog. Second blog covers writing contract testing using Pact for synchronous communication. In this blog, let’s cover how to write contract test when communication medium is message based. In our example loan gateway emits the loan creation event. Loan fulfilment service listens to it and does further processing. In case of Http based communication, we have seen that Pact framework runs mock Http server.

Consumer Driven Contract Tests - Part 2

I introduced the contract test concept in the previous blog. In this blog we will explore writing contract tests for services which communicate over Http. Tests are written using: Pact-jvm Junit5 Gradle The code is available on github. Consumers drive contracts. They create and pass it to provider. Provider is supposed to make sure the consumer expectations are met. Provider cannot roll out it’s change if consumer’s expectation are not met.

Consumer Driven Contract Tests - Part 1

This is a first blog of the consumer driven contract tests blog series. This blog series introduces the concept and demonstrates writing contract tests for a spring boot application. In the world of microservices we often talk about the benefits of microservices. However there are prerequisites which need to be in place before opting this architecture pattern. Martin Fowler’s blog covers these prerequisites really well. One of the prerequisites he talks about is ContinuousDelivery.

Tail Recursion in Kotlin

Image source Let’s understand how Kotlin helps you to write Tail recursive functions. Let’s take an example of a simple recursive function like calculating factorial of given number. There are various ways to implement this. Let’s start with procedural approach. 1 2 3 4 5 6 7 8 9 10 fun factorial(num: Int): Int { var result = 1 var counter = num while (counter > 1) { result *= counter counter -= 1 } return result } The above method uses temp variables for computation.

Things to Consider While Creating XP Based Project Release Plan

Image source This blog lists down the common things which developers and QAs should consider while doing project planning exercise. However before jumping on to the list, let me cover some background first. @ThoughtWorks we follow XP practices. Any typical project starts with an Inception. It is a sort of workshop which typically starts with discovering what problem client is trying to solve. And it ends with a rough plan of how this problem can be solved.

Write your own Network layer in Swift

Image source Let us try to build our own Network layer in pure Swift. It is super simple to build with Swift’s strong support for generics, type inference So let’s start with basics. This network layer is based on URLSession object. By definition this is an object that coordinates a group of related network data transfer tasks. You don’t even need to create a custom object of URLSession in most of the cases.

Fragile To Agile

Image source Folks, you must be wondering what kinda title is this! But I would like to share my experience of how we turned the Fragile development into working Agile development. @ThoughtWorks every project follows Agile software development practice. Our project is no exception. We were following most of the rituals. Pair programming Continuous Integration TDD, BDD Agile ceremonies like standup, iteration planning meet-up, retros blah blah blah… List seems sufficient to qualify for Agile, isn’t it?

Lexical Scoping in Swift

Image source While going through lexical scoping concept in LISP; I wondered whether such support is available in Swift or not. And it does. Yay… I took a simple function — ‘square root of a number’ to try out the lexical scoping. I used Newton’s method for calculating square roots. Below is the first version. sqRt is a recursive function. The code terminates when the guess made in earlier step is good enough.

Mobile facade to simplify mobile app development

In this blog, I will walk you through the journey of evolution of the mobile facade layer which we wrote while developing iOS and Android mobile applications. These applications consume APIs written by external vendors. APIs are developed primarily to cater data to the web application. To handle the situation we applied Facade design pattern. The low level design of the facade is as follows: But you must be wondering why to write and maintain an extra layer.