Pardon me. This documentation is still in development.

Why should I use this framework?

The main objective of 3FD is to help C++ programmers to code their applications faster writing less boiler plate code. These are the main features provided by the framework:
  • An error handling infrastructure with stack tracing
  • A simplified model for heterogeneous programming backed by OpenCL
  • A OOP+RAII model for relational data access backed by SQLite embedded engine
  • A OOP+RAII model for ISAM data access backed by Microsoft ESE
  • Helpers & wrappers around Microsoft WWS API, for quick development of SOAP web services
  • Helpers & wrappers around Microsoft RPC API, for quick development of RPC servers and clients
  • Garbage collection

How to use 3FD

Previous versions of the framework were available as compiled DLL's deployed by an msi installer, and that was part of the mentality when the framework was thought to behave like a COM component. However, after working with portions of the framework on the field, I came to the conclusion that C++ programmers are better served with a distributed source code of a highly modularized framework solution.

Basically, you download the source code where the main project is the framework. For Windows platform, Visual Studio 2012 (can be Express) or later is required. A port for POSIX is available and you can take a look here. Because this project is a static library, your solution can link to it, and only what is necessary is ever linked to your final build. Projects for unit and integration tests are also present in the source.

3FD makes use of both POCO and Boost, so you need to have them in your system. Also, in Windows Visual Leak Detector is used to control memory leaks, but you can rule this out of the dependencies if you want, by just erasing the #include <vld.h> in preprocessing.h

System Requirements

Application built using the framework require at least Windows Vista (or Server 2008). The main reason for such dependency is because these Windows versions introduced several improvements in the Win32 API that help this framework to be faster.

The project is currently being developed in Visual Studio 2015 Community Update 3 and it uses C++11 language features like lambdas and variadic macros. That's why the client application has to be compiled in a C++11 compliant compiler. Currently, the only compilers I know to be capable of it are the Microsoft Visual C++ 2013 and 2015 (including Express and Community editions) and Clang v3.3 (or later) with libc++.

The distributions of MinGW for Windows based on GCC 4.7 are still not compatible. They are not C++11 compliant enough, rather because of the Standard Library implementation which is a little outdated compared to MSVC. The same problem was verified in Linux. Because of that, Clang and libc++ were chosen in the POSIX port of 3FD.

Setting up your build environment to use 3FD

First you need to compile the framework. Remember POCO (libraries Foundation, XML and Util) and Boost are dependencies that must be present and built by your development environment. The Visual Studio solution uses the macro variables BOOST_HOME and POCO_ROOT (set in the property sheets) to find the location of these libraries. The procedure for the POSIX port is here.

Once the framework is compiled, you are going to set up your solution to link to the framework just like you do for any other static library. Then there are just a couple of things to set:
  • Define the macro ENABLE_3FD_CST in your environment so as to enable the stack tracing feature in your release (recommended);
  • Provide a XML configuration file for the framework instance used by you application. This file must have the same name of the application executable (including the extension) plus ".3fd.config". A template for this file is provided in the source.

Now you are ready to go!

A quick start guided by examples

For a quick start, please refer to the source code where you can find examples of utilization:

SOURCE CODE >> Files >> IntegrationTests/TestRpcClient/TestWwsClient/VideoTranscoder

This is rather the integration tests used in the framework development. Because it covers all important features of 3FD, newcomers can use it as a pretty comprehensive sample code. (The googletest framework syntax for "assert's" and "expect's" do obfuscate it a litte bit, but not that much.)

Also, every application that makes use of 3FD needs to provide a XML file that configures the framework instance in use by the application. This file is of utter importance. It controls the behavior of all the components of the framework instance, from GC tunning to error reporting settings. For an example, please refer to:

SOURCE CODE >> Files >> IntegrationTests >> application.config

Last edited Jan 19 at 12:12 AM by faburaya, version 174

Comments

No comments yet.