Need for Speed:

Build Applications Faster

What is Chancla.io?

Cloud-Based Application Development Framework

Chancla.io allows software developers to quickly develop applications that integrate with other third-party APIs and services, such as, MongoDB (mLab.com), Redis (redislabs.com), and Amazon Aurora to name a few.

Developers are pleasantly surprised how quickly they can build and deploy application services Chancla.io.

To learn more, click here to try our Add to Cart and View Cart APIs Using MongoDB (mLab.com).

A Simple Backend Application Builder for Designers

If you are a designer, and need a way to easily build JSON-based APIs and services for your amazing front-end, then Chancla.io is the right solution for you.

With Chancla.io, you do not need to worry about setting up your own servers, we take care of that for you. We also have a number of helper functions that simplify back-end dev work.

To learn more, click here to try our Generate JSON Data code example

An API Test Platform for Testers

Testers, we know how difficult and important your role is in all software projects. We also understand many testers want to learn how to build test scripts that provide more test coverage.

With Chancla.io, testers may build API Testing tools that validate APIs and Web services are working as expected.

To learn more, click here to API Test Client (HTML Version) code example

Features

Hyper Agile Development

At the heart of Chancla.io, is an Java/Groovy framework optimized for serverless application development and deployment.

Chancla.io possesses the dynamic development features of Python and the compiled code advantages of Java.

Real-Time Application Deployment

Chancla.io compiles code according to JVM bytecode best practices and deploys it instantly to the cloud. No more lengthy, late-night deployments needed.

With Chancla.io, zero downtime is required to deploy new features to production.

Exceptional Performance

Chancla.io is fast! Behind the scenes, Chancla.io applies a series of code optimization techniques to ensure your code is running on all cylinders.

Performance is top of mind for Chancla.io, our goal is to proivde our clients the industry's fastest cloud-based application run-time.

Quick Start Tutorials

Hello World Run in Sandbox

The first program usually writen when learning a new programming language.

                                        
println("Hello World");
                                
                            

Generate JSON Data Run in Sandbox

Chancla.io provides a simple approach to create JSON data. Run this code in the Sandbox and see for yourself.

                                chanclaJSONBuilder.customer(
  firstName: 'John',
  lastName: 'Smith',
  streetAddress: '12 Brooks Street',
  city: 'Lemoore',
  state: 'CA',
  country: 'US'
);                                
                            

Generate XML Data Run in Sandbox

Learn how simple it is create XML with the Chancla.io XML library.

chanclaXMLBuilder.customer() { 
        firstName("John");
        lastName ("Smith"); 
        streetAddress("12 Brooks Street");
        city("Lemoore");
        state("CA");
        country("US")
};
                            

Generate JSON Array Data Run in Sandbox

Another Chancla JSON example, this code snippet creates an JSON array (list) of customers.

                                   def customer = [ 
    [ getFirstName : { 'John' }, getLastName : { 'Smith' }, 
    getStreetAddress : { '12 Brooks Street' }, getCity : { 'Lemoore' }, 
    getState : { 'CA' },getCountry : { 'US' }],

    [ getFirstName : { 'Jorge' }, getLastName : { 'Lopez' }, 
    getStreetAddress : { '2 Zapato Calle' }, getCity : { 'Tijuana' },
    getState : { 'BC' },getCountry : { 'MX' }], 
    
    [ getFirstName : { 'Stymie' }, getLastName : { 'Jackson' },
    getStreetAddress : { '232 Broadway' }, getCity : { 'New York' },
    getState : { 'BNYC' },getCountry : { 'US' } ]     
];

chanclaJSONBuilder {
    customers customer.collect { 
        [ 
            firstName: it.getFirstName(), 
            lastName: it.getLastName(), 
            streetAddress: it.getStreetAddress(),
            city: it.getCity(),
            state: it.getState(),
            country: it.getCountry()
        ] 
    }
};
                            

Simple JSON Client Run in Sandbox

This starter example provides the foundation to build your own JSON API client for your specific project needs. The API used in this example is NASA's Planet of the Day API.

For security purposes, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                def jsonContents = 
"https://api.nasa.gov/planetary/apod?api_key={{nasa_gov_security_key}}"
.toURL().text;
 
def json = chanclaJSONParser.parseText(jsonContents);

println "Copyright: " + json.copyright;
println "Date:  "  + json.date;
println "Explanation: " + json.explanation;

Date date = new Date();
println "Date Time Ran: " + date.toString();
                                
                            

Add to Cart and View Cart APIs Using mLab.com (MongoDB-as-a-Service) Run in Sandbox

Learn how to quickly create a practical Add to Cart and View Cart APIs with this example. You will the use the Chancla.io mLab.com (https://www.mlab.com) account to help familiarize yourself with creating an add to cart service using MongoDB.

As a reminder, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                chanclaJSONBuilder.cart(
 cartId: cartId,
 productSku: productSku,
 productName: productName,
 productPrice: productPrice,
 productQty: productQty
);

def post = 
new URL("https://api.mlab.com/api/1/databases/commerce-db/collections/cart?apiKey={{mlab_security_key}}")
.openConnection();
def message = chanclaJSONBuilder.toPrettyString();
post.setRequestMethod("POST");
post.setDoOutput(true);
post.setRequestProperty("Content-Type", "application/json");
post.getOutputStream().write(message.getBytes("UTF-8"));
def postRC = post.getResponseCode();

/** get the cart contents */
def cart = new URL(
"https://api.mlab.com/api/1/databases/commerce-db/collections/cart?apiKey={{mlab_security_key}}&q={'cart.cartId':'"+cartId+"'}")
.text;

println cart;
                            

API Test Client (JSON Response) Run in Sandbox

Create your own API Client testing harness, and generate JSON-based API testing data reports.

As a reminder, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                def jsonContents = 
"https://api.nasa.gov/planetary/apod?api_key={{nasa_gov_security_key}}".toURL().text;
 
def jsonResponse = chanclaJSONParser.parseText(jsonContents);

class TestCaseCollection {
    String name;
    List testCases = [];
};

class TestCase {
    String name;
    String expectedValue;
    String actualValue;
    
    def passFail() {
        return (expectedValue == actualValue) ? "Pass" : "Fail";
    }
};

TestCaseCollection tcc = new TestCaseCollection(name:"Testing the Astronomy Picture of the Day API");
tcc.testCases << new TestCase(name: "Confirm Version Number",
expectedValue: "v1", actualValue:jsonResponse.service_version);
tcc.testCases << new TestCase(name: "Confirm Copyright Contains Value",
expectedValue: true, actualValue: (jsonResponse.copyright != null));
tcc.testCases << new TestCase(name: "Confirm Explanation Contains Value",
expectedValue: true, actualValue: (jsonResponse.explanation != null));

chanclaJSONBuilder {
    TestCaseReport {
        name  tcc.name; 
        testCases(
        tcc.testCases.collect{ 
               TestCase tc -> [expectValue: tc.expectedValue, actualValue:tc.actualValue,
                              passFail: tc.passFail()]
            }   
    )
    }
};
                            

API Test Client (HTML Response) Run in Sandbox

Create your own API Client testing harness, and generate HTML-based API testing data reports.

As a reminder, Chancla.io stores and encrypts all third-party API security keys on its servers. During run-time, Chancla.io replaces the security token with the real API security key before calling the third-party API.

                                def jsonContents = 
"https://api.nasa.gov/planetary/apod?api_key={{nasa_gov_security_key}}".toURL().text; 
 
def jsonResponse = chanclaJSONParser.parseText(jsonContents);

class TestCaseCollection {
    String name;
    List testCases = [];
};

class TestCase {
    String name;
    String expectedValue;
    String actualValue;
    
    def passFail() {
        return (expectedValue == actualValue) ? "Pass" : "Fail";
    }
};

TestCaseCollection tcc = new TestCaseCollection(name:"Testing the Astronomy Picture of the Day API");
tcc.testCases << new TestCase(name: "Confirm Version Number",
expectedValue: "v1", actualValue:jsonResponse.service_version);
tcc.testCases << new TestCase(name: "Confirm Copyright Contains Value",
expectedValue: true, actualValue: (jsonResponse.copyright != null));
tcc.testCases << new TestCase(name: "Confirm Explanation Contains Value",
expectedValue: true, actualValue: (jsonResponse.explanation != null));

chanclaHTMLBuilder.html() { 
        
        head {
            title ("API Test Client Developed with Chancla.io"); 
            
            style ("""
                   table {
                        border-collapse: collapse; 
                        border:1px solid #69899F;
                    } 
                    table td{
                        border:1px dotted #000000;
                        padding:5px;
                    }
                    table td:first-child{
                        border-left:0px solid #000000;
                    }
                    table th{
                       border:2px solid #69899F;
                       padding:5px;
                    } 
                    td.Fail {
                        background-color: red;
                        color:white;
                    } 
                     td.Pass {
                        background-color: green;
                        color:white;
                    }
                    
                    """);

        };
        body { 
            h1 ("Report Name: " + tcc.name);
      
            table {
                 tr{
                    th("Test Name");
                    th("Expected Value");
                    th("Actual Value");
                    th("Pass/Fail");
            }; 
                   tcc.testCases.collect{ 
                   TestCase tc ->
                   tr {
                         td(tc.name); 
                         td(tc.expectedValue);
                         td(tc.actualValue);
                         td(class : tc.passFail(), tc.passFail());
                        }; 
                       
                }; 
           };
           
           p ("API Test Client Developed with Chancla.io"); 
     };
      
};