Ballerina Programming Language - best practices guide

Welcome to the best practices guide of Ballerina programming language!

Ballerina is an open-source programming language for the cloud that makes it easier to use, combine, and create network services.

This is a collection of best practices on using various Ballerina concepts and functionalities. This guide is opinionated and not Ballerina's official documentation. You won't find a list of every Ballerina syntax and standard library usage help here. Rather, you'll find a concise list of highly recommended options. The list is growing!

Let’s begin coding effectively in Ballerina.

If you are interested in contributing to this book, check out the contribution guidelines.

Project best practices

How to use Ballerina's features to create clean, effective code organized properly in the file system.

Language best practices

List of common Ballerina language best practices to follow.

Optionality and nil values

Values and types

Functions and parameters

Error handling

Records

Objects

Working with constants and strings

Conditionals

Query expressions

Common best practices guide

These are common some best practices which are common for any language.

Resources

Ballerina FAQ

Ballerina library samples