BallerinaLang — Visual Programming and its Role in Service Integration

Visual Programming Languages

C, C++, Java, Go, Javascript — As far as we concern these terms, they are not unfamiliar to any programmer. Whenever there is a certain computational task to be programmed, one of the previous becomes the choice. One common feature of those is all of them are textual programming languages.
Prograph, VIPR (Visual Imperative Programming), Cantata — Now again, if we consider these terms most of you might not be familiar with them. When contrast with the previous set of programming languages, latter has a significant difference, which is all of them are visual programming languages (VPLs).
Even though the term VPL is a bit unfamiliar, they have been among the other programming languages for decades. Instead of using text for composing a particular logic, VPLs use graphical syntactical units. Most of the time they use a data flow model as the underlying architectural processing model.

Service Integration Challenges

With the surge of third-party cloud services and cloud-centric business solutions, service integration became one of the most focused technical prospects. Even though the focus on the matter has been in the tech world for years now, still there are major concerns to be solved. Although the technological maturity has been promising over the years, still there are areas which we need to improve.
Consider the following facts,

  1. Simplification of developing a solution
    When we consider the process of developing an integration solution from the beginning, it takes a considerable amount of time to get the solution to a workable stage. If we consider one of the simplest similar tasks such as calling a back-end service and receive a response meets the same fate. If we consider a complex integration solution which involves multiple services, things get more complex. Due to these reasons, developing a solution for an integration complex and time-consuming process.
  2. Tracing and Debugging
    When there are multiple services involved in a certain integration solution, it becomes harder to debug/ trace a particular flow whenever there is a flaw. If we consider conventional textual programming languages such as Java, C++, and C#, there are IDE based debuggers to achieve this particular use case. In the world of service integration debugging becomes a tedious task compared to the conventional debugging.
  3. Isolating critical components
    Consider a real-world integration solution for a moment. Such solutions contain multiple critical components addressing various use cases of the solution. With the conventional perspective, it is hard to isolate such critical components and analyze the actual behavior whenever it is required to do so (Eg: Debugging)

BallerinaLang — Next Generation of VPL and Service Integration

BallerinaLang is a Visual First, high performing programming language which is highly optimized to address the problems where we face in the domain of service integration. BallerinaLang in one hand acts as the most advanced VPL which has overcome the drawbacks of conventional VPLs. If we consider the visual component, this particular visual syntax has been built adhering to the sequence diagram concepts. Even though the history of VPLs has faced so many drawbacks when addressing the standard programming experience, BallerinaLang has been able to overcome these drawbacks by becoming the most advanced VPL in the world.

The previous section mentioned the barriers in service integration process. When comes to the service integration visual thinking is a must. From the first phase of designing a solution to the last phase of deployment, depicting a solution with a rich graphical representation decrease the hassle. Let’s have a look at how the rich graphical representation paradigm can benefit the real world service integration solutions development.

Ballerina’s Visual Paradigm

BallerinaLang has designed by focusing the all three perspectives of programmatic solution development — Design, Development, and Representation. BallerinaLang is a general purpose programming language which allows you to do your programming with graphical syntax with 100% parity to the textual syntax. This visual approach of Ballerina helps you to develop your integration solutions with sequence diagrams.

One of the most important phases in Service Oriented Architecture and Service Integration is the architectural phase. During this phase, we design a solution in pictures. When it comes to Ballerina, you don’t need to think and depict only. You can mock the whole solution by dragging and dropping several components. Follow this quick tutorial to grasp the idea. Before Ballerina it was a tedious task to simulate an integration concept in a quick time. But Ballerina allows you to overcome the hassle and make life easier than ever. Things get simpler, even more, when comes to the actual implementation as well.

Addressing the current challenges

Consider the typical programming paradigm. When it comes to the first cut of the solution, you start debugging for issues whenever there are any. In an integration solution, component debugging is not intuitive. Ballerina’s debugging and tracing capabilities allow debugging each and every critical component.

  1. Exploring incoming message content
  2. Exploring request and response properties
  3. Exploring backend responses
  4. Current context values (Variables) and etc..

Above is some information a developer interested in when debugging. When there are multiple services integrated together, it becomes troublesome extracting aforementioned information. Things become much simpler when such a capability is exposed graphically. This has been another aspect where Ballerina rises above the other programming languages. Ballerina with its powerful visual representation simplifies these tedious tasks allowing the programmers to have a better development experience.

Ballerina becomes a handy choice when comes to the identification of critical components of an integration solution. Look at the following figures.

Ballerina Resource Configuration
Embedded Swagger View
Text syntax for service with one resource
  1. Each service interaction can isolate from other statements
  2. Third party connections’ scoping and the visibility allows better organization of components
  3. Annotations section allows better organization
  4. Sequence diagram behavior provides better understanding of the message flow among each component
  5. Embedded Swagger view for the services allows different development perspectives

BallerinaLang and the Future of Integration

During the last several years, a fair share of time has been spent searching solutions for these challenges. Ballerina’s visual and textual parity is the best solution ever introduced, addressing these challenges.

In this article, I have looked at Ballerina from architectural and design point of view. You can gather more on Ballerina and its architecture from here.

Download Ballerina Distribution

Ballerina By Example

)

Nadeeshaan Gunasinghe

Written by

Associate Technical Lead at WSO2, Microservices Enthusiast, Full-stack Developer, Hardcore Cricket Fan, Sci-fi Addict ;)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade