Go promotes simplicity, it makes Go more attractive to the community. A recent app I released only consume around 12MB Memory and 0.02m CPU to serve 90k emails per day, the app includes most of features of a MVC web app. It is really impressive how lightweight a Golang application can be.
Simplicity could be an advantage, but also a disadvantage. As developer has to write everything from scratch (or most of), it is easy to create technical debt or introduce bug when dealing with low level configuration, such as serializing and deserializing, io related, handling error, handling shutting down, generating metrics and so on.
In this post, I’d like to share some tips to create less future problematic code by using some common pattern to hide or reuse these responsibilities from the application logic.
This post demonstrates how to test command and query handlers in a Command Query Separation based project.
In Model-View-Controller applications, a common practice is to introduce service objects to encapsulate business logic and manage the interaction to external systems. While service objects are useful abstraction, further structuring them could improve the code organization and maintainability.
Command Query Separation (CQS) is a design pattern principle that defines the incoming request handler type, which is either modify the application state - commands, or retrieving data without any side effect - queries. By applying CQS to service objects, we can create clean interface. This blog post will explore further the benefits of CQS and how to create command and query objects in existing application.
Some practices and patterns for handling exceptions in Java application.
This post explains how to configure the spring security for your app to support user authentication using local database.
This post explains in detailed how to track email sending activities using SNS HTTPs endpoint.
This is a post about setting up the local domain and SSL certs for testing purpose.
Build a commandline tool that helps bootstrap the project
Idea of building the infrastructure with Amazon Web Service using Terraform, Ansible and Jenkins.