Below you will find pages that utilize the taxonomy term “Go Mvc”
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