Home  /  RSS  /  RSS Comments  /  RSS for Framework  /  Enter

Posts in category ‘Framework’.

Progress Report on CppCMS v1

Monday, August 17, 2009, by artyom ; Posted in: Progress, Framework; 3 comments

Its quite long time that most of the work is done in new refactoring branch... Meanwhile trunk stays silent. So, I decided to open a window and show some new changes:

There is still lot of work to make new version as useful as current CppCMS stable version:

But there are many good points that are already visible.

What's Next?

Sunday, May 3, 2009, by artyom ; Posted in: Progress, FastCGI, Framework; 10 comments

The road map of the project includes two important milestones:

  1. CppCMS core components refactoring including following:
    • Removal of dependency on CgiCC -- today there is about 5% of CgiCC library is used, many features are not supported by it or are not supported well. For example: file upload handling in CgiCC is very primitive, limited and error prone, support of cookies buggy and so on.
    • Using of Boost.Asio as internal event handler, because:
      1. It provides transparent synchronous and asynchronous event handling allowing future implementation of server push technologies.
      2. It provides efficient timer based event handling.
    • Removal dependency of libfcgi and writing Boost.Asio friendly implementation of FastCGI/SCGI connectors. Implementation of HTTP connectors as well.
    • Support of plug-in applications in CppCMS framework.
    • Improving compilation speed by representing more pimpl idioms and removal of unnecessary classes.
  2. Better support of i18n and and l10n:
    • Transparent support of std::wstring with forms including automatic encoding testing and conversion.
    • Support of std::locale for localization for outputs like numbers, dates, monetary, translation and so on.
    • Optional support of ICU and icu::UnicodeString and icu::Locale that would add unsupported features by std::locale and allow replacement std::locale features with more correct implementations provided by ICU.

These changes will significantly break API backward compatibility, but it would be possible to adopt the code almost "mechanically" to the new API.

Unicode in 2009? Why is it so hard?

Wednesday, April 15, 2009, by artyom ; Posted in: Framework, Unicode and Localization; 8 comments

From my point of view, one of the most missing features in C++ is the lack of good Unicode support. C++ provides some support via std::wstring and std::locale, but it is quite limited for real live purposes.

This definitely makes the life of C++ (Web) Developers harder.

However there are several tools and toolkits that provide such support. I had checked 6 of them: ICU library with bindings to C++, Java and Python, Qt3 and Qt4, glib/pango and native support of Java/JDK, C++ and Python.

I did little bit challenging test for correctness:

Basic features like encoding conversions and simple case conversion like "Артём" (my name in Russian) to "АРТЁМ" worked well in all tools. But more complicated test results were quite bad:

Results

TookitTo Upper CaseTo Lower CaseWord Boundaries
C++FailFailNo Support
C++/ICU‎OkOkOk
C++/Qt4‎OkFailOk
C++/Qt3‎FailFailNo Support
C/glib+pangoOkOkFail
Java/JDKOkOkFail
Java/ICU4jOkOkOk
PythonFailFailNo Support
Python/PyICU‎OkOkOk

Description

ICU: Provides great support but... it has very unfriendly and old API in terms of C++ development. The documentation is really bad.

Qt4: Gives good results and friendly API, has great documentation, but as we can see, some tests are failed. Generally, useful in web projects.

Qt3: Provides very basic Unicode support, no reason to use any more, especially when Qt4.5 is released under LGPL.

C++/STL: Even basic support exists, the API is not too friendly to STL containers and requires explicit usage of char * or wchar_t * and manual buffers allocation.

Glib: Gives quite good basic functionality. But finding word boundaries with Pango is really painful and does not work with Chinese. It has very nice C API and quite well documented. It uses internally utf-8 which makes the life easier when working with C strings. It still requires wrapping its functionality with C++ classes or grabbing huge GtkMM.

Python: has very basic native Unicode support. PyICU has terrible documentation.

Java: JDK provides quite good Unicode support, it can be quite easily replaced by ICU4J (actually most of JDK is based on ICU).

Summary

It is a shame that in 2009 there is no high quality, well documented, C++ friendly toolkit to work with Unicode.

When there will be Boost.ICU or Boost.Unicode just like there is Boost.Math or Boost.Asio?

CppCMS 0.0.4 Released

Saturday, February 21, 2009, by artyom ; Posted in: Progress, Framework, Cache; 0 comments

Version 0.0.4 of CppCMS had released.

It includes optimizations required for using it in embedded systems.

Normal Embedded Build:

Embedded CGI Mode:

Downloads are avialable from Sf Project Page.

CppCMS Going Embedded... or I need your help!

Sunday, February 15, 2009, by artyom ; Posted in: Progress, Framework; 2 comments

Recently I start understanding that embedded market may be very important market for CppCMS. So I did several tweaks to the code in order to support embedded systems:

  1. When the library is compiled for embedded system, caching system is totally removed, removed dependency on boost::iostreams and compression library.
  2. Mod-prefork is removed as much more memory consuming.
  3. Removed dynamic loading of templates.
  4. Option for cgi-only library given --- no scgi and and fastcgi APIs are compiled in, all remaining worker "mods" are removed.
  5. Session storage backend is simplified and optimized for cgi when it is compiled in embedded mode.

Everything was cross compiled for arm and tested with qemu-arm, but unfortunately I do not have an access to real ARM hardware with installed Linux system, so...

I need your help:

  1. Download following test_arm_embed.tar.gz
  2. Copy it to your ARM system and extract files.
  3. Try to run cgi script from command line:

     ./hello.dynamic -c config.txt
    

    This is "Hello World" that is dynamically linked with libstdc++. If it does not work try

     ./hello.static -c config.txt
    

    This is full statically compiled version of "Hello World" cgi script.

    You should get as output CGI headers and HTML output.

  4. Please, try to run it several times with:

     time ./hello.dynamic -c config.txt
    

    And tell the average run time.

  5. If you have a web server in your system I'd be very glad if you could test cgi script -- please edit it --- test.cgi to reflect correct executable and path.

I all works fine I'd be glad (if it is possible) to prepare a set of scripts that would test various aspects of cppcms as templates, various session backends and so on.

Thanks

next page

next page

Pages

Categories