Business Logic

Information

Business Logic is the part of an application that models the real-world business rules that determine how data can be created, stored and changed. The other part of an application consists of adapters. Entry and exit points to Business Logic are called ports. Business logic operates on Domain Objects.

Example

func validateUsername(username string) bool {
  if len(username) < 3 || len(username) > 20 {
    return false
  }
  if containsSpecialCharacters(username) {
    return false
  }
  return true
}

Resources