Introducing Ballerina
-
Upload
wso2-inc -
Category
Technology
-
view
10.910 -
download
0
Transcript of Introducing Ballerina
![Page 1: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/1.jpg)
![Page 2: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/2.jpg)
…
•–––
•
•
![Page 3: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/3.jpg)
•
•
•–
![Page 4: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/4.jpg)
![Page 5: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/5.jpg)
![Page 6: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/6.jpg)
•
•
•
![Page 7: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/7.jpg)
••
–––
•
••
![Page 8: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/8.jpg)
import ballerina.lang.system;
function main(string[] args) { system:println("Hello, World!");}
![Page 9: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/9.jpg)
![Page 10: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/10.jpg)
••••••
![Page 11: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/11.jpg)
![Page 12: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/12.jpg)
![Page 13: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/13.jpg)
![Page 14: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/14.jpg)
•
•
![Page 15: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/15.jpg)
•
•
•
![Page 16: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/16.jpg)
•
•
•
![Page 17: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/17.jpg)
•
•
•…
![Page 18: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/18.jpg)
•
–
•
•
![Page 19: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/19.jpg)
•
•
![Page 20: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/20.jpg)
•
•
•
![Page 21: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/21.jpg)
•
•–
•–––––
![Page 22: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/22.jpg)
![Page 23: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/23.jpg)
![Page 24: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/24.jpg)
•– package org.wso2.foo;
•
•packagename:symbolname–
•– import org.wso2.foo [as xx];
• ballerina.*
•
![Page 25: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/25.jpg)
![Page 26: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/26.jpg)
•––
•
•– json address_json = `{"name" : "$name", "streetName" : "${street}"}`;
![Page 27: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/27.jpg)
•
•
•
–
•– xmlElement address_xml = `<address><name>${name}</name></address>`;
![Page 28: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/28.jpg)
•
•
![Page 29: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/29.jpg)
•–
•–––
•
![Page 30: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/30.jpg)
typemapper TypeMapperName (TypeName VariableName) (TypeName) { Statement;+}
![Page 31: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/31.jpg)
•••••••••
![Page 32: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/32.jpg)
fork (MessageName) { worker WorkerName (message VariableName) { Statement;+ [reply MessageName;] }+ } [join (JoinCondition) (message[] VariableName) { Statement;*} timeout (Expression) (message[] VariableName) { Statement;* }]
![Page 33: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/33.jpg)
![Page 34: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/34.jpg)
worker WorkerName (message m) { Statement;+ [reply MessageName;]}
•MessageName -> WorkerName;MessageName <- WorkerName;
![Page 35: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/35.jpg)
![Page 36: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/36.jpg)
•••••
![Page 37: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/37.jpg)
•
•–
•
![Page 38: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/38.jpg)
•–––––
•– ☺
![Page 39: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/39.jpg)
•
•
![Page 40: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/40.jpg)
•
![Page 41: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/41.jpg)
•
•
![Page 42: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/42.jpg)
![Page 43: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/43.jpg)
![Page 44: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/44.jpg)
•–
•
•–
![Page 45: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/45.jpg)
•
•–
•––
![Page 46: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/46.jpg)
•
•––
•
![Page 47: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/47.jpg)
![Page 48: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/48.jpg)
•–
•––––
•
![Page 49: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/49.jpg)
![Page 50: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/50.jpg)
•
•–––––
![Page 51: Introducing Ballerina](https://reader031.fdocuments.net/reader031/viewer/2022022202/58b880941a28ab44078b5d95/html5/thumbnails/51.jpg)