cppcms-users Mailing List for CppCMS C++ Web Framework (Page 54)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
| 2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
| 2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
| 2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
| 2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
| 2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
| 2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
| 2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
| 2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
| 2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Yiown S. <yi...@gm...> - 2013-06-06 15:23:03
|
Perfect! you are right i didn't extracted the tar file. can that be
automated?
In the other hand i am getting these test failing:
23 - internal_forwarder_test (Failed)
24 - forwarder_test (Failed)
27 - http_timeouts_test_write (Failed)
Thanks Marcel.
On Thu, Jun 6, 2013 at 12:05 PM, Marcel Hellwig <ke...@co...> wrote:
> see the link i provided
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
|
|
From: Marcel H. <ke...@co...> - 2013-06-06 15:05:56
|
see the link i provided |
|
From: Yiown S. <yi...@gm...> - 2013-06-06 15:05:01
|
No, i did: svn co https://svn.code.sf.net/p/cppcms/code/framework/trunk cppcms On Thu, Jun 6, 2013 at 11:59 AM, Marcel Hellwig <ke...@co...> wrote: > did you > > tar xvf cppcms_boost.tar.bz2 > ? > > http://cppcms.com/wikipp/en/page/cppcms_1x_build > > Regards > > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
|
From: Marcel H. <ke...@co...> - 2013-06-06 14:59:44
|
did you > tar xvf cppcms_boost.tar.bz2 ? http://cppcms.com/wikipp/en/page/cppcms_1x_build Regards |
|
From: Yiown S. <yi...@gm...> - 2013-06-06 14:36:49
|
Hi Artyom, I just did a clean svn checkout and tried to compile the project. The file cppcms_boost/bind.hpp is no longer in the repository. But some files still tries to include it. In some of these files i saw a preprocessor flag CPPCMS_USE_EXTERNAL_BOOST which bypass the include and instead includes the normal boost version of the bind.hpp. So i placed the flag in the compilation and still some of the files would not compile, since they do not even check for the preprocessor flag. The files are: private/prefork_acceptor.h src/http_api.cpp src/session_pool.cpp src/tcp_cache_server.cpp Once i updated these files with the preprocessor directives it compiled ok. It looks like cppcms_boost/bind.hpp was removed by accident, or the include points were not updated. In any case. Hope this helps. Regards. |
|
From: Artyom B. <art...@ya...> - 2013-06-02 13:33:45
|
the spelling corrections are more than welcome, about the error handling improvements, talk to me first. because such a changes should be backend wide... Also ABI compatibiliy is important I just don't want you to work on something that I would not except ------------------------------ On Sat, Jun 1, 2013 12:24 PM IDT Petr Janda wrote: >Cheers, > >I actually started writing a new function called statement::exec_wr() >(exec with result), when I received your reply, but it seems it's not >necessary now. > >I might spend some time doing some minor improvements to cppdb - mostly >spelling corrections, better error handling. > > >Would you be interested? > >Petr > > >On 1/06/2013 5:58 PM, Artyom Beilis wrote: >> >> >> >> just use query. the only difference between query and exec is wheather the statement returns result >> >> artyom >> >> ------------------------------ >> On Sat, Jun 1, 2013 10:15 AM IDT Petr Janda wrote: >> >> Hi Artyom, >> >> I'm using PostgreSQL and it has the option to return result from an >> insert statement. Such as >> >> INSERT into table(...) values(...) RETURNING uuid >> >> In which case statement::exec() should be able to return result instead >> of VOID. >> >> I don't think it's possible to use statement::sequence_last() because >> the primary key for the table is not a named sequence (ie. serial data >> type), but an UUID. >> >> Is there currently anyway to use this PostgreSQL feature, without having >> to do a SELECT query following the INSERT to get the last created UUID? >> >> Cheers, >> >> >> -- >> Please use PGP to encrypt your email to ensure our privacy is respected. >> >> >> >> ------------------------------------------------------------------------------ >> Get 100% visibility into Java/.NET code with AppDynamics Lite >> It's a free troubleshooting tool designed for production >> Get down to code-level detail for bottlenecks, with <2% overhead. >> Download for free and get started troubleshooting in minutes. >> http://p.sf.net/sfu/appdyn_d2d_ap2 >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > >-- >Please use PGP to encrypt your email to ensure our privacy is respected. > |
|
From: Petr J. <ele...@ex...> - 2013-06-01 09:24:25
|
Cheers, I actually started writing a new function called statement::exec_wr() (exec with result), when I received your reply, but it seems it's not necessary now. I might spend some time doing some minor improvements to cppdb - mostly spelling corrections, better error handling. Would you be interested? Petr On 1/06/2013 5:58 PM, Artyom Beilis wrote: > > > > just use query. the only difference between query and exec is wheather the statement returns result > > artyom > > ------------------------------ > On Sat, Jun 1, 2013 10:15 AM IDT Petr Janda wrote: > >> Hi Artyom, >> >> I'm using PostgreSQL and it has the option to return result from an >> insert statement. Such as >> >> INSERT into table(...) values(...) RETURNING uuid >> >> In which case statement::exec() should be able to return result instead >> of VOID. >> >> I don't think it's possible to use statement::sequence_last() because >> the primary key for the table is not a named sequence (ie. serial data >> type), but an UUID. >> >> Is there currently anyway to use this PostgreSQL feature, without having >> to do a SELECT query following the INSERT to get the last created UUID? >> >> Cheers, >> >> >> -- >> Please use PGP to encrypt your email to ensure our privacy is respected. >> > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Please use PGP to encrypt your email to ensure our privacy is respected. |
|
From: Artyom B. <art...@ya...> - 2013-06-01 07:58:51
|
just use query. the only difference between query and exec is wheather the statement returns result artyom ------------------------------ On Sat, Jun 1, 2013 10:15 AM IDT Petr Janda wrote: >Hi Artyom, > >I'm using PostgreSQL and it has the option to return result from an >insert statement. Such as > >INSERT into table(...) values(...) RETURNING uuid > >In which case statement::exec() should be able to return result instead >of VOID. > >I don't think it's possible to use statement::sequence_last() because >the primary key for the table is not a named sequence (ie. serial data >type), but an UUID. > >Is there currently anyway to use this PostgreSQL feature, without having >to do a SELECT query following the INSERT to get the last created UUID? > >Cheers, > > >-- >Please use PGP to encrypt your email to ensure our privacy is respected. > |
|
From: Petr J. <ele...@ex...> - 2013-06-01 07:15:36
|
Hi Artyom, I'm using PostgreSQL and it has the option to return result from an insert statement. Such as INSERT into table(...) values(...) RETURNING uuid In which case statement::exec() should be able to return result instead of VOID. I don't think it's possible to use statement::sequence_last() because the primary key for the table is not a named sequence (ie. serial data type), but an UUID. Is there currently anyway to use this PostgreSQL feature, without having to do a SELECT query following the INSERT to get the last created UUID? Cheers, -- Please use PGP to encrypt your email to ensure our privacy is respected. |
|
From: Artyom B. <art...@ya...> - 2013-05-28 15:18:31
|
csrf is enabled as a part of session. if a session does not exists there is no csrf token is required. -----srf token------------------------- On Tue, May 28, 2013 5:31 PM IDT Petr Janda wrote: >Hi, > >I just wrote a simple ajax JS function (through JQuery) which calls >POSTS to a synchronous CPPCMS application, and I would have expected to >see an error due to the fact that I'm not sending a CSRF token with it. > >How come? > >I have csrf enabled, and "exposed" config options enabled in the CPPCMS >config file. > >Petr > > >-- >Please use PGP to encrypt your email to ensure our privacy is respected. > |
|
From: Petr J. <ele...@ex...> - 2013-05-28 14:32:03
|
Hi, I just wrote a simple ajax JS function (through JQuery) which calls POSTS to a synchronous CPPCMS application, and I would have expected to see an error due to the fact that I'm not sending a CSRF token with it. How come? I have csrf enabled, and "exposed" config options enabled in the CPPCMS config file. Petr -- Please use PGP to encrypt your email to ensure our privacy is respected. |
|
From: Marcel H. <ke...@co...> - 2013-05-22 19:58:29
|
I know that to make that work I have to write "ap.second", but
netherless there is no method set_value with two arguments, or am I
seeing something terrible wrong?
On 22.05.2013 20:42, Artyom Beilis wrote:
>
> The point is that ap has a type pair<const string,value>. object is a map of string to json value
>
> that is why it is not working
> ------------------------------
> On Wed, May 22, 2013 1:03 PM IDT Marcel Hellwig wrote:
>
>> Hi Artyom,
>>
>> in your cppcms/json.h (which is really nice) is an error.
>>
>> If you try this
>>
>> for(auto& ap : v.object())
>> createLogger(ap);
>> where v is a json::value and create logger is this
>>
>> void createLogger(const cppcms::json::value &obj);
>> you will receive this error message
>> In file included from
>> /home/marcel/projects/logre/src/configloader.cpp:21:0:
>> /usr/local/include/cppcms/json.h: In instantiation of ‘static void
>> cppcms::json::traits<std::pair<_T1, _T2> >::set(cppcms::json::value&,
>> const std::pair<_T1, _T2>&) [with T1 = const cppcms::string_key; T2 =
>> cppcms::json::value]’:
>> /usr/local/include/cppcms/json.h:245:26: required from ‘void
>> cppcms::json::value::set_value(const T&) [with T = std::pair<const
>> cppcms::string_key, cppcms::json::value>]’
>> /usr/local/include/cppcms/json.h:314:4: required from
>> ‘cppcms::json::value::value(const T&) [with T = std::pair<const
>> cppcms::string_key, cppcms::json::value>]’
>> /home/marcel/projects/logre/src/configloader.cpp:51:24: required from here
>> /usr/local/include/cppcms/json.h:601:4: error: no matching function
>> for call to ‘cppcms::json::value::set_value(const char [6], const
>> cppcms::string_key&)’
>> v.set_value("first",in.first);
> 0> ^
>> /usr/local/include/cppcms/json.h:601:4: note: candidate is:
>> In file included from
>> /home/marcel/projects/logre/src/configloader.cpp:21:0:
>> /usr/local/include/cppcms/json.h:243:8: note: template<class T> void
>> cppcms::json::value::set_value(const T&)
>> void set_value(T const &v)
>> ^
>> /usr/local/include/cppcms/json.h:243:8: note: template argument
>> deduction/substitution failed:
>> In file included from
>> /home/marcel/projects/logre/src/configloader.cpp:21:0:
>> /usr/local/include/cppcms/json.h:601:4: note: candidate expects 1
>> argument, 2 provided
>> v.set_value("first",in.first);
>> ^
>> /usr/local/include/cppcms/json.h:602:4: error: no matching function
>> for call to ‘cppcms::json::value::set_value(const char [7], const
>> cppcms::json::value&)’
>> v.set_value("second",in.second);
>> ^
>> /usr/local/include/cppcms/json.h:602:4: note: candidate is:
>> In file included from
>> /home/marcel/projects/logre/src/configloader.cpp:21:0:
>> /usr/local/include/cppcms/json.h:243:8: note: template<class T> void
>> cppcms::json::value::set_value(const T&)
>> void set_value(T const &v)
>> ^
>> /usr/local/include/cppcms/json.h:243:8: note: template argument
>> deduction/substitution failed:
>> In file included from
>> /home/marcel/projects/logre/src/configloader.cpp:21:0:
>> /usr/local/include/cppcms/json.h:602:4: note: candidate expects 1
>> argument, 2 provided
>> v.set_value("second",in.second);
>> and yeah, there is no set_value function which takes two arguments. I
>> think you missed something ;)
>> Error occurred in the latest-svn-version. Hope you will fix it or say
>> what I am missing.
>>
>> Regards
>> Marcel Hellwig
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|
|
From: Artyom B. <art...@ya...> - 2013-05-22 18:42:09
|
The point is that ap has a type pair<const string,value>. object is a map of string to json value
that is why it is not working
------------------------------
On Wed, May 22, 2013 1:03 PM IDT Marcel Hellwig wrote:
>Hi Artyom,
>
>in your cppcms/json.h (which is really nice) is an error.
>
>If you try this
>
> for(auto& ap : v.object())
> createLogger(ap);
>where v is a json::value and create logger is this
>
> void createLogger(const cppcms::json::value &obj);
>you will receive this error message
> In file included from
> /home/marcel/projects/logre/src/configloader.cpp:21:0:
> /usr/local/include/cppcms/json.h: In instantiation of ‘static void
> cppcms::json::traits<std::pair<_T1, _T2> >::set(cppcms::json::value&,
> const std::pair<_T1, _T2>&) [with T1 = const cppcms::string_key; T2 =
> cppcms::json::value]’:
> /usr/local/include/cppcms/json.h:245:26: required from ‘void
> cppcms::json::value::set_value(const T&) [with T = std::pair<const
> cppcms::string_key, cppcms::json::value>]’
> /usr/local/include/cppcms/json.h:314:4: required from
> ‘cppcms::json::value::value(const T&) [with T = std::pair<const
> cppcms::string_key, cppcms::json::value>]’
> /home/marcel/projects/logre/src/configloader.cpp:51:24: required from here
> /usr/local/include/cppcms/json.h:601:4: error: no matching function
> for call to ‘cppcms::json::value::set_value(const char [6], const
> cppcms::string_key&)’
> v.set_value("first",in.first);
0> ^
> /usr/local/include/cppcms/json.h:601:4: note: candidate is:
> In file included from
> /home/marcel/projects/logre/src/configloader.cpp:21:0:
> /usr/local/include/cppcms/json.h:243:8: note: template<class T> void
> cppcms::json::value::set_value(const T&)
> void set_value(T const &v)
> ^
> /usr/local/include/cppcms/json.h:243:8: note: template argument
> deduction/substitution failed:
> In file included from
> /home/marcel/projects/logre/src/configloader.cpp:21:0:
> /usr/local/include/cppcms/json.h:601:4: note: candidate expects 1
> argument, 2 provided
> v.set_value("first",in.first);
> ^
> /usr/local/include/cppcms/json.h:602:4: error: no matching function
> for call to ‘cppcms::json::value::set_value(const char [7], const
> cppcms::json::value&)’
> v.set_value("second",in.second);
> ^
> /usr/local/include/cppcms/json.h:602:4: note: candidate is:
> In file included from
> /home/marcel/projects/logre/src/configloader.cpp:21:0:
> /usr/local/include/cppcms/json.h:243:8: note: template<class T> void
> cppcms::json::value::set_value(const T&)
> void set_value(T const &v)
> ^
> /usr/local/include/cppcms/json.h:243:8: note: template argument
> deduction/substitution failed:
> In file included from
> /home/marcel/projects/logre/src/configloader.cpp:21:0:
> /usr/local/include/cppcms/json.h:602:4: note: candidate expects 1
> argument, 2 provided
> v.set_value("second",in.second);
>and yeah, there is no set_value function which takes two arguments. I
>think you missed something ;)
>Error occurred in the latest-svn-version. Hope you will fix it or say
>what I am missing.
>
>Regards
>Marcel Hellwig
>
>
>
|
|
From: Lee E. <lee...@gm...> - 2013-05-20 21:36:25
|
On Mon, May 20, 2013 at 1:58 PM, Artyom Beilis <art...@ya...> wrote:
>
>
>
> >> if you think on the second approach - it will be much faster, i would
> >> base it on the existing cppcms_tmpl_cc script, but the end result will
> >> not feel razor IMO since you will not be able to use C++ language
> >> constructs freely inside the page
> >I tried this. I replaced all the regex pattern with a simple @ and it
> >works, but it's still not what I want. This is because of you have still
> >to write
> >@if
> >...
> >@endif
> >and this sucks! Really. So in fact I'd like to write the cppcms_tmpl_cc
> >new and make that the thing I want. But let's see what I can do in the
> >next few weeks.
>
>
> Three points:
>
> 1. I don't really want to support two versions of cppcms_tmpl_cc.
>
> That is a valid point - but perhaps you look at it the wrong way - you
supply C++ API for providing templates, and loading them on the fly. This
is the part that should be inside the CppCMS project
The template system(s) are a separate extension to the CppCMS, you need to
provide continued support for one such system, but others can be
implemented on the side and maintained by others from the community. And if
someone will provide a better template system then the "officially"
supported system, you can always drop the official system maintanance in
favor of recomending the better system.
2. I think, many things can be improved even in the current version, for
> example
> allow the statement to be split over multiple lines, improve WS
> handling etc.
>
> True, and i have done some improvments - but it was hard for my,
especially since python is not a native language for me (this is something
that i probably need to change).
But the current template system has a few design problems in my opinion
that throwing it away and developing a new is a viable option in my eyes.
The most problematic of the design issues in my eyes becomes visible when
you look at the C++ code that gets generated for <%= xxx %>
This translates into the C++ code:
out()<<cppcms::filters::escape(content.xxx);
The problem here is the content. prefix - this means that the strongest
component in any C++ suite, the compiler, was robbed of its strength of
finding out what xxx refers too. This same problem is repeated in the flow
blocks - but there it is less obvious.
The other less major problem i have with the CppCMS template system is the
forms & widgets system.
the csrf token is a great addition, but the form widgets rarely give you
what you really want in the resulting HTML. In order to generate the right
html you need to either generate your own widget (inheritance is a great
tool) or use the widget properties and use then in html that you generate
on your own. so generally the only thing that the widget does for you is
parse the value recieved from the client into the proper format - this can
be done differently using the request existing API
This is not a major issue simply since noone is forced to use the widget
system at all. But the existence of them as part of the CppCMS package
suggest that they are a recomended way to build your forms, and they are a
limitation if you want to build reach HTML apps.
3. I need 100% backward compatibility guarantee, such that if there is some
> @ in HTML code
> they would not mess.
>
> You need 100% compatibility if you enahnce the existing template system.
If you create a new one nothing stopps you from declaring a whole new set
of rules and guidelines for how to build templates using the new system.
The only two things that matter are compatibility with the framework skin
loader, and that it will be easier to write your html code using the new
template system.
> There is a reason that <% %> are used - they are not HTML/XML and not a
> part of HTML/XML
> so they are good escape sequences, on the other hand "@" is generic
> character that can
> exist in any place in HTML.
>
>
> Most of template languages use such a syntax that may better or worth.
>
> The question finally if it works well... if you don't like @if and @endif
> you
> may write entire HTML generation in plane C++... Of course it is
> not handily.
>
> I agree - this is the one thing i dislike about @ syntax
>> If you think about the first - i suggest do it from scratch, and
> >> generate cpp (and perhaps h files) from the template
> >> file independently of the cppcms_tmpl_cc - also adopt some limitation
> >> on the generated cpp code that will make your life easier (like each
> >> file have only one implicit template in it - or that @section "name"{
> >> ... } will define another template, but have it follow a predefined
> >> signature), and i would also adopt a separate extension like cpphtml
> >> to follow the razor convention for c# and vb
> >
> >Just to clarify. I will not convert the whole razor c# language to
> >cppcms_tmpl, because this is too big for me (, now). I will create a
> >basic template for using if-statements, for/while loops and variables.
> >I will orientate myself to the existing commands [0]. If you don't like
> >it, feel free to write what has to be improved or changed regarding to
> >the currhttp://cppcms.com/wikipp/en/page/cppcms_1x_templates_comment
> >standard.
> >> i do not have the time to pick up this project on my own right now -
>
> >> but if you say what direction you are going, i'll try and help
> >Me neither. I study in the 4th semester and it's not easy as some of you
> >might know. And that has more priority than this. Sorry about that, but
> >whenever I have some time, I will spend some of it.
> >
>
> See the most important things what this would provide you?
>
> Better syntax, maybe but would it give you more power? On your current
> suggestion - not.
>
> And that is most important, some syntactic sugar would be helpful, but
> full templates system redesign... I'd rather prefer to rewrite it in
> C++ and combine it with clang/LLVM so I can compile my templates on the
> fly.
>
> Which is a way cooler thing to do - and it really provides more power
> to user - i.e. fully dynamic templates - not only automatic shared objects
> reloading.
>
> The major advantages that razor has over its predecesor aspx/ascx/master
are:
getting simpler files that are all the same (razor files that generate
content and contain code) instead of have your code span across multiple
object types for different usage. Support for partial rendering of one
razor file from another as opposed to using special object types for that.
Simpler syntax, that is closer to the client technology (you actually write
html & javascript inside your razor files, where with aspx you used widgets
to get what you wanted done)
cppcms_tmpl_cc suffer from similar problems to those of aspx/ascx/master:
in order you define a template that is used as master - you use
inheritance. you ca call from one template into the other, but it is not
that easy to do. The syntax in the templates could be simpler, especially
for the control blocks. And as i wrote above, i dislike the widgets
>Maybe I will setup a git repo for this in the next days, so you can see
> >the actual development and say: "Stop! that's crap". and put your
> >patches to it. I would really appreciate that.
> >
> >Regards
> >Marcel
> >
> >[0] http://cppcms.com/wikipp/en/page/cppcms_1x_templates_comm
> >
> >Oh by the way, Artyom.... why not migrating to git? Git has a nice
> >feature for this ;) and of course it's 1000x better than svn.
> >https://www.youtube.com/watch?v=4XpnKHJAok8
> >
>
> About git... You know everything is a question of time.
>
> Can you convert entire svn history including, MERGE INFORMATION,
> branches, commits etc? I looked for one and neither one was simple
> or fully preserving the information.
>
> This is not a priority...
>
> You want to use git? Use git-svn - it is nice tool that allows
> you to work locally on git.
>
> I also prefer git, but git-svn is a great tool, and it also supports
importing ALL svn history including merge information. But i agree - no
rush. The time in invest in such a move is a heavy price on its own.
>
> Bottom line...
>
> I don't think that "redesign" for razor is kind of thing would be good,
> it would rather increase workload on me as a primary developer - to
> support both versions.
>
> Improvements are more than welcome, but fully new concept - I don't think
> that
> "razor" is really such a killing feature to use spend the time on it.
>
>
>
> Artyom Beilis
> --------------
> CppCMS - C++ Web Framework: http://cppcms.com/
> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
--
--
lee
Lee Elenbaas
lee...@gm...
|
|
From: Artyom B. <art...@ya...> - 2013-05-20 10:58:16
|
>> if you think on the second approach - it will be much faster, i would
>> base it on the existing cppcms_tmpl_cc script, but the end result will
>> not feel razor IMO since you will not be able to use C++ language
>> constructs freely inside the page
>I tried this. I replaced all the regex pattern with a simple @ and it
>works, but it's still not what I want. This is because of you have still
>to write
>@if
>...
>@endif
>and this sucks! Really. So in fact I'd like to write the cppcms_tmpl_cc
>new and make that the thing I want. But let's see what I can do in the
>next few weeks.
Three points:
1. I don't really want to support two versions of cppcms_tmpl_cc.
2. I think, many things can be improved even in the current version, for example
allow the statement to be split over multiple lines, improve WS handling etc.
3. I need 100% backward compatibility guarantee, such that if there is some @ in HTML code
they would not mess.
There is a reason that <% %> are used - they are not HTML/XML and not a part of HTML/XML
so they are good escape sequences, on the other hand "@" is generic character that can
exist in any place in HTML.
Most of template languages use such a syntax that may better or worth.
The question finally if it works well... if you don't like @if and @endif you
may write entire HTML generation in plane C++... Of course it is not handily.
>> If you think about the first - i suggest do it from scratch, and
>> generate cpp (and perhaps h files) from the template
>> file independently of the cppcms_tmpl_cc - also adopt some limitation
>> on the generated cpp code that will make your life easier (like each
>> file have only one implicit template in it - or that @section "name"{
>> ... } will define another template, but have it follow a predefined
>> signature), and i would also adopt a separate extension like cpphtml
>> to follow the razor convention for c# and vb
>
>Just to clarify. I will not convert the whole razor c# language to
>cppcms_tmpl, because this is too big for me (, now). I will create a
>basic template for using if-statements, for/while loops and variables.
>I will orientate myself to the existing commands [0]. If you don't like
>it, feel free to write what has to be improved or changed regarding to
>the currhttp://cppcms.com/wikipp/en/page/cppcms_1x_templates_comment
>standard.
>> i do not have the time to pick up this project on my own right now -
>> but if you say what direction you are going, i'll try and help
>Me neither. I study in the 4th semester and it's not easy as some of you
>might know. And that has more priority than this. Sorry about that, but
>whenever I have some time, I will spend some of it.
>
See the most important things what this would provide you?
Better syntax, maybe but would it give you more power? On your current
suggestion - not.
And that is most important, some syntactic sugar would be helpful, but
full templates system redesign... I'd rather prefer to rewrite it in
C++ and combine it with clang/LLVM so I can compile my templates on the fly.
Which is a way cooler thing to do - and it really provides more power
to user - i.e. fully dynamic templates - not only automatic shared objects
reloading.
>Maybe I will setup a git repo for this in the next days, so you can see
>the actual development and say: "Stop! that's crap". and put your
>patches to it. I would really appreciate that.
>
>Regards
>Marcel
>
>[0] http://cppcms.com/wikipp/en/page/cppcms_1x_templates_comm
>
>Oh by the way, Artyom.... why not migrating to git? Git has a nice
>feature for this ;) and of course it's 1000x better than svn.
>https://www.youtube.com/watch?v=4XpnKHJAok8
>
About git... You know everything is a question of time.
Can you convert entire svn history including, MERGE INFORMATION,
branches, commits etc? I looked for one and neither one was simple
or fully preserving the information.
This is not a priority...
You want to use git? Use git-svn - it is nice tool that allows
you to work locally on git.
Bottom line...
I don't think that "redesign" for razor is kind of thing would be good,
it would rather increase workload on me as a primary developer - to
support both versions.
Improvements are more than welcome, but fully new concept - I don't think that
"razor" is really such a killing feature to use spend the time on it.
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
|
|
From: Marcel H. <ke...@co...> - 2013-05-20 10:12:43
|
On 20.05.2013 07:48, Lee Elenbaas wrote:
> Thanks Artyom,
>
> Marcel when you say razor like template system - are you talking about
> building the templates differently - so that the end result CPP will
> be compatible with the skin system, but that templates needs to be
> restructured to the new system?
I said (like the title does) razor like syntax, not razor like template
system ;)
> or do you see the same existing <% ... %> code structure converted to
> something more readable like the @ prefix?
I first thought so, but see below.
> if you think on the second approach - it will be much faster, i would
> base it on the existing cppcms_tmpl_cc script, but the end result will
> not feel razor IMO since you will not be able to use C++ language
> constructs freely inside the page
I tried this. I replaced all the regex pattern with a simple @ and it
works, but it's still not what I want. This is because of you have still
to write
@if
...
@endif
and this sucks! Really. So in fact I'd like to write the cppcms_tmpl_cc
new and make that the thing I want. But let's see what I can do in the
next few weeks.
> If you think about the first - i suggest do it from scratch, and
> generate cpp (and perhaps h files) from the template
> file independently of the cppcms_tmpl_cc - also adopt some limitation
> on the generated cpp code that will make your life easier (like each
> file have only one implicit template in it - or that @section "name"{
> ... } will define another template, but have it follow a predefined
> signature), and i would also adopt a separate extension like cpphtml
> to follow the razor convention for c# and vb
Just to clarify. I will not convert the whole razor c# language to
cppcms_tmpl, because this is too big for me (, now). I will create a
basic template for using if-statements, for/while loops and variables.
I will orientate myself to the existing commands [0]. If you don't like
it, feel free to write what has to be improved or changed regarding to
the currhttp://cppcms.com/wikipp/en/page/cppcms_1x_templates_comment
standard.
> i do not have the time to pick up this project on my own right now -
> but if you say what direction you are going, i'll try and help
Me neither. I study in the 4th semester and it's not easy as some of you
might know. And that has more priority than this. Sorry about that, but
whenever I have some time, I will spend some of it.
Maybe I will setup a git repo for this in the next days, so you can see
the actual development and say: "Stop! that's crap". and put your
patches to it. I would really appreciate that.
Regards
Marcel
[0] http://cppcms.com/wikipp/en/page/cppcms_1x_templates_comm
Oh by the way, Artyom.... why not migrating to git? Git has a nice
feature for this ;) and of course it's 1000x better than svn.
https://www.youtube.com/watch?v=4XpnKHJAok8
|
|
From: Lee E. <lee...@gm...> - 2013-05-20 05:50:00
|
thanks - no go then :) ow well - it was worth asking. On Sun, May 19, 2013 at 4:54 PM, Artyom Beilis <art...@ya...> wrote: > CppCMS uses WinAPI and standard C++ and standard C libraries. > > So unless your SDK provides them you'll have troubles compiling CppCMS. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Lee Elenbaas <lee...@gm...> > *To:* cpp...@li... > *Sent:* Sunday, May 19, 2013 4:04 PM > *Subject:* [Cppcms-users] winrt > > has anyone placed a cppcms app on winrt? > i am considering proposing something along those lines as a solution to a > problem we have at work > so some insights on the problems will be great > > thanks > lee > > -- > -- > lee > Lee Elenbaas > lee...@gm... > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- -- lee Lee Elenbaas lee...@gm... |
|
From: Lee E. <lee...@gm...> - 2013-05-20 05:48:34
|
Thanks Artyom,
Marcel when you say razor like template system - are you talking about
building the templates differently - so that the end result CPP will be
compatible with the skin system, but that templates needs to be
restructured to the new system?
or do you see the same existing <% ... %> code structure converted to
something more readable like the @ prefix?
If you think about the first - i suggest do it from scratch, and generate
cpp (and perhaps h files) from the template file independently of the
cppcms_tmpl_cc - also adopt some limitation on the generated cpp code that
will make your life easier (like each file have only one implicit template
in it - or that @section "name"{ ... } will define another template, but
have it follow a predefined signature), and i would also adopt a separate
extension like cpphtml to follow the razor convention for c# and vb
if you think on the second approach - it will be much faster, i would base
it on the existing cppcms_tmpl_cc script, but the end result will not feel
razor IMO since you will not be able to use C++ language constructs freely
inside the page
i do not have the time to pick up this project on my own right now - but if
you say what direction you are going, i'll try and help
On Sun, May 19, 2013 at 4:50 PM, Artyom Beilis <art...@ya...> wrote:
>
> >PS: Artyom what happened to the changes i made to cppcms_tmpl_cc? that
> allowed for separate template compilation and use of header files? I
> noticed that it got dropped somewhere in the versions - and i hadn't had
> the time to resend it to you with updates.
> >
> >
>
>
> It is in trunk...
>
>
> Artyom Beilis
> --------------
> CppCMS - C++ Web Framework: http://cppcms.com/
> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
--
--
lee
Lee Elenbaas
lee...@gm...
|
|
From: Marcel H. <ke...@co...> - 2013-05-19 15:22:46
|
On 19.05.2013 15:52, Artyom Beilis wrote: > Yes, http://cppcms.com/cppcms_ref/1.0.2/classcppcms_1_1mount__point.html > > You just specify all you need while mounting an application. > > Does it suits the needs? Yep. Never did this before. I always used the dispatcher and in the json_rpc_chat there nothing like this ;) But thanks a lot. Marcel |
|
From: Artyom B. <art...@ya...> - 2013-05-19 13:56:57
|
I probably written wrong. The text_locale_codepage is not a problem The test_locale_messages should not fail this way. It looks odd. Especially that Boost.Locale works with MSVC 2012 (Booster.Locale is exact copy of Boost.Locale to different namespace) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Vizcayno <viz...@gm...> >To: cpp...@li... >Sent: Sunday, May 19, 2013 3:02 AM >Subject: Re: [Cppcms-users] Errors when executing test_locale_codepage.exe and > > >Artyom Beilis <artyomtnk@...> writes: > > > >> > >> > >> Are you sure you are using latest VC2012 - because I recall such a >problem with Boost.Locale with beta versions of VC > >> and it was a bug that was fixed by the VC team. > >> > > > >I have last update of VC2012 professional: > >-- The C compiler identification is MSVC 17.0.60315.1 > >-- The CXX compiler identification is MSVC 17.0.60315.1 > > > > > >> Because when I look on >this: http://www.boost.org/development/tests/trunk/developer/locale.html >(last column on right) > >> only the test_codepage fails/ > >> > >> I see that test_locale_message passes (the codepage is not a problem it >is rather a question of treating the standard - however I hadn't decided if >it is VC bug or Boost.Locales bug)/ > > > >Thanks for your indications. According to this I think the test result >seems to be acceptable. The locale codepage error refers to japan codepage, >the remaining tests are ok. > >My best regards. > > > > > > > >> > >> > >> Artyom Beilis--------------CppCMS - C++ Web Framework: >http://cppcms.com/CppDB - C++ SQL Connectivity: >http://cppcms.com/sql/cppdb/ From: Vizcayno <vizcaynot- >Re5...@pu...>To: cppcms-users- >5NW...@pu... Sent: Thursday, May 16, >2013 1:57 AMSubject: [Cppcms-users] Errors when executing >test_locale_codepage.exe and > >> I installed cppcms with last versions of PCRE, ZLIB and OpenSSL under >Windows 7 and VC2012.During the "nmake test" I have got 2 lines with **not >passed** status test:69:test_locale_codepage70:test_locale_messageAfter > >> some investigation, I executed the next 2 programs >(test_locale_codepage.exe and test_locale_message.exe) but I could'nt find >the cause of the errors. What do you think is happening? What possible >solutions or workarounds do you think I can apply? >thanks!!:=================================================================== >==:MODE CON CODEPAGE SELECT=1255Status for device CON:---------------------- > Lines: 300 Columns: 80 Keyboard rate: 31 >Keyboard delay: 1 Code page: >1255=====================================================================:C: >/apps/instApps/cppcms/build/booster/test_locale_codepage.exe- Testing >correct invalid bytes skipping-- > >> ISO-8859-8-- cp932Testing for backend stdTesting wide I/O wchar_t >UTF-8 Testing codepoints above 0xFFFF Single U+2008A Single >U+2008A withing text U+2008A x 1000 ISO8859-8 ISO8859-1 Shift- >JISError in line:67 read_file<Char>(f1) == cmpTesting charset to/from UTF >conversion functions char wchar_tTesting utf_to_utf char<-char char<- >wchar wchar<-char wchar<-wcharTesting for backend winapiTesting wide I/O >wchar_t UTF-8 Testing codepoints above 0xFFFF Single >U+2008A Single U+2008A > >> withing text U+2008A x 1000Testing charset to/from UTF conversion >functions char wchar_tTesting utf_to_utf char<-char char<-wchar wchar<- >char wchar<-wcharPassed 373 testsFailed 1 tests 99.7% of tests completed >sucsessefully=============================================================== >======:C:/apps/instApps/cppcms/build/booster/test_locale_message.exeTesting >for backend --------- std Testing he_IL.UTF-8 single formsError in >line:215 bl::translate(original).str(l)==expectedError in line:217 >bl::translate(original_c_str).str(l)==expectedError in line:221 >tmp==expectedError in line:223 tmp==expectedError in line:229 ss.str() >==expectedError in line:231 > >> bl::translate(original).str(l,domain)==expectedError in line:234 >bl::translate(original).str(domain)==expectedError in line:240 ss.str() >==expectedError in line:246 ss.str()==expectedError in line:215 >bl::translate(original).str(l)==expectedError in line:217 bl::translate >(original_c_str).str(l)==expectedError in line:221 tmp==expectedError in >line:223 tmp==expectedError in line:229 ss.str()==expectedError in line:231 >bl::translate(original).str(l,domain)==expectedError in line:234 >bl::translate(original).str(domain)==expectedError in line:240 ss.str() >==expectedError in line:246 ss.str()==expectedError in line:231 >bl::translate(original).str(l,domain)==expectedError in line:234 >bl::translate(original).str(domain)==expectedError in line:240 ss.str() >==expectedError in line:246 ss.str()==expectedFailed Error limits reached, > >> stopping unit test------------------------------------------------------- >-----------------------AlienVault Unified Security Management (USM) >platform delivers completesecurity visibility with the essential security >capabilities. Easily andefficiently configure, manage, and operate all of >your security controlsfrom a single console and one unified framework. >Download a free >trial.http://p.sf.net/sfu/alienvault_d2d____________________________________ >___________Cppcms-users mailing listCppcms-users- >5NW...@pu...://lists.sourceforge.n >et/lists/listinfo/cppcms-users > >> > >> > >> > >> -------------------------------------------------------------------------- >---- > >> AlienVault Unified Security Management (USM) platform delivers complete > >> security visibility with the essential security capabilities. Easily and > >> efficiently configure, manage, and operate all of your security controls > >> from a single console and one unified framework. Download a free trial. > >> http://p.sf.net/sfu/alienvault_d2d > >> > >> -------------------------------------------------------------------------- >---- > >> AlienVault Unified Security Management (USM) platform delivers complete > >> security visibility with the essential security capabilities. Easily and > >> efficiently configure, manage, and operate all of your security controls > >> from a single console and one unified framework. Download a free trial. > >> http://p.sf.net/sfu/alienvault_d2d > > > > > > > > >------------------------------------------------------------------------------ >AlienVault Unified Security Management (USM) platform delivers complete >security visibility with the essential security capabilities. Easily and >efficiently configure, manage, and operate all of your security controls >from a single console and one unified framework. Download a free trial. >http://p.sf.net/sfu/alienvault_d2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Artyom B. <art...@ya...> - 2013-05-19 13:54:56
|
CppCMS uses WinAPI and standard C++ and standard C libraries. So unless your SDK provides them you'll have troubles compiling CppCMS. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Lee Elenbaas <lee...@gm...> >To: cpp...@li... >Sent: Sunday, May 19, 2013 4:04 PM >Subject: [Cppcms-users] winrt > > > >has anyone placed a cppcms app on winrt? >i am considering proposing something along those lines as a solution to a problem we have at work >so some insights on the problems will be great > > >thanks >lee > > >-- >-- >lee >Lee Elenbaas >lee...@gm... > >------------------------------------------------------------------------------ >AlienVault Unified Security Management (USM) platform delivers complete >security visibility with the essential security capabilities. Easily and >efficiently configure, manage, and operate all of your security controls >from a single console and one unified framework. Download a free trial. >http://p.sf.net/sfu/alienvault_d2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Artyom B. <art...@ya...> - 2013-05-19 13:52:52
|
Yes, http://cppcms.com/cppcms_ref/1.0.2/classcppcms_1_1mount__point.html You just specify all you need while mounting an application. Does it suits the needs? Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Marcel Hellwig <ke...@co...> > To: "cpp...@li..." <cpp...@li...> > Cc: > Sent: Saturday, May 18, 2013 9:27 PM > Subject: [Cppcms-users] json_rpc dispatching > > Hi *, > > I'm trying to combine sync and async applications in my webservice. > > Sync ones for delivering content and async ones (with json_rpc) for > notification to the server. > So my question is: > can I dispatch a json_rpc_server to a certain domain like > http://localhost/async ? If yes, how ;) > is this really useful, or should I make another approach? > > Regards > Marcel > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Artyom B. <art...@ya...> - 2013-05-19 13:51:24
|
No, currently there is not such a functionality. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: Petr Janda <ele...@ex...> > To: cpp...@li... > Cc: > Sent: Friday, May 17, 2013 10:39 AM > Subject: [Cppcms-users] Getting list of time zones, countries, locales out of booster::locale. Is it possible? > > Hi, > > When a user signs up, he/she specifies their country, and I want to load > the list of time zones available in their country. > > Is this possible or do I need to query ICU directly? > > Thanks, > Petr Janda > > -- > Please use PGP to encrypt your email to ensure our privacy is respected. > > ------------------------------------------------------------------------------ > AlienVault Unified Security Management (USM) platform delivers complete > security visibility with the essential security capabilities. Easily and > efficiently configure, manage, and operate all of your security controls > from a single console and one unified framework. Download a free trial. > http://p.sf.net/sfu/alienvault_d2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Artyom B. <art...@ya...> - 2013-05-19 13:50:30
|
>PS: Artyom what happened to the changes i made to cppcms_tmpl_cc? that allowed for separate template compilation and use of header files? I noticed that it got dropped somewhere in the versions - and i hadn't had the time to resend it to you with updates. > > It is in trunk... Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
|
From: Artyom B. <art...@ya...> - 2013-05-19 13:50:07
|
>________________________________
> From: Lee Elenbaas <lee...@gm...>
>To: Artyom Beilis <art...@ya...>; cpp...@li...
>Sent: Thursday, May 16, 2013 5:17 PM
>Subject: Re: [Cppcms-users] razor like syntax for templates
>
>
>
>I looked into enhancing the <%= %> syntax a bit - and it is a bit tricky since - especially if you think razor like:
>
>
>with razor you expect things like this to work:
>
>
>@for (int i;....){
>
>
><li>@i. some content...
>}
>
I don't think that converting all of it to razor would be simple and I'm not sure how really it is needed.
In general some improvements in template system are needed - like ws suppression and more
Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.com/
CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>
>the problem is that the current syntax only deals with data that comes from the model - (by prefixing it in the generated cpp) or variables declared using blocks like the <%foreach...%> block
>
>
>i toyed around with the idea of performing a 'pascal like' with that will allow the compiler to find the correct variable using the folowing search order: local to template, then model, then template - but that forces a few limitations: on template namings in order to support calling from one template to another - so this turned into an issue. - but moving to a razor like syntax can come with the restriction of only using one template in a file - and use the @Render (and its siblings) to handle calls between files
>
>
>if i can be of assistance - please let me know.
>
>
>PS: Artyom what happened to the changes i made to cppcms_tmpl_cc? that allowed for separate template compilation and use of header files? I noticed that it got dropped somewhere in the versions - and i hadn't had the time to resend it to you with updates.
>
>
>
>
>
>On Thu, May 16, 2013 at 4:29 PM, Artyom Beilis <art...@ya...> wrote:
>
>Actually it is interesting idea, so you can put @before variable that would be equivalent to <%= before %>
>>
>>
>>Several things:
>>
>>
>>1. Escaping - should be done with @@ I think
>>2. Do you want to extend it beyond variables? Like the full Razor does?
>>
>>
>>The best would be:
>>
>>
>>1. Add an option to cppcms_tmp_cc to handle such a syntax
>>2. Make sure that by default it is off such that existing code that has stuff like "@user" as text would not be broken.
>>
>>
>>Other than that such a patch for cppcms_tmpl_cc would be welcome.
>>
>>Artyom Beilis
>>--------------
>>CppCMS - C++ Web Framework: http://cppcms.com/
>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>>
>>
>>
>>>________________________________
>>> From: Marcel Hellwig <ke...@co...>
>>>To: cpp...@li...
>>>Sent: Tuesday, May 14, 2013 2:21 PM
>>>Subject: [Cppcms-users] razor like syntax for templates
>>>
>>>
>>>Hi *,
>>>
>>>the current template
"language" is inspired by asp.net.
>>>The syntax with <% ... %> is equal to the one asp.net uses.
>>>My Idea is to use a different syntax, namely the successor razor where
>>>you can replace all the <% with a simple @. For a simple review see [0]
>>>Now my question is, are you willing to use this, or do you like to have
>>>this feature.
>>>i would try to implement this. For now it's a simple python script that
>>>will convert the template to a cpp file, so it should not be that hard.
>>>
>>>Regards
>>>Marcel Hellwig
>>>
>>>
>>>[0] http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx
>>>
>>>
>>>------------------------------------------------------------------------------
>>>AlienVault Unified Security Management (USM) platform delivers complete
>>>security visibility with the essential security capabilities. Easily
and
>>>efficiently configure, manage, and operate all of your security controls
>>>from a single console and one unified framework. Download a free trial.
>>>http://p.sf.net/sfu/alienvault_d2d
>>>_______________________________________________
>>>Cppcms-users mailing list
>>>Cpp...@li...
>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users
>>>
>>>
>>>
>>------------------------------------------------------------------------------
>>AlienVault Unified Security Management (USM) platform delivers complete
>>security visibility with the essential security capabilities. Easily and
>>efficiently configure, manage, and operate all of your security controls
>>from a single console and one unified framework. Download a free trial.
>>http://p.sf.net/sfu/alienvault_d2d
>>_______________________________________________
>>Cppcms-users mailing list
>>Cpp...@li...
>>https://lists.sourceforge.net/lists/listinfo/cppcms-users
>>
>>
>
>
>
>--
>--
>lee
>Lee Elenbaas
>lee...@gm...
>
>
>
|