Home  /  RSS  /  RSS Comments  /  Enter

Preparing to Beta 2...

10/16/08, by artyom ; Posted in: Progress, Templates, Cache; 10 comments

What expected in the next beta version:

  1. Now CppCMS is really ready for serving high load sides, thanks to new distributed cache module based on Boost.Asio.

    Several CppCMS processes running on different computers can share same cache distributed over several TCP/IP cache servers.

  2. Staticly typed template system that fully integrated with the framework that allows:
    • "Django style" template inheritance.
    • Powerful extendsions abilities using C++ code directly.
    • Static compilation with generated templates code or loading templates as external shared objects.
    • Creates a potential for future "forms/widgets" integration.
  3. Various bugfixes and code cleanup.

Possibly included: form validation and generation modules.

to be Continued...

Comments

Coward, at 10/18/08, 4:33 AM

Hi,

You might also like to check this interesting project out: http://fastcgipp.com/

In particular the support for Session, Post, Get is quite easy.

Does cppcms support something like that??

Also cppcms apache module might be well received.

artyom, at 10/18/08, 9:47 AM

You might also like to check this interesting project out: http://fastcgipp.com/

Thanks for this link, this is really interestring.

In particular the support for Session, Post, Get is quite easy.

Does cppcms support something like that??

Even more, it supports acces to post/get requests via CgiCC library and gives much more: templates system, cache, many APIs like cgi/fastcgi/scgi and so on and so far.

Also cppcms apache module might be well received.

At some point it will probably be. However you have lot's of different APIs to connect CppCMS to different web servers.

Coward, at 10/20/08, 11:20 AM

Thanks for the info, I know about cgicc and do like cgicc, although I find the syntax html() << head() etc. quite different really.

However I wonder if you could add possible support for html-dom like syntax. You could possibly use http://codesynthesis.com/ to generate the C++ code from the html schema.

eg simple un-working example.

html_document = new html_document();
body = new htm_body();
document.add(body);
document.print(cppcms.out);

body_builder(html_body *body) :-)
{
  body.add(new html_div());
}

Also have you considered inviting other developers on this project too. A start might comp.c++.moderated newsgroup

artyom, at 10/20/08, 1:37 PM

I know about cgicc and do like cgicc, although I find the syntax html() << head() etc. quite different really.

I use it only for form processing and other non-html related information.

Also the solution you suggest is not good enough as well. There should no direct html generation in C++ code.

I have a template system (like .aspx/jsp etc.). Look at this code, template and the in the C++ code line 342. I just prepare content information and render template.

Generaly it is bad to create HTML in any language directly.

Also have you considered inviting other developers on this project too. A start might comp.c++.moderated newsgroup

I didn't published it there however, once it published in reggit. Meanwhile no too much volonteers. (However I get bug reports time to time)

Coward, at 10/21/08, 12:13 PM

Thanks for the info, the html-dom structure is useful in many cases.

However for the templating stuff have you checked out this from google. Can you incorporate this rather than implementing your own template system. http://goog-ctemplate.sourceforge.net/

Also one of the things I forgot to mention was that the fastcgipp has support for unicode, internally it uses wchar_t but all i/o is utf-8. Have you considered implementing as such?

artyom, at 10/21/08, 6:47 PM

Can you incorporate this rather than implementing your own template system. http://goog-ctemplate.sourceforge.net/

Ok, from what I have seen, goog-ctemplate is similar to tmpl-0.0.1 release. However, IMHO it seems to be less powerful, and defenatly less friendly. For example, in order to set value in old CppCMS template system you may just write:

cont["key"]=string("somevalue");
cont["int_key"]=10;

However, I had moved to other solution: staticly typed templates At this point, it seems to me that CppCMS templating system is very powerful, if not the most powerful system, for HTML code generation in C++.

Also one of the things I forgot to mention was that the fastcgipp has support for unicode

CppCMS uses internaly utf-8 as most C/C++ friendly encoding system. It has full internationalization support using thread-safe implementation of GNU Gettext, including support of RTL languages.

I do not have special facilities for work with wchar_t, but wchar itself is very problematic one. At Linux it represents utf32, at Windows ucs-16 or maybe variable length utf-16? And so far and so on.

So if you need specific things like "cutting" words correctly according to locale, it is quite easy to do in utf8 as well, more then that, you can always incorporate ICU library.

Meanwhile, CppCMS has great i18n support. See my Hebrew blog that works 100% on same software.

Bhushan, at 1/8/10, 7:21 AM

Good to read all those comments. But it is a little disappointing that it does not work for windows without cygwin. I would have loved to use this one. Are there any plans to support windows directly through an interface layer later? I understand that it is difficult to replicate the posix thread model provided by Linux in windows without cygwin. Yet is there something up your sleeves at the moment? Thanks.

artyom, at 1/9/10, 10:37 PM

Yes, CppCMS 1.x.x branch already supports Windows, CppCMS 0.0.x branch will never support it.

However, Windows support would always be in 2nd prioriy, because Windows is very unfriendly development platform, and it would not be recommended for production use.

For example, it is impossible to connect web application to "standard" Windows web server IIS because it's support of standard protocols like FastCGI/SCGI is very limited and you would have to run Apache in any case...

So, belive me, for CppCMS development use Linux.

Neel Basu, at 8/5/13, 6:36 PM

I agree with @coward creating an apache module from a CppCMS project will really be interesting. and I remember long years ago I wrote a similar (unfinished) library to generate HTML. though I'vent worked on that for several years. https://github.com/neel/cgixx/blob/master/src/myapp.cpp

void MyApp::subMain(){
    res<<"Hello "<<b()<<"Mars"<<b()<<endl;
    Js::Number x, y, z;
    x = 2;
    x = 5;
    y = 4 + x + -46.5;
    y += 2;
    z = x+y;
    res<<x<<y<<endl;
    Js::String m;
    m = "World";
    m = "Hello " + m + " I am Neel Basu!";
    res<<m<<endl;
    Js::Function f;
    f("fnc")<<"alert('Hello World')";
    res<<f<<endl;
    Js::Object o;
    o("Hello")  = 196;
    o("planet") = Js::String("World");
    o("math") = new Js::String("196 Algorithm");
    res<<endl<<endl<<o("math")->commit()<<endl<<endl;
    res<<o<<endl;
    Js::Array arr;
    arr << 555;
    arr << x;
    arr[0] = new Js::Number(25);
    res<<arr<<endl;
}
artyom, at 8/7/13, 11:27 AM

@Neel,

creating an apache module from a CppCMS project will really be interesting

Actually not. Apache would limit CppCMS abilities, for example it does not support asynchronous events. You can always run CppCMS over FastCGI or SCGI protocol which is better solution.

Add Comment:

 
 the email would not displayed
 

You can write your messages using Markdown syntax.

You must enable JavaScript in order to post comments.

Pages

Categories