Hello! [Log in]
CollEntRes C++ library for high performance websites

C++ MVC Web Framework

Collection Entity Resource

About Framework

CollEntRes (Collection-Entity-Resource) is a C++ library for developing high performance websites. It is designed to be super efficient. Websites, which use this library, can be hosted on cheaper machines and work faster than websites, which are hosted on expensive machines and were written using other web technologies.

This library represents a MVC (Model-View-Controller) framework that is very convenient to develop (and support) dynamic web pages with a lot of pages and different data. The code of a CollEntRes based website includes controllers, views and three different classes of models:

  • Collection. An object of this class contains a set of entities and has member functions to add/extract/delete them.
  • Entity. An object of this class has a set of member variables that is usually similar to the set of columns of the appropriate DB table, it has member functions to get/set values, params and work with relations. An entity can have references to related entities (1:1 relation) or collections (1:n relation).
  • Resource. An object of this class has member functions to retrieve collections or entities from DB and save them to DB.

Framework Features

The age of interpreted languages for web programming is over. The time of compiled languages has come.

  • Model-View-Controller pattern where models are split into collections, entities and resources. The framework includes base classes for collections, entities and resources, which have a lot of member functions, which are usually used in any website code.
  • Possibility to define relations (1:1, 1:n and n:n) between entities. Visit How to Use page to see how easily you can select related data from DB by defining relations.
  • CHTML view template system. It was implemented specifically for CollEntRes framework. A CHTML view file contains HTML markup where you can use C++ code (between template special open and closed tags) that makes this view template system the best and the most convenient. Also HTML markup between special template tags is minified on the stage of view file compilation.
  • Deflate compression of output. It is useful when web server software does not support FastCGI output compression.
  • Handling of "URL encoded" and "multipart form data" request body. File upload and cookie management support.
  • Support of memory sessions.
  • Form field validation classes and controller access classes.
  • Caching of entire collections with entities (which can also have related objects) in memory for cross-request usage.
  • Classes for dynamic building SELECT, INSERT, UPDATE and DELETE SQL queries.
  • Functions for phrase translation into different languages for multi-language websites in Gettext style (incl. plurals and contexts), classes for phrase string extraction from C++ and JavaScript code, etc.
  • Classes for convenient work with date and time with support of timezones in PHP style.
  • HTML parser in jQuery style.
  • Base class to work with REST API. You can extend this class and create your own derived classes which make requests to API services to get or post some data.
  • General functions and helpers, which are usually used in any website, string manipulation functions, regular expressions, functions to work with images, hashing functions, file access functions, structs, etc.

Advantages Over Other Frameworks

  • A CollEntRes website uses C++ compiled language that makes it work much more efficient than website that uses an interpreted language. Your website's code is executed by your machine directly.
  • CollEntRes framework uses three different types of models (resource, entity and collection) and special structure of project folders in order to make development and support of large websites more convenient.
  • The best view template system where you can use any C++ statement, define layouts or include partials.
  • Many possible errors can be eliminated on the stage of compilation. When a developer writes a website using some interpreted language, he/she can't fix some errors during programming and they can cause problems on production.
  • You can use your favourite web server software with FastCGI support (like Apache, Lighttpd, etc). You can define your URL logic, handle static files and define access rules there.

Share via Facebook