Vely logo install examples
documentation about

14.2.0 released on Nov 29, 2022

Welcome to Vely




VelyWhat is Vely


Vely is an alternative to popular web languages and frameworks, with the peformance of C.

Vely is a general-purpose framework for C programming language, especially well suited for web applications. It's Free Open Source software.

Vely is not just for C developers, it's for everyone. You don't need to be a C expert. Check out examples and docs and see for yourself just how easy and powerful Vely is.



VelyWhy use it


You can develop applications with ease, ergonomics and productivity you expect. Why use other languages if you can just as rapidly build 100% native high-performance/low-footprint web applications? Vely offers easy and rapid development, without interpreters or byte-code schemes.

More on why Vely.



VelyWrite green software



C is the greenest programming language, meaning it consumes the least amount of energy and resources.

Consider this from MIT:

Cloud now has a greater carbon footprint than the airline industry, as well as massive impact on water supply. A single data center can consume the equivalent electricity of 50,000 homes. At 200 terawatt hours (TWh) annually, data centers collectively devour more energy than some nation-states.


Moore's law is slowing down, if not ending at some point in the near future. MIT researches explain how much bloat and performance loss is in the general purpose languages used today and how C can dramatically reduce energy and resource consumption:
Thompson and his colleagues showed that they could get a computationally intensive calculation to run some 47 times faster just by switching from [...] a popular general-purpose programming language, to the more efficient C. That’s because C, while it requires more work from the programmer, greatly reduces the required number of operations, making a program run much faster.


Vely is a general purpose C framework. The above is a special intensive calculation case, and Vely likely won't be 47 times faster, however clearly there is a lot of room to improve performance and to lower footprint. And with Vely, you may be equally productive as with other popular languages known for convenience and rapid development.



VelyWriting code


You write statement_APIs in C code just as you would any API. They are precompiled into C code, and cover just about anything: web, database, strings, files, flow and execution, encoding/encryption, time, error handling, daemon-izing code, and other common tasks (see documentation).

Vely statements generate C code. They are safer, largely self-explanatory and easier to write and maintain, and are more powerful than traditional C API. They also make code easy to read; that's just as important, if not more so, as the ease of writing code.


VelyWhat's it for


Write web applications, including REST APIs, or write command_line programs. Same code works as both.

Web applications run as FastCGI servers with standard reverse proxies such as Apache or Nginx for enhanced performance, safety and stability.

Database support is included (MariaDB, PostgreSQL, SQLite).

Use Vely for web applications, command-line programs, as middleware, database applications, services software, data integration, Internet Of Things (IOT)  and elsewhere. It is well-suited for cloud applications due to low resource requirements and because it is easy to containerize_applications.



VelyGetting started


Try 123_hello_world for a Hello World web application in minutes. Then, try examples for everything from a database example and a file manager to a multitenant SaaS application.


VelyStandard interface


A Vely application works by processing standard HTTP requests. This standardizes the program interfaces across the board.

This interface is extremely simple. Each request_URL by default states an application name and a request name which is the source file handling it. So, "/appname/mycode" means that application name is "appname" and that "mycode()" function defined in file mycode.vely will execute.

Read more about vely_architecture and how_vely_works.



VelyMaking application


Vely creates a Makefile for you and figures out libraries that need to be used. Your source code directory will be automatically scanned and made into an application.


VelyCode generation


Suppose you write a Vely statement like this:

call-web "http://website.com" response resp response-code rc \
    status len request-body files "file1"="uploadtest", "file23"="fileup4"

Vely will generate the C code to effectively POST a form to website.com that sends two local files to that server, and will get you the response code and status back. You can do this by using cURL library, but it will take quite a bit of C coding to do this. And there are many different combinations and things you can do, and the code gets generated to do it quickly, efficiently and safer each time, taking care of much error handling and edge cases automatically.

The same goes for exec-program, run-query, send-file, encrypt-data, read-json etc. All these things you can program yourself in C, but these statements are flexible and will quickly and safely do what you need.



VelyWhat's Vely like



void list_employees() {
    out-header default
    @<html><body>

    char *header = make_header(); // write any C code
    p-out header

    // Create report in outmsg string and fill it with database query result
    write-string define outmsg
        // Get data from the database
        run-query ="select name, salary from employees order by name" output name, salary
            @Name: <<query-result name>>
            @<br/>
            @Salary: <<query-result salary>>
            @<br/><br/>
        end-query
    end-write-string

    // Write report to a file and then to the client
    write-file "employees" from outmsg status define st
    if (st<0) {
        @Error in writing file (<<pf-out "%lld", st>>)
        exit-request
    } else {
        p-out outmsg
    }
    @</body></html>
}

Highlighted with Vely's syntax_highlighting using 2html.


VelyQuality control


Each Vely release must pass tests on every platform where it's available before it's released. There are currently 1092 such tests, see quality_control.


VelyNews - Releases


See release_notes for what's new in each release.


VelyAuthor


Sergio Mijatovic (vely@vely.dev).


VelyLicense


LGPL 3 for libraries, GPL 3 for tools


VelyOfficial website


https://vely.dev


VelyBugs, enhancements, feedback


See bugs_enhancements_feedback. You can post anonymously and report bugs, enhancement requests, documentation errors.


Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Some icons copyright Paweł Kuna licensed under MIT. Vely elephant logo copyright DaSoftver LLC. This web page is licensed under CC-BY-SA-4.0.