Increasingly, developers and architects are disaggregating their architectures to create more scalable and agile applications. As this happens, everything is becoming a programmable endpoint. Ballerina is a new programming language designed around this problem. This deck introduces the challenges and background of why Ballerina has been created, as well as demonstrate the core features of the language.
Ähnlich wie [WSO2 Integration Summit Nairobi 2019] Ballerina - Cloud Native Programming Language that Makes it Easy to Write Microservices that Integrate APIs
Ähnlich wie [WSO2 Integration Summit Nairobi 2019] Ballerina - Cloud Native Programming Language that Makes it Easy to Write Microservices that Integrate APIs (20)
12. ● Service is a collection of resources where each resource is network
invokable via ingress endpoints
● Services must be attached to an endpoint to be invoked
Services and Resources
16. Basic types and other types
○ Other types
○ Unions
○ Optional
○ json
○ byte
○ anydata
○ any
17. Union types
○ Type defined by union of two or more other types
○ Remember, a type is name for a set of values
float | string v1 = "John";
float | string v2 = 457.68;
float | string
0.51
1.01
457.68
-11.0
“John”
“name”
“”
“bal”
// The return type of 'post' is a union of 'http:Response' and 'error'
http:Response | error response = orderEP -> post("/create", reqPayload)
18. XML
// Simple XML literal
xml x1 = xml`<name>Pol Katta</name>`;
// XML with namespaces
xmlns "http://wso2.com" as ns0;
xml x2 = xml `<name id="123" status="single">
<ns0:fname>Pol</ns0:fname>
<ns0:lname>Katta</ns0:lname>
</name>`;
// XML literal with interpolation
string lastName = "Katta";
xml x3 = xml`<lname>${lastName}</lname>`;
// Concat XML values
xml x4 = x1 + x2 + x3;
23. ● Ballerina natively understand Cloud Native platforms like Docker,
Kubernetes and Istio.
● Ballerina removes gap between developers and Ops.
● Ballerina support agile development to deployment and improve
productivity.
Takeaways
24. How to get involved
Learn more
Open source
Get support
http://ballerina.io
http://github.com/ballerina-platform/
Ballerina Dev Google Group
Ballerina Slack Channel
Stack Overflow #ballerina tag