Architect/Associate Director, WSO2
An Overview of Ballerina Composer
Joseph Fonseka
Ballerina is a textual and a graphical
language.
2
Why graphical ?
3
Java
Ballerina
function main(string[] args) {
endpoint<http:HttpClient > UserAPI {
create http:HttpClient("http://londoni.com/users",{});
}
endpoint<http:HttpClient > EmployeeAPI {
create ttp:HttpClient("http://londoni.com/employe",{});
}
http:Response person;
http:Request employee;
person,_ = UserAPI.get(args[0], {});
employee.setStringPayload(person.getStringPayload());
_,_ = EmployeeAPI.post(args[1], employee);
}
Ballerina Visually
Graphical Syntax
7
Function
Statement
Block Statement
Workers
Worker Messaging
Endpoint
Service
Struct
Composer is a tool to edit
Ballerina programs graphically and
textually
16
• Comes with Ballerina tools distribution
• Run composer with the following command
– <ballerina_home>/bin/composer
• Access http://localhost:9091 in your browser
How to Install ?
•
Composer
Components
Graphical Editor
• Constructs
– Services & Main
– Top Level constructs
– Statements
• Current Package
• Connectors
• Library
Tool Palette
Textual Editor
Split View
Swagger Editor ( API Design )
Transformer
• Language Server Protocol implementation for
Ballerina.
– https://langserver.org/
Ballerina Language Server
• Code completion
– In scope variables
– Functions
– Connectors & Actions
– Keywords
• Code snippet support
Language Server Features
Launcher
Try It
Debugger
Ballerina Composer on Cloud
31
Composer on Cloud
• Complete the Language server to work with other
clients. ( ie. VSCode, Eclipse )
• Built in tools for special integration scenarios ( ie.
Data Integration )
• Ship with electron and will work as a desktop editor.
Future
• GitHub
– https://github.com/ballerinalang/composer
• More Info
– https://ballerinalang.org/
• Technologies.
Contribute
ReactJS
Images from https://en.wikipedia.org
wso2.com
35

[WSO2Con EU 2017] An Overview of Ballerina Composer