19.0.0 released Nov 08, 2023
Vely framework

Vely is an easy declarative language and a high-performance framework, accelerating both software development and run-time performance. This philosophy is in the name - "Vely" stands for Vel(ocit)y. Vely makes native applications by generating C code which is then compiled. Because of that, you can use C directly, or you may not use it at all as many of examples here don't.
Vely

Why generate C? Because C is the fastest and most efficient language there is. Fear not however, you don't need to be an expert in C, in fact you don't need to know much C at all.

Vely balances safety, ease of use and performance in a way no other language or framework does. It is safer than C, as it handles memory for complex tasks and releases it automatically. Writing Vely code is as easy as writing pseudocode, except of course that it works!

You can develop applications fast, including web applications. All the while, you keep the superior performance and low footprint of C, without added complexity that makes other highly abstracted languages slower both at run-time and more difficult to develop with.

Vely
Latest

Vely 19.0 is out, with major support for in-memory tree structures, and a host of other features and improvements! Check out the new article about using binary trees in a cache server and a recent example on distributed computing.


Vely
Resources

There's plenty of step-by-step and hands-on examples, and a well-written documentation.


Vely
Connect

Vely was created and is maintained by Sergio Mijatovic. Connect on LinkedIn, Twitter, dev.to, fosstodon or GitHub. For issues, bugs, enhancement requests, please email vely@vely.dev


Vely has a vast (and growing) functionality that makes for rapid development of virtually any application. Here's some of what's included:

Vely
Rapid development

Rapidly develop high-performance web applications or any back-end software. Free Open Source with a license you can use with any project, including commercial. Read more about-Vely.


Vely
Write less code

Vely code looks like pseudocode, but it isn't. That's how easy it is to read and write. A few lines of code will do a whole lot. It's about saving you time and frustration, and not compromising performance in doing so.


Vely
More performance

Vely turns your code directly into native C, without run-time layers of abstraction that may cost you dearly in performance. C is the fastest and most energy-efficient programming language.


Here's a snippet of Vely code. It's from SQLite example. It records temperatures and time they were taken (request URL "/temphist/action/record"), and also lists a history of recordings (request URL "/temphist/action/list"). Check out how easy it is to get input parameters from the web or command line and to run a database query:
request-handler /temphist
    out-header default

    task-param action

    if-task "record"
        input-param temp
        run-query @db_utility = "insert into temps (temp, timest) values ('%s', current_timestamp)" : temp \
            affected-rows define rc error-text define er no-loop
        if (rc != 1) {
            @Could not insert temperature reading, error <<p-out er>>.
        } else {
            @Temperature reading stored.
        }
    else-task "list"
        run-query @db_utility = "select temp, timest from temps order by timest" output temp, timest
            @Date: <<query-result  timest>>
            @Temperature: <<query-result  temp>>
        end-query
    end-task
end-request-handler


Vely
Better safety

No need to manage memory and worry about leaks and buffer overflows. You can still use C however you want, though likely you won't need to as Vely offers vast functionality already.


Vely
Boost everything

Skip tedious work with simpler and declarative statements that perform entire tasks. Develop in less time, with more confidence, and with better productivity.


Vely
Try now

Try Vely from prebuilt packages or from a source build.

You can download source code and make Vely, or you can use standard apt, dnf, zypper or pacman packagers to install it.


In another example (web file manager (with PostgreSQL)), here's how simple it is to upload a file to the server and save its information to the database:
request-handler /upload
   out-header default

   input-param filedesc      // file description from the upload form
   input-param file_filename // file name
   input-param file_location // the path to uploaded file
   input-param file_size     // size in bytes
   input-param file_ext      // the file extension

   @<h2>Uploading file</h2>

   // insert the information about the file into the database
   run-query @db_file_manager= \
        "insert into files (fileName, localPath, extension, description, fileSize) \
            values ('%s', '%s', '%s', '%s', '%s')" \
        input file_filename, file_location, file_ext, filedesc, file_size
   end-query

   @File <<p-web file_filename>> of size <<p-web file_size>> \
        is stored on server at <<p-web file_location>>. \
        File description is <<p-web filedesc>>.<hr/>
end-request-handler


Vely
Moore's Law

Performance matters, especially in the Cloud. Faster CPUs are taking more time and money to develop due to physical limitations, and Moore's Law may expire soon. Performance will matter even more in the future.


Vely
Quality

Each Vely release passes continuous functional tests before it goes out. There's currently 2186 such tests.



Tasks you'd normally have to write lots of complex code are easy with Vely. Take a look at distributed computing, in this case making a request to another server (from distributed computing example):
request-handler /status
   silent-header
   out-header default
   input-param server
   input-param days

   // Create URL payload for remote server
   pf-out "/days/%s", days to define payload
   // Create a string describing the remote server with IP and port
   pf-out "%s:3800", server to define srv_location

   // Create a remote server connection
   new-server define srv location srv_location \
       method "GET" app-path "/server" \
       request-path "/remote_status" \
       url-payload payload \
       timeout 30

   // Call the remote server
   call-server srv
   // Get the results from remote server
   read-server srv data define dt
   // Print out the results
   @Output is: [<<p-out dt>>]
end-request-handler


Vely
If you use C programming language

If you develop in C programming language (or thinking about it), Vely is a great choice. Vely generates C code much like an experienced C developer would write it. And for anything you need that Vely doesn't have you can write your own code.


This example will calculate a factorial of a number and then its square root (see here for a complete example). This demonstrates writing C code with Vely, which can be freely mixed together. In fact, all Vely expressions are indeed C expressions. You can create an application web server from this code in minutes, or run it in a command line just like any other program.
#include <math.h>

int factorial(int num);

%% /using-c
    out-header default
    input-param inp
    int res = factorial (atoi(inp));
    @Factorial of <<p-out inp>> is <<p-num res>>!
    double sr = sqrt ((double)res);
    @And its square root is <<p-dbl sr>>!
%%

int factorial(int num)
{
    int res = 1;
    int i;
    for (i = 2; i <= num; i++) {
        res *= i;
    }
    return res;
}



You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a dofollow link back to this page - see full license at CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind. Icons from table-icons.io copyright Paweł Kuna, licensed under MIT license.