From 5208205ced17325463dc62f4c7cf5388134aa1f7 Mon Sep 17 00:00:00 2001 From: Oleg Kl Date: Thu, 7 Aug 2025 12:48:34 +0500 Subject: [PATCH 1/4] docs(technologies): #5: add compiler selection criteria --- docs/technologies.md | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/docs/technologies.md b/docs/technologies.md index 06456c4..8f144c1 100644 --- a/docs/technologies.md +++ b/docs/technologies.md @@ -66,6 +66,56 @@ For this project, Manager 1 is optimal because: ## Compiler +### Overview + +**Definition:** Programs that translate source code written in C++ into machine code or intermediate code executable by a computer. + +**Purpose:** Efficiently and correctly convert human-readable code into optimized binary files, while providing useful diagnostic messages to support developers during build and debugging. + +### Selection Criteria + +#### Key factors for decision-making: + +- Support of target platforms (Linux, Windows, macOS) +- Compliance and support of modern C++ standards +- Quality and readability of diagnostic messages (errors and warnings) +- Performance and optimization capabilities +- Integration with IDEs and toolkits +- Compatibility with selected package managers (e.g. Conan) + +### Comparative Table of Popular Solutions + +| Criterion | **GCC** | **Clang** | +|-------------------------|------------------------|-------------------------------------------| +| Cross-platform | + | + | +| Bug Diagnostics | + (less readable) | + (clear and informative) | +| C++ Standards Support | + | + | +| Performance | TOP | LESS THAN GCC | +| Integration with IDE | + | + (more supported tools) | + +### Rationale for Selection + +#### Why Clang – Chosen solution + +- Provides better bug reports, improving the developer experience. +- Better integration with modern IDEs and toolkits. +- Rapid adoption of new C++ standards. +- Modular and extensible architecture, support for advanced tools. + +#### Why not GCC? + +- Less readable and informative error and warning messages. +- Slower to implement new C++ standards. +- Less modularity and extensibility compared to Clang. + +### Practical Considerations + +For this boilerplate C++ backend template that is: +- **Clang** is often preferred in modern C++ projects because of its more readable and informative error messages, which speeds up debugging and makes life easier for developers. +- **Clang** provides better compliance with modern C++ standards and faster support for new language features, allowing you to utilize the latest tools and practices. +- Clang's modular architecture and extensibility make it easy to fit into modern tools for static analysis, automatic formatting, and other integrations. +- **GCC** remains the most reliable and productive solution with proven stability and is widely used. Therefore, it can be kept as a fallback compiler for extended compatibility. + ## Build system ## Web Framework From 9f365c026e7b8354df7e72ee6f08cea3bc636615 Mon Sep 17 00:00:00 2001 From: Oleg Kl Date: Thu, 7 Aug 2025 13:18:27 +0500 Subject: [PATCH 2/4] docs(technologies): #5: add build system selection criteria --- docs/technologies.md | 65 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/docs/technologies.md b/docs/technologies.md index 8f144c1..e95acb0 100644 --- a/docs/technologies.md +++ b/docs/technologies.md @@ -81,7 +81,7 @@ For this project, Manager 1 is optimal because: - Quality and readability of diagnostic messages (errors and warnings) - Performance and optimization capabilities - Integration with IDEs and toolkits -- Compatibility with selected package managers (e.g. Conan) +- Compatibility with selected package managers (e.g. Conan, vcpkg) ### Comparative Table of Popular Solutions @@ -99,8 +99,8 @@ For this project, Manager 1 is optimal because: - Provides better bug reports, improving the developer experience. - Better integration with modern IDEs and toolkits. -- Rapid adoption of new C++ standards. -- Modular and extensible architecture, support for advanced tools. +- Rapid implementation of new C++ standards. +- Modular and extendable architecture, support for advanced tools. #### Why not GCC? @@ -111,13 +111,66 @@ For this project, Manager 1 is optimal because: ### Practical Considerations For this boilerplate C++ backend template that is: -- **Clang** is often preferred in modern C++ projects because of its more readable and informative error messages, which speeds up debugging and makes life easier for developers. -- **Clang** provides better compliance with modern C++ standards and faster support for new language features, allowing you to utilize the latest tools and practices. -- Clang's modular architecture and extensibility make it easy to fit into modern tools for static analysis, automatic formatting, and other integrations. +- **Clang** is often preferred in modern C++ projects because of its more readable and informative error messages, which speeds up debugging and easier for developers. +- **Clang** provides better compliance with modern C++ standards and faster support for new language features. +- **Clang** modular architecture and extensibility make it easy to fit into modern tools for static analysis, automatic formatting, and other integrations. - **GCC** remains the most reliable and productive solution with proven stability and is widely used. Therefore, it can be kept as a fallback compiler for extended compatibility. ## Build system +### Overview + +**Definition:** Tools that automate and manage the build process of software projects, including linking binaries, managing dependencies and build configurations. + +**Purpose:** Reliably and efficiently organize the build process, cross-platform compatibility and integration with other tools (e.g. package managers, CI/CD pipelines). + +### Selection Criteria + +#### Key factors for decision-making: + +- Cross-platform build support +- Flexibility and scalability for complex and multi-project environments +- Integration with popular compilers and package managers +- Support for CI/CD and containerized environments +- Easy configuration and maintenance +- IDE support + +### Comparative Table of Popular Solutions + +> NOTE: Ninja is a low-level build executor that is responsible for fast and efficient incremental builds of a project. Unlike systems such as **CMake** or **Meson**, Ninja is not a build file generator and is not intended for manually writing build scripts. + +| Criterion | **CMake** | **Ninja** | **Meson** | +|-------------------------|-----------------------------|---------------------------|-------------------------------| +| Cross-platform support | + | + | + | +| Flexibility | + | depends on generator | + | +| IDE integration | + | + | + (less than CMake) | +| CI/CD support | + | + | + | +| Configuration simplicity| - (more difficult for beginners) | − (requires a generator) | + | + +### Rationale for Selection + +#### Why CMake + Ninja – Chosen solution + +- **CMake** is an industry standard for build generation, very flexible and well supported in large and multi-project developments. +- Excellent integration with package managers (e.g. Conan, vcpkg). +- Allows you to generate build files for different backends, including **Ninja**. +- **Ninja** provides very fast incremental builds, which is especially important for frequent rebuilds in CI/CD and containers. +- This combination provides a balance between flexibility and build speed. + +#### Why not Meson? + +- It has a less mature ecosystem and less integration with IDEs than **CMake**. +- More suitable for experiments or PET projects. + +### Practical Considerations + +For this boilerplate C++ backend template that is: +- **CMake** is an industry standard with high flexibility and support for complex, multi-project builds, and integrates well with package managers and CI/CD. +- **Ninja** provides high speed incremental builds and minimal latency for frequent rebuilds, critical for dev containers and automated pipelines. +- The combination of **CMake + Ninja** gives a balance between configuration convenience and build performance. +- **Meson** is suitable for simple projects and quick customization, but is less common and has less integration with large tooling ecosystems. +- For a scalable and cross-platform to-dos-api-cpp template, **CMake + Ninja** remains the optimal choice for their universality and speed. + ## Web Framework ## ORM From a2b3142a950c3356175b01d0ff1a8178167dd57f Mon Sep 17 00:00:00 2001 From: Oleg Kl Date: Thu, 7 Aug 2025 13:28:18 +0500 Subject: [PATCH 3/4] docs(technologies): #5: add table of content --- docs/technologies.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/technologies.md b/docs/technologies.md index e95acb0..4c39220 100644 --- a/docs/technologies.md +++ b/docs/technologies.md @@ -1,5 +1,39 @@ # Applied technologies +## Table Of Content + +- [C++](#c--) +- [Package manager](#package-manager) + * [Overview](#overview) + * [Selection Criteria](#selection-criteria) + + [Key factors for decision-making:](#key-factors-for-decision-making-) + * [Comparative Table of Popular Solutions](#comparative-table-of-popular-solutions) + * [Rationale for Selection](#rationale-for-selection) + + [Why Conan? (Chosen solution)](#why-conan-chosen-solution) + + [Why not vcpkg?](#why-not-vcpkg) + * [Practical Considerations](#practical-considerations) +- [Compiler](#compiler) + * [Overview](#overview-1) + * [Selection Criteria](#selection-criteria-1) + + [Key factors for decision-making:](#key-factors-for-decision-making-1) + * [Comparative Table of Popular Solutions](#comparative-table-of-popular-solutions-1) + * [Rationale for Selection](#rationale-for-selection-1) + + [Why Clang? (Chosen solution)](#why-clang-chosen-solution) + + [Why not GCC?](#why-not-gcc) + * [Practical Considerations](#practical-considerations-1) +- [Build system](#build-system) + * [Overview](#overview-2) + * [Selection Criteria](#selection-criteria-2) + + [Key factors for decision-making:](#key-factors-for-decision-making-2) + * [Comparative Table of Popular Solutions](#comparative-table-of-popular-solutions-2) + * [Rationale for Selection](#rationale-for-selection-2) + + [Why CMake + Ninja? (Chosen solution)](#why-cmake-ninja-chosen-solution) + + [Why not Meson?](#why-not-meson) + * [Practical Considerations](#practical-considerations-2) +- [Web Framework](#web-framework) +- [ORM](#orm) +- [E2E Tests](#e2e-tests) + ## C++ ## Package manager From 02af625bff99e56fabad4f289d5820cae779add8 Mon Sep 17 00:00:00 2001 From: Oleg Kl Date: Tue, 12 Aug 2025 12:28:14 +0500 Subject: [PATCH 4/4] docs(technologies): #5: add more arguments for compiler and build systems --- docs/technologies.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/technologies.md b/docs/technologies.md index 7ed330b..de51187 100644 --- a/docs/technologies.md +++ b/docs/technologies.md @@ -2,14 +2,14 @@ ## Table Of Content -- [C++](#c--) +- [C++](#c) - [Package manager](#package-manager) * [Overview](#overview) * [Selection Criteria](#selection-criteria) - + [Key factors for decision-making:](#key-factors-for-decision-making-) + + [Key factors for decision-making:](#key-factors-for-decision-making) * [Comparative Table of Popular Solutions](#comparative-table-of-popular-solutions) * [Rationale for Selection](#rationale-for-selection) - + [Why Conan? (Chosen solution)](#why-conan-chosen-solution) + + [Why Conan – Chosen solution](#why-conan–chosen-solution) + [Why not vcpkg?](#why-not-vcpkg) * [Practical Considerations](#practical-considerations) - [Compiler](#compiler) @@ -18,7 +18,7 @@ + [Key factors for decision-making:](#key-factors-for-decision-making-1) * [Comparative Table of Popular Solutions](#comparative-table-of-popular-solutions-1) * [Rationale for Selection](#rationale-for-selection-1) - + [Why Clang? (Chosen solution)](#why-clang-chosen-solution) + + [Why Clang – Chosen solution](#why-clang-chosen-solution) + [Why not GCC?](#why-not-gcc) * [Practical Considerations](#practical-considerations-1) - [Build system](#build-system) @@ -27,7 +27,7 @@ + [Key factors for decision-making:](#key-factors-for-decision-making-2) * [Comparative Table of Popular Solutions](#comparative-table-of-popular-solutions-2) * [Rationale for Selection](#rationale-for-selection-2) - + [Why CMake + Ninja? (Chosen solution)](#why-cmake-ninja-chosen-solution) + + [Why CMake + Ninja – Chosen solution](#why-cmake-ninja-chosen-solution) + [Why not Meson?](#why-not-meson) * [Practical Considerations](#practical-considerations-2) - [Web Framework](#web-framework) @@ -150,6 +150,7 @@ For this boilerplate C++ backend template that is: - Less readable and informative error and warning messages. - Slower to implement new C++ standards. - Less modularity and extensibility compared to Clang. +- GCC is not supporting popular developers tools like linters and autoformatters. ### Practical Considerations @@ -157,6 +158,7 @@ For this boilerplate C++ backend template that is: - **Clang** is often preferred in modern C++ projects because of its more readable and informative error messages, which speeds up debugging and easier for developers. - **Clang** provides better compliance with modern C++ standards and faster support for new language features. - **Clang** modular architecture and extensibility make it easy to fit into modern tools for static analysis, automatic formatting, and other integrations. +- **Clang** uses the most popular developer tools for automatic formatting and linting to be used in the project. **GCC** does not have such close integration with them. - **GCC** remains the most reliable and productive solution with proven stability and is widely used. Therefore, it can be kept as a fallback compiler for extended compatibility. ## Build system @@ -204,6 +206,8 @@ For this boilerplate C++ backend template that is: - It has a less mature ecosystem and less integration with IDEs than **CMake**. - More suitable for experiments or PET projects. +- Integration with package managers is less common. +- **Meson** has less configuration flexibility, and the larger the project gets, the more the meson project loses flexibility. ### Practical Considerations