Welcome to Flero++!

Welcome to Flero++! We are thrilled to have you as a new user on our web framework. Flero++ is a powerful and flexible tool designed to help developers create dynamic web applications with ease. Whether you are a seasoned C++ developer or just starting out, Flero++ has everything you need to build robust and scalable applications.

Thank you for choosing Flero++ as your web development framework, and we look forward to seeing what you create with it.

Note: As you are reading the welcome page on your web browser, you should also refer back to the source code for maximum usage of the page.

Automatic Recompilation

One of the most important features of Flero++ is the automatic recompilation built-in, which makes it easy for users to see the results of their changes in real-time. By simply editing the source code and refreshing the web browser, users can immediately see the updated version of the web page. This feature eliminates the need for manual compilation, making web development faster and more efficient.

Give it a try!

Find this example in the get method of the source code and uncommenting the next line of "code", save the source file, and then press refresh button on your browser.

HTML Templating Libraries
What are the HTML Templating Libraries?

HTML Literals and streams are C++ libraries included in Flero++ web framework that aim to simplify the process of writing HTML code in C++. These libraries eliminate the need for all the boilerplate code that is typically required in vanilla C++ to generate a line of HTML. By using HTML Literals and streams, developers can focus on creating great web applications without worrying about the details of C++.

What is HTML Literals?

Fun fact: the entire welcome page you see on Flero++ web framework is actually made using the HTML Literals library! The HTML Literals library allows developers to write HTML code using vanilla HTML syntax, with minimal C++ boilerplate code required for each line. This makes writing HTML code in C++ as easy and intuitive as possible.

In addition to simplifying the process of writing HTML code, the HTML Literals library in Flero++ web framework also allows for easy insertion of variables or small lines of code into HTML literal lines. By using HTML Literals library, developers can seamlessly integrate C++ code with HTML code, making the development process faster and more efficient. Below this line is an example of code insertion.

To show an example of code insertion, here is a random number generator: 1967513926 (hint: Try refreshing the page! You will see the number change everytime.)

What is HTML Streams?

The entire HTML Streams section is made using the HTML Streams library! This library takes advantage of the insertion stream operator (<<) in C++, which is a familiar tool for seasoned C++ developers. The HTML Streams library is particularly useful for inserting into large HTML elements, such as div, body, and other similar elements.


Processing and using user-input
What is the Request Data class?

The Flero++ web framework also has the ability to handle user input into web pages with ease, thanks to the Request Data class. This class contains many ways to handle user input, such as query strings, form text, and file uploads. The Request Data class automatically parses this information, making it ready to use without the need for developers to understand the inner workings of HTTP protocol.

By using the Request Data class, developers can create web applications that are more interactive. This class allows developers to easily collect and process user input, enabling them to create web applications that are tailored to the needs of their users.

Here is an example of form text using an Iframe and a post method:

Name
Database Operations
Connecting to a Database

Flero++ provides a handy way to connect to a database and operate on data within it.

All you have to do as a developer is to tell Flero++ your database connection info in the config file and the connection will be established automatically when the FPM is executed.

CRUD Operations on Database

SQL is the foundation of all data operations, but it is not always easy to write. Therefore, Flero++ incorporates a SQL Builder library where you can construct a SQL statement declaratively and run the statement whenever you want with just one function call.

Here is an example of doing CRUD operations within Flero++ (use the drop-down menu to select operations you want to carry out):

Id:
Username:
Password:
Select DB operation:
IDUsernamePassword
4 test 1234
5 somebody password
6 foo 123