Web++: A C++ Web Framework
131 subscribers
440 photos
36 videos
20 files
177 links
Web++ Framework (A C++ web framework to ease the pain of web development)

Using modern C++20/23.
GitHub: https://github.com/the-moisrex/webpp

I've been working on this project since 2019...
Download Telegram
Forwarded from The Moisrex
Old C++ was not a good language to do web dev in.
With a good web framework, C++ is totally capable of handling web development.
And it has many more features than other programming languages; specially in the world of TMP and compile-time execution.

I even talked about language features with the creator of JavaScript on twitter (I did not know who I was talking to at first 😁);
He believed we should strip down the features of a language to make sure it's easy to use; I believe, that's the libraries' implementer's job.
Code is not compile-able!
Web++: A C++ Web Framework
Kidding, now you can compile the project.
I'll keep the master branch compile-able from now on; but that means the master branch won't me the branch I'll be working on.
Media is too big
VIEW IN TELEGRAM
Working on the new routing system since I'm now hopefully done with the extension system.
It's a time-lapse of only 2hrs of coding.
The result is in the "dev" branch.
I'm moving from 80 characters limit per line into 110 characters limit per line.
Some lines became just absolutely unreadable. I had to do something about it.

Even though I like the project to have 80 chars limit, but because of so many meta programmings done in the project I had to do something about it.
Example of an application that you can write with the help of this frame work (soon enough God willing).

The code above is a pseudo code for now; but most of it are half implemented.
Turns out doing "ConceptType auto&&input" in argument list is not a the best way when you end up needing decltype(input).
The consts and references are in the way.
There are other ways to deal with this of course.
My types are not long enough. I should work on that! 😁
Web++: A C++ Web Framework
My types are not long enough. I should work on that! 😁
It's because of my "extension system" which does some meta programming to make sure the user of the library can add extensions to the router and all the descendants of the router can be instantiated with the exact type (including the extension types).

For example we can have an extension that parses HTTP cookies and the library user can just write:

ctx.request.headers.cookies["session"]
I should make a comedy show with the bugs I make :)
At the same time clang-format!!!
Till now GCC 10.1 was the best choice for this framework, now after adding this code, we'll be back to clang (even though currently clang does not support non-type template parameters which I'm planning to use).
Web++: A C++ Web Framework
Till now GCC 10.1 was the best choice for this framework, now after adding this code, we'll be back to clang (even though currently clang does not support non-type template parameters which I'm planning to use).
Even though GCC 10.1 is not able to compile the dev branch of this project now due to the internal compiler error, the clang 10.0.0 is able to compile it like a normal compiler :)
Forwarded from The Moisrex
Guess the keyword that have been troubling me for days now. Just one keyword; Its existence is troublesome, its lack of existence would require me to completely remove the mother extensions and only use the child extensions.