Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Ballerina 0.88 Released!

Pre-release
Pre-release
Compare
Choose a tag to compare
@lankavitharana lankavitharana released this 12 Jun 10:06
· 427 commits to master since this release

What’s new in Ballerina 0.88

Ballerina Language improvements

  • Blob type, a new value type, has been introduced in this release. Blob represents a sequence of bytes. It is similar to the string type which represents a sequence of characters.

  • Type cast and conversion expressions. Ballerina now clearly separates the type conversions from casts. Type casting allows you to look at a value as being of a different type than it’s original type. Type conversion transforms the value so that it can be interpreted as belonging to another type. There are safe and unsafe casts and conversions. For unsafe casts and conversions, Ballerina compiler will enforce you to use multi-return cast and conversion expression.

  • Improved XML type, now having the capability of representing a sequence of zero or more XML items where a single XML item can be an element, a text item, a comment or a processing instruction.

  • Transaction improvements - Support for the committed block is added, which get executed if the transaction is successfully committed. Both the aborted and committed blocks are optional with this release.

  • Ballerina function and action overloading has been removed from this release.

  • Fork-Join improvements. Now join and timeout blocks receives a map of any type array from the workers within fork-join block. Workers can send multiple values to the join/timeout block and within those blocks, user can identify which return values are received from which workers by using the returned map.

Built-in APIs

  • Datatable API redesign - The new API provides the ability to access the data in the result datatable in a more convenient way using the struct and type conversion support in Ballerina. Each data row of the datatable can be represented by a struct where the struct fields are matched with the column names/types in the datatable.This will eliminate the use of functions in the datatables package.

  • File API - Introduced built-in functions to perform basic file operations. They are available in the ballerina.lang.files package.

  • XML API - A new set of built-in functions have been introduced to the existing ballerina.lang.xmls package to support the improved XML type.

Ballerina Runtime improvements

  • Compiler and bytecode interpreter - with this release, Ballerina source files get compiled into platform-neutral Ballerina bytecodes and the new bytecode interpreter executes them. This is an internal change and it does not affect how you run and build services and main programs.

  • HTTP resource dispatching logic - with this release, HTTP resource dispatching searches for the most specific match when there is more than one candidate for a given request URI. Plus, query-parameters are not used to uniquely identify resources. These changes are done according to JAX-RS specification. In addition to that, service dispatching now supports default values for service, resource, path-param and query-param. Lastly, improved error messages related to dispatching to be concise and precise.

Ballerina Composer improvements.

  • Preserving existing formatting while editing a bal file. When editing a source file, white-spaces are preserved with the content and will not be altered during modifications in design view and when switching between source and design view.

  • Fork/Join support - From this release onwards, Ballerina Composer will provide users, the capability to add fork/ join statement.

  • Transaction support - With this release we introduce users, the capability of designing the transactions via the ballerina composer

  • Else If blocks - Now you can dynamically add else if blocks from design view. Else block is also made optional and can be added if needed.

  • Now you can search in the tool palette for constructs, functions, connectors and connector actions by typing in the search box. This will filter the constructs that can then be added to the diagram

  • Re-deploy option in launcher - allows to redeploy a already running ballerina program without having to stop and start again after making changes in the program.

  • Annotation Design - From this release onwards, users will be provided with an enhanced and interactive annotation design view to add, delete and edit the annotations.

  • Composer comes with a new package exploring functionality. Now the program directory will be used instead of a single .bal file to resolve functions, connectors etc. With this feature, users can explore other packages in the program directory and use them.

  • Transform statement now can use all the variables that are defined in the parent scope for mapping. Multiple input and output variables can also be used for the mapping. You can drag functions from tool palette to the transform statement and input variables and output variables can be mapped as function arguments and returns as the mapping. Structs with inner structs (complex types) can also be used for the mapping.