frameless

package module
v0.296.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

README

frameless

Discover frameless, the 🇨🇭Swiss Army Knife of Hexagonal Architecture conventions!

Frameless is essential to unleashing your software development process's true capabilities. It assists in making your application scalable, adaptable, and easy to maintain by streamlining your project's design and managing code complexity effectively.

Frameless simplifies your software development process by promoting conventions over configurations, allowing you to concentrate on crucial aspects instead of repeatedly starting from scratch.

Like the iconic Swiss Army Knife, frameless is a versatile and indispensable tool ready to tackle any challenge, enabling you to adapt and thrive in the ever-changing software development landscape.

frameless adopt a monolithic module design reminiscent of the Linux kernel. However, this design choice is not related to monolithic software architecture; instead, it resembles how mono repositories assist code owners in managing their systems.

frameless is made up of three high-level components.

port

port are plain interfaces to make expressing a domain role interface straightforward. Using ports doesn't have any vendor locking effect. You can use almost every port by just copy their functions into your role interface in your domain layer.

Each port interface has its importable contract(s) that help you ensure that the behaviour is consistent across the implementations.

Some port package contain a small amount of optional helper functions to help streamlining their use.

There is also testing packages to make it easy to write behaviour-driven tests against your implementations when you need to specify additional expectations towards them from your domain layer.

Using frameless/port safe from vendor locking as they just a collection of finely refined inter

CRUD / relationships

If you need to store entities in your system and want to learn more about representing relationships between them, check the documentation in the port/crud/relationship package.

In short, you can achieve this by referencing one entity from another.

type User struct {
    ID string
}

type Note struct {
    ID     string
    UserID string // UserID references User#ID., thus making Note belongs to User through UserID. <-> User#ID.
}

pkg

Various tooling built either upon using frameless/port or supplies tools often required to develop web services.

adapters

adapters has Example implementations for the ports, especially the memory package, which enables you to do a classicist Test-Driven Development (TDD) testing strategy.

When you import frameless, adapters are not automatically imported into your project; you must import them explicitly. This approach helps maintain a lean and tidy dependency graph while working with frameless.

Documentation

Overview

Package frameless

If you are using the github based import path, please migrate to go.llib.dev/frameless

Directories

Path Synopsis
adapter
localfs
Package localfs has suppliers using the local filesystem.
Package localfs has suppliers using the local filesystem.
mariadb Module
mysql Module
postgresql Module
internal
pkg
cache
Package cache will supply caching solutions for your crud port compatible resources.
Package cache will supply caching solutions for your crud port compatible resources.
cli
env
iterkit
package iterators provide iterator implementations.
package iterators provide iterator implementations.
logging
Package logger provides tooling for structured logging.
Package logger provides tooling for structured logging.
mk
must
Package must is a syntax sugar package to make the use of `Must` functions.
Package must is a syntax sugar package to make the use of `Must` functions.
pathkit
Package pathkit implements utility routines for manipulating slash-separated paths.
Package pathkit implements utility routines for manipulating slash-separated paths.
stringkit
Package stringcase makes it simple to change the style of strings between formats like snake_case or PascalCase.
Package stringcase makes it simple to change the style of strings between formats like snake_case or PascalCase.
tasker
Package tasker provides utilities to background task management to achieve simplicity.
Package tasker provides utilities to background task management to achieve simplicity.
zerokit
Package zerokit helps with zero value related use-cases such as initialisation.
Package zerokit helps with zero value related use-cases such as initialisation.
port
crud/relationship
Package erm stands for Entity-Relationship Modeling
Package erm stands for Entity-Relationship Modeling

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL