Docsity

Modern Go app design, Guías, Proyectos, Investigaciones de Programación Lineal

Vista previa parcial del texto

¡Descarga Modern Go app design y más Guías, Proyectos, Investigaciones en PDF de Programación Lineal solo en Docsity!

Modern (Go) application design O Tit Petric included in LJGo (Best Practices Eb 2025-06-11 4 1907 words Q 9 minutes When it comes to application design, I've formed a few opinions backed by experience. The most important one is: structure matters. In my first years of development, l've built a CMS system that was copied over more than 100 times for different web pages. You don't get there unless you repeat the same process over and over. Application development is like that. If you're writing one middleware, you want the process to be repeatable for each following middleware. The more people that work on the project, the more consistent you want the code base to be. Principles like SOLID or DDD give you a repeatable structuring model. Extending your application with a new service or component encourages composition, locality of behaviour, while adding new bounded scopes for testing. Smaller package scopes lead to better tests, lead to less bugs overall. There's two ways to think about this, or rather two principles that apply to application development leaning into composability: 1. Use cases for the application 2. Data model first principles As we know, applications can range from cli tooling, services of various sizes providing APIs, REST, gRPC, a package API. A web application may use templating to render a data model into other representations aimed at browsers. There's variety and the use cases sort of dictate the top level components. ++ Use cases dictate structure Let's take a look at a familiar example for most, git . The tool provides some typical commands behind it which are used by developers daily. git