Posts
Dockerizing Spring Boot App
Problem Typically in an application development context, the developer has completed the code for the feature in the sprint, and he wants QA to look into it in the same sprint to find the bugs if there are any. The developer requested DevOps to deploy the application on the QA environment, but the DevOps has other high-priority work. QA started deploying the application to the test environment but misses some configuration and later it took more than a day to fix all issues.
read more
Posts
Go Microservice Part VI - Application
In the previous blog post, Go MVC Part V - Controller we have developed a Contact Controller which has the call to the service and stores the response in the response object for the presentation layer.
Let’s start with the application which stitches everything in previous posts.
Application We started with the design of the application and then wrote the configuration and then the Model, Service and finally the Controller and the View now we need to put everything together in a form of an application.
read more
Posts
Go Microservice Part V - Controller
In the previous blog post, Go MVC Part V - Service we have developed a Contact Service which interacts with the Domain object and return the Model to the calling function.
Let’s start with developing Controller which will consume the response from the Contact Service and present it to the presentation layer(View in MVC).
Controller Model contains domain objects as well the information retrieval mechanical from the database. Service has the Business Logic.
read more
Posts
Go Microservice Part IV - Service
In the previous blog post, Go MVC Part III - Model we have developed a Model of contact application including the DAO code which will retrieve the information from the data source which in our case is Contact struct.
Let’s start with developing Service in this post.
Service Model contains domain objects as well the information retrieval mechanical from the database. Let’s assume our database is nothing but a go struct for the simplicity of the application.
read more
Posts
Go Microservice Part III - Model
In the previous blog post, Go MVC Part II - Application Configuration we have imported Viper and wrote project configuration.
Let’s start with Model first and then we will move upwards and write Service, Controller, and then App code and finally the main function which will start the contact web application.
Model or Domain Model contains domain objects as well as the information retrieval mechanical from the database. Let’s assume our database is nothing but a go struct for the simplicity of the application.
read more
Posts
Go Microservice Part II - Application Configuration
In the previous blog post, Go MVC Part I - Overview we have seen the overall structure of contacts application.
Let’s start with writing the application configuration using Viper.
Viper After creating the folder structure as mentioned in the previous post, we need to import the Viper package for writing the application configuration.
From the project root folder run the below command.
$ go get github.com/spf13/viper Application Config Create a config.
read more
Posts
Go Microservice Part I - Overview
MVC has a distinct role in web application development. It gives you a clean design and practical approach in designing and developing customer-facing software applications that takes input or set of inputs from the user and present the solution or the response to the user.
Let’s develop a web application using mvc design pattern in Go with the help of http, Viper, and Mux packages.
App We will develop a contact application that will retrieve contact details based on the input id.
read more
Posts
Go Pointer Part II
In the previous blog-post Go Pointer Part I we have seen how we can use pointers to update the value for a given struct. There is little more left on that which we will cover here.
Go Slice is an exception and we can update the value of a slice with the index location but if we want to add more values to it then we need to use a pointer, let’s take a look at the same.
read more
Posts
Go Pointer Part I
Go lang is an open-source programming language like C, having pointers and not strongly typed language. And most importantly it is not an Object Oriented Programming(debatable) language though it has likes of defining packages and interfaces like Java.
Let’s explore the Go pointers in this post.
Pass By Reference Go follows pass by reference. Slice is an exception where we can use the index to update value, we will discuss it in the next post.
read more
Posts
Go Interface
Go lang is an open-source programming language like C, having pointers and not strongly typed language. And most importantly it is not an Object Oriented Programming(debatable) language though it has likes of defining packages and interfaces like Java.
Let’s explore the Go interface in this post.
App We will write Shape interface and then calculate the area of different geometrical shapes ex. Circle, Rectangle, and Triangle.
Shape interface will be having an area() function which will be implementing.
read more