Home  /  RSS  /  RSS Comments  /  RSS for Progress  /  Enter

Posts in category ‘Progress’.

CppCMS 1.2.1 - security update was released today

Friday, May 18, 2018, by artyom ; Posted in: Progress; one comment

Security Bug Fixes:

Bugs Fixed:

Changes:

Special Thanks to Khaled Yakdan from code-intelligence.de for reporting this security issue

CppCMS 1.1.1 Release Candidate 1 is Available

Sunday, December 3, 2017, by artyom ; Posted in: Progress; 0 comments

New version includes following changes:

CppCMS 1.1.0 Beta was released

Tuesday, July 11, 2017, by artyom ; Posted in: Progress; 0 comments

After the goals for 1.2 were completed I announce official CppCMS 1.1.0 beta (stable will be 1.2.0)

It is available on the usual place:

https://sourceforge.net/projects/cppcms/files/cppcms/1.1.0-beta/cppcms-1.1.0.tar.bz2

It includes many new and important features:

http://cppcms.com/wikipp/en/page/cppcms_1_2_whats_new

Now I ask the community to fully participate in beta testing so 1.2 will be released ASAP.

Goals for beta testing

Framework Unit Test:

  1. Download the beta version, build, run tests
  2. Report on what platform you tested: OS, Compiler version, standard library (libstdc++/libc++)
  3. Have you had any tests failed and if you had please attach Testing/Temporary/LastTest.log and CMakeCache.txt from your build directory

I specially need tests on Mac OS X various versions, various ARM platforms like raspberry pi and Windows different compilers

Compatibility Test:

  1. Try to build your existing applications with latest version, report any problems
  2. If you have been using CppCMS 1.0.5 till now please try to build CppCMS 1.1.0 and run existing programs with new shared objects/dll WITHOUT rebuilding your applications - it must work as is!

Feature Test:

Go to: http://cppcms.com/wikipp/en/page/cppcms_1_2_whats_new

And try some of new features, report any issues with them or any problems with API design.

If all goes smoothly I'll release 1.2.0 - official stable version.

CppCMS code migrated to GitHub

Wednesday, March 1, 2017, by artyom ; Posted in: Progress; one comment

After multiple requests and my final decision the CppCMS web framework code migrated to GitHub

https://github.com/artyom-beilis/cppcms

Please note:

  1. Only CppCMS framework migrated, other subprojects like CppDB or Wikipp are still pending conversion
  2. The main bug tracker is still on source-forge - however I'll relate to issues opened on GitHub

Session Sharing with Non-CppCMS technologies

Monday, November 16, 2015, by artyom ; Posted in: Progress; one comment

One of the problems in integrating different technologies on same web site is sharing the data between them, in particular sharing session data.

For example you have a huge web platform written in PHP or Java and you want to improve performance of certain subsystems poring them to CppCMS. On of the first issues you'd encounter is how to share the session between them - so every side would know who is the user, what permissions he has, etc.

So I made cppcms::session_pool and cppcms::session_interface accessible outside the usual request/response scope and wrapped it with pure C API - such that no C++ exceptions are thrown and every function is resolvable via dlopen/GetProcAddress- to make it more accessible for integration with different languages.

Several modules for different programming languages were implemented allowing smooth integration with their web frameworks and APIs:

Actually there is no particular limits regarding technology - just a question of implementing loadable module for a specific language/platform.

In general it consists of a SessionPool object that is created from a configuration file and exists globally. It generates a special Session objects that is loaded from Http Request cookies, updated and saved to the Http Response object.

It looks like this:

PHP:

// pool initialization
$pool=CppCMS_SessionPool::from_config('cppcms-config.js');
// per request session access
$session=$pool->session();
$session->load();
$x=0;
if($session->is_set('x')) {
        $x=$session['x'];
}

$x=intval($x)+1;
$session['x']=$x;
$session->save();
...

Java/Servlet:

static SessionPool pool;

public void init() throws ServletException
{
    pool = SessionPool.openFromConfig("/path/to/cppcms-config.js");
}

public void doGet(HttpServletRequest request,
                  HttpServletResponse response) 
                    throws ServletException, IOException
{
    Session session = pool.getSession();
    session.load(request);
    String x="0";
    if(session.isSet("x"))
        x=session.get("x");
    x=Integer.toString(Integer.parseInt(x)+1);
    session.set("x",x);
    session.save(response);
    session.close();
    ...
}

Python with Django:

# Create global pool
pool=cppcms.SessionPool('/path/to/cppcms-config.js')

# Actual view
def home(request):
    s=pool.session()
    s.load(django_request=request)
    v='0'
    if 'x' in s:
            v= s['x']
    s['x']=str(int(v)+1)
    response = HttpResponse()
    s.save(django_response=response)
    ...

C#/ASP.Net:

static SessionPool pool;
static Example() {
    pool = SessionPool.FromConfig("cppcms-config.js");
}
protected void Page_Load(object sender,EventArgs e)
{
    using(Session s = pool.Session()) {
        s.Load(Request);
        string v="0";
        if(s.IsSet("x"))
            v=s["x"];
        v = (int.Parse(v) + 1).ToString();
        s["x"]=v;
        s.Save(Response);
    }
    ...
}

So basically you have a full access to CppCMS session from 3rd party most popular technologies.

Still thinking of implementing a module for Ruby on Rails but I have never written a line of code in Ruby so it is quite challenging for me. I'll probably wait till somebody contributes one.

next page

Pages

Categories