Ballerina for Full-Stack Developers: A Guide to Creating Backend APIs
Summary
With the emergence of single-page applications (SPA), developers have moved away from traditional server-side scripting languages and embraced APIs (REST, GraphQL, WebSocket, etc.) The main motive behind ballerina is to enable developers to focus on business logic while spending less time on integrating cloud native technologies. Flexible type system, data-oriented language-integrated queries, enhanced and intuitive concurrency handling along with inbuilt observability and tracing support, make Ballerina one of the go-to languages for the cloud era. It’s a POST request, sent to the /products (derived by looking at the resource method’s), requires a payload of type Product and returns either a validation error (400) or an HTTP CREATED response (201) with a location header. On top of the usual benefits of NoSQL, Ballerina’s inbuilt JSON and open record types come in handy when working with unstructured or semi-structured data.