cppcms-users Mailing List for CppCMS C++ Web Framework (Page 81)
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
|
From: Artyom B. <art...@ya...> - 2012-06-21 10:06:17
|
----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: Artyom Beilis <art...@ya...>; cpp...@li... > Cc: > Sent: Thursday, June 21, 2012 12:54 PM > Subject: Re: [Cppcms-users] Who Uses CppCMS - Reminder > > I'll let you know when my client accepts it :) > > Which will hopefully be soon... > Looking forward > It will be a good ad for you, trust me. > > hint: "CPPCMS is so good we trust it in aviation" :) > > Petr > Nice... Indeed it would very good "quality measure". (I have some background in aviation) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Artyom B. <art...@ya...> - 2012-06-21 10:03:09
|
See changing defaults is very bad idea - especially at framework level. If you have some trouble in all over the code, that seems that you had some **design** problem at the beginning and you try to solve it by altering the framework itself. The correct way to solve it is to set the precision on template level where you need: <% gt "{1,precision =10}" using my_high_precision_value %> See: http://www.boost.org/doc/libs/1_49_0/libs/locale/doc/html/localized_text_formatting.html If you need to change it globally create a small function in you topmost application class that all your classes are derived from: void render(std::string const &template_name,cppcms::basi_context &c) { response().out() << std::setprecision(10); cppcms::application::render(template_name,c); } Or even better create render_with_high_precision(...) function and do small refactoring. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: Artyom Beilis <art...@ya...>; cpp...@li... > Cc: > Sent: Thursday, June 21, 2012 12:51 PM > Subject: Re: [Cppcms-users] How to set default response().out() stream precision? > > Can you at least increase the default precision of the stream to lets > say... 10? That would save me troubles having to patch cppcms on every > deployment of this app. > > It makes more sense than 6 which is in my opinion too low for just about > anything but the most basic applications. > > Cheers > Petr > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ele...@ex...> - 2012-06-21 09:54:18
|
I'll let you know when my client accepts it :) Which will hopefully be soon... It will be a good ad for you, trust me. hint: "CPPCMS is so good we trust it in aviation" :) Petr |
From: <ele...@ex...> - 2012-06-21 09:51:38
|
Can you at least increase the default precision of the stream to lets say... 10? That would save me troubles having to patch cppcms on every deployment of this app. It makes more sense than 6 which is in my opinion too low for just about anything but the most basic applications. Cheers Petr |
From: Artyom B. <art...@ya...> - 2012-06-21 09:49:16
|
Hello All CppCMS users. Small Reminder, There is a page that contains a list of some CppCMS users http://cppcms.com/wikipp/en/page/who_uses If your company/organization is using CppCMS or you are running some public web site with it... Add it to the list please. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Artyom B. <art...@ya...> - 2012-06-21 09:46:13
|
Also if you have few js files you need to cache you can create your own function that servers them at application level. Mount with expression like /static/files/(foo|bar).js And then serve them from the application. And setup your own headers for files caching. Take a look on this guide: http://cppcms.com/wikipp/en/page/cppcms_1x_serving_static_files Also it is not so hard to add timestamps and cache headers to the internal file server. So if the patch would be given I'll gladly apply it. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: cpp...@li... > Cc: > Sent: Thursday, June 21, 2012 12:38 PM > Subject: Re: [Cppcms-users] Multiple class of render() > >> Okay.. so my bottleneck is the integrated http server with its minimal >> http header. >> I can try to use a normal http server for the cppcms app, but I like >> the idea to have >> one executable to provide the whole web app with a http server. Maybe >> it is enough >> to enable cppcms caching. I need to rerun some tests/benchmarks. > > If JS/CSS is your bottle neck then cppcms cache isn't going to help you > much unless you put all your JS/CSS inline with HTML in which case it's is > still going to run slow. > > My nginx uses about 8MB of resident memory, but is fastest. > Lighthttpd uses about 2-3MB :) > > I think it's a sacrifice well spent. > > I know the idea of running a single executable may be appealing but in > practice using fastcgi + small webserver is a better option. > > Petr > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-06-21 09:42:04
|
----- Original Message ----- > From: Christian Gmeiner <chr...@gm...> > To: cpp...@li... > Cc: > Sent: Friday, June 15, 2012 4:04 PM > Subject: [Cppcms-users] Ajax based form validation > > Hi all, > > currently I am looking into a way to integrate client side form validation into > a cppcms application. > I have looked around and found this nice jquery based one: > jQuery-Validation-Engine > https://github.com/posabsolute/jQuery-Validation-Engine > > The nice thing is that it provides a nice Ajax api - > https://github.com/posabsolute/jQuery-Validation-Engine#ajax-protocol > > Is there some way to reuse the defined validations (e.g. struct > login_form : public cppcms::form) with this api? > > thanks > --- > Christian Gmeiner, MSc Generally Ajax based validation is very limited as for example it can't change foreign keys and so on. The "real" power of cppcms form validation is in being able to overload validate() function. You can use some widgets data by for example calling <%= myform.my_widget.limits().first %> to get minimal limit or some other stuff. Generally there is no direct support of client side validation as it will always be limited. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: <ele...@ex...> - 2012-06-21 09:38:58
|
> Okay.. so my bottleneck is the integrated http server with its minimal > http header. > I can try to use a normal http server for the cppcms app, but I like > the idea to have > one executable to provide the whole web app with a http server. Maybe > it is enough > to enable cppcms caching. I need to rerun some tests/benchmarks. If JS/CSS is your bottle neck then cppcms cache isn't going to help you much unless you put all your JS/CSS inline with HTML in which case it's is still going to run slow. My nginx uses about 8MB of resident memory, but is fastest. Lighthttpd uses about 2-3MB :) I think it's a sacrifice well spent. I know the idea of running a single executable may be appealing but in practice using fastcgi + small webserver is a better option. Petr |
From: Artyom B. <art...@ya...> - 2012-06-21 09:36:41
|
----- Original Message ----- > From: Christian Gmeiner <chr...@gm...> > To: cpp...@li... > Cc: > Sent: Wednesday, June 20, 2012 5:34 PM > Subject: [Cppcms-users] Multiple class of render() > > Hi all, > > I found an interesting jquery lib, which speeds up page switching a > lot. This seems to > solve my performance problems I have on my embedded device. > Have a loot at it: https://github.com/defunkt/jquery-pjax > > I have replaced all calls of render with ajax_render, which looks like: > > void Base::ajax_render(std::string template_name, cppcms::base_content > &content) > { > bool chromeless = false; > if (request().getenv("HTTP_X_PJAX") == "true") > { > chromeless = true; > } > > BOOSTER_DEBUG("ajax_render") << "chromeless: " > << chromeless; > > if (chromeless) > { > render(template_name, content); > } > else > { > static content::master m; > render("header", m); > render(template_name, content); > > // as a template for footer is an overkill, we do it here > response().out() << " </div>\n"; > response().out() << "</body>\n"; > response().out() << "</html>\n"; > } > } > > Is the usage of multiple render class the best solution? > It seems to me as classic application of multiple skins. For example create one skin (basic HTML header, footer) for "PAJAX" and other for normal HTML. That what I would do. But this approach is fine as well. Also small note > ___static___ content::master m; It seems to me bad idea... Multiple threads can access same object. So unless you make sure m does not change be careful. Artyom Beilis ------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > thanks > -- > Christian Gmeiner, MSc > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2012-06-21 09:27:26
|
Good Idea, I'll apply it Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: cpp...@li... > Cc: > Sent: Wednesday, June 20, 2012 4:47 AM > Subject: Re: [Cppcms-users] small patch for cppdb error reporting > > I accidently left an unused include macro in the original patch. Here is > the same patch without it. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Christian G. <chr...@gm...> - 2012-06-21 09:05:46
|
>>> Ok, but shouldn't the JS/CSS be cached on the client anyway? >>> >> It should, but dont ask me what chrome is doing in the end. > > Are you running the application from the built in http server? Or are you > using fastcgi/nginx ? I am using the integrated http server for development and production. > > I believe the built in http server sends only minimal headers. It doesn't > send Last Modified or any other caching headers. It got me by surprise > also. But it makes sense. During development you're unlikely need any > caching at all and thats what the built in http server was designed for. > But its also good for "embedded" devices :) >> Also I need to support different screen resolutions (qvga and vga) - >> done via html >> body id and css. So I don't see that much sense in caching so dynamic >> pages, but >> may I be wrong :) > > Well I never had to do this but, if the above works for you (the CSS/JS > caching). With the cppcms cache you're caching the content. > > Provided that: > 1) You can cache JS/CSS files in chrome > 2) Most of your JS/CSS is is not inline with HTML > 3) The rest you can cache on the server side > > I think you shouldn't need PJAX at all. Judging by the difference in speed > you get due to not loading JS/CSS on every page load, that is likely your > bottleneck. > Okay.. so my bottleneck is the integrated http server with its minimal http header. I can try to use a normal http server for the cppcms app, but I like the idea to have one executable to provide the whole web app with a http server. Maybe it is enough to enable cppcms caching. I need to rerun some tests/benchmarks. The cppcms app is only used for device configuration, where as the main goal of the device is to provide visualization. So the main resources like RAM/CPU must be available to the visualization. -- Christian Gmeiner, MSc |
From: <ele...@ex...> - 2012-06-21 08:51:30
|
>> Ok, but shouldn't the JS/CSS be cached on the client anyway? >> > It should, but dont ask me what chrome is doing in the end. Are you running the application from the built in http server? Or are you using fastcgi/nginx ? I believe the built in http server sends only minimal headers. It doesn't send Last Modified or any other caching headers. It got me by surprise also. But it makes sense. During development you're unlikely need any caching at all and thats what the built in http server was designed for. > Also I need to support different screen resolutions (qvga and vga) - > done via html > body id and css. So I don't see that much sense in caching so dynamic > pages, but > may I be wrong :) Well I never had to do this but, if the above works for you (the CSS/JS caching). With the cppcms cache you're caching the content. Provided that: 1) You can cache JS/CSS files in chrome 2) Most of your JS/CSS is is not inline with HTML 3) The rest you can cache on the server side I think you shouldn't need PJAX at all. Judging by the difference in speed you get due to not loading JS/CSS on every page load, that is likely your bottleneck. Petr |
From: Christian G. <chr...@gm...> - 2012-06-21 08:36:38
|
2012/6/21 <ele...@ex...>: >> The main problem for my application is the response time if a page change >> should >> be done. So in order to improve this situation I only want/need to replace >> a div >> DOM object with the loaded content. In general an easy task, but this only >> works >> if the whole page gets loaded once. This saves loading of the big main >> js and css files >> every time (including parsing etc). > > Ok, but shouldn't the JS/CSS be cached on the client anyway? > It should, but dont ask me what chrome is doing in the end. > Have you considered using the built-in 2 level cache? The lowest target device for the software under development is an AMD Geode LX with 500 MHz and 512 MB RAM. The cppcms application and chrome are running on the same device. Without this "Ajax replacing of DOM-container" a page change takes 2-3 seconds, but it this ajax stuff it takes less then 1 second. The page change must be as fast as possible, else it is a problem for our user interaction. Also I need to support different screen resolutions (qvga and vga) - done via html body id and css. So I don't see that much sense in caching so dynamic pages, but may I be wrong :) -- Christian Gmeiner, MSc |
From: <ele...@ex...> - 2012-06-21 07:36:37
|
> The main problem for my application is the response time if a page change > should > be done. So in order to improve this situation I only want/need to replace > a div > DOM object with the loaded content. In general an easy task, but this only > works > if the whole page gets loaded once. This saves loading of the big main > js and css files > every time (including parsing etc). Ok, but shouldn't the JS/CSS be cached on the client anyway? Have you considered using the built-in 2 level cache? Petr |
From: Christian G. <chr...@gm...> - 2012-06-21 06:31:10
|
> >> >> Is the usage of multiple render class the best solution? >> > > Im not sure what youre trying to accomplish, but cant you solve that with > template inheritance instead of multiple render function? Did you look at > returning JSON instead of HTML? I mean, it kind of makes ajax useless if > you are returning HTML with AJAX as the whole point of AJAX is to diminish > network traffic. > The main problem for my application is the response time if a page change should be done. So in order to improve this situation I only want/need to replace a div DOM object with the loaded content. In general an easy task, but this only works if the whole page gets loaded once. This saves loading of the big main js and css files every time (including parsing etc). A quite good tutorial about pjax can be found here: http://blog.ntotten.com/2012/04/09/building-super-fast-web-apps-with-pjax/ > > Im not sure about the static qualifier of the content object though. > Artyom might have to answer this but i didnt think cppcms::base_content is > thread safe. So you should make sure you arent modifying it anywhere. > Maybe there is an other way of doing it.. may Artyom has an idea. -- Christian Gmeiner, MSc |
From: <ele...@ex...> - 2012-06-20 23:36:47
|
> > Is the usage of multiple render class the best solution? > Im not sure what youre trying to accomplish, but cant you solve that with template inheritance instead of multiple render function? Did you look at returning JSON instead of HTML? I mean, it kind of makes ajax useless if you are returning HTML with AJAX as the whole point of AJAX is to diminish network traffic. Im not sure about the static qualifier of the content object though. Artyom might have to answer this but i didnt think cppcms::base_content is thread safe. So you should make sure you arent modifying it anywhere. |
From: Christian G. <chr...@gm...> - 2012-06-20 14:36:00
|
Thanks -- Christian Gmeiner, MSc 2012/6/16 <ele...@ex...>: >> Hi all, >> >> currently I am looking into a way to integrate client side form validation >> into >> a cppcms application. >> I have looked around and found this nice jquery based one: >> jQuery-Validation-Engine >> https://github.com/posabsolute/jQuery-Validation-Engine >> >> The nice thing is that it provides a nice Ajax api - >> https://github.com/posabsolute/jQuery-Validation-Engine#ajax-protocol >> >> Is there some way to reuse the defined validations (e.g. struct >> login_form : public cppcms::form) with this api? > > You can do validation of each widget individually: > > http://cppcms.com/cppcms_ref/latest/classcppcms_1_1base__form.html#af7d0a7b4c760b43ea3161181906ee4d0 > > Look at the JSON-RPC guide on the cppcms wiki. > > So I guess you can. > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Christian G. <chr...@gm...> - 2012-06-20 14:35:13
|
Hi all, I found an interesting jquery lib, which speeds up page switching a lot. This seems to solve my performance problems I have on my embedded device. Have a loot at it: https://github.com/defunkt/jquery-pjax I have replaced all calls of render with ajax_render, which looks like: void Base::ajax_render(std::string template_name, cppcms::base_content &content) { bool chromeless = false; if (request().getenv("HTTP_X_PJAX") == "true") { chromeless = true; } BOOSTER_DEBUG("ajax_render") << "chromeless: " << chromeless; if (chromeless) { render(template_name, content); } else { static content::master m; render("header", m); render(template_name, content); // as a template for footer is an overkill, we do it here response().out() << " </div>\n"; response().out() << "</body>\n"; response().out() << "</html>\n"; } } Is the usage of multiple render class the best solution? thanks -- Christian Gmeiner, MSc |
From: <ele...@ex...> - 2012-06-20 01:47:59
|
I accidently left an unused include macro in the original patch. Here is the same patch without it. |
From: <ele...@ex...> - 2012-06-20 01:43:58
|
After applying this patch the annoyance factor has dropped drastically for me. For anyone who wants to use it it's here. For Artyom: On FreeBSD (at least) iODBC is the default. For example Virtuoso database which is required by KDE4 only builds against iODBC (as far as I can tell from FBSD ports) Maybe the situation is similar in Linux, I dont know. Petr |
From: Artyom B. <art...@ya...> - 2012-06-18 21:24:16
|
----- Original Message ----- > From: Markus Raab <us...@ma...> > To: cpp...@li... > Cc: > Sent: Monday, June 18, 2012 11:48 PM > Subject: Re: [Cppcms-users] cppcms unclear issues and philosophy > > Hi! > > Artyom Beilis wrote: >> No, because if I use boost under the hood user will still have >> ABI incompatibilities. For example I use some boost code >> under hidden cppcms_boost namespace (boost with renamed namespace) >> but it is not exposed and I have to use alternative namespace > > Could you explain why this hidden cppcms_boost namespace is needed? In which > situation does it differ to static linkage? > It is very different. Even if I for example link statically with some boost::foo it symbol would appear in the code (even if it is not in interface) and if the application uses boost::foo as well and their ABI is different you would get a crash because the linker would resolve it to one of the boost::foo's and the other would be broken. Same valid for ELF dynamic linking as well. So the only way to make things safe is to change the namespace name. Also it does not 100% save you as sometimes in Boost there are some symbols not-previxed with boost (they are removed from cppcms_boost explicitly) That is for example what ICU does. All ICU classes are put into icu_xx_yy namespace with alias namespace icu = icu_xx_yy. All ICU C functions are postfixed with _xx_yy for example u_foo goes to u_foo_1_49. This saved me not once when headers were different from the actual library versions - happens when you tinker with multiple versions. >> Even if boost is not in interface you will have ABI problems >> if somebody accidentally uses for example boost.1.46.1 instead >> of boost.1.46 that cppcms is compiled with... > > Of course, but is changing the namespace needed to tackle this issue? > Unfortunately, Yes. Even boost provides a tool for that - BCP. > Do you use tools/rename.py for the renaming? > Yes - it is the primary tool. Also its most common use is to rename boost::locale to booster::locale. (Also note rename.py predates boost BCP namespace renaming support, and it works smarter than BCP) Note, internal cppcms_boost is boost 1.39 with some bug fixes back-ported from the latest versions. And because It is not exposed such fixes are not hard. > best regards > Markus > Best, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: Markus R. <us...@ma...> - 2012-06-18 20:49:03
|
Hi! Artyom Beilis wrote: > No, because if I use boost under the hood user will still have > ABI incompatibilities. For example I use some boost code > under hidden cppcms_boost namespace (boost with renamed namespace) > but it is not exposed and I have to use alternative namespace Could you explain why this hidden cppcms_boost namespace is needed? In which situation does it differ to static linkage? > Even if boost is not in interface you will have ABI problems > if somebody accidentally uses for example boost.1.46.1 instead > of boost.1.46 that cppcms is compiled with... Of course, but is changing the namespace needed to tackle this issue? Do you use tools/rename.py for the renaming? best regards Markus |
From: <ele...@ex...> - 2012-06-18 09:54:53
|
> If you want to set precision... Do it right before rendering. > Or if you want to setup other settings on "some_other_stream" > and than use response().out().copyfmt(some_other_stream) Sorry, but do you realize how ridiculous that is? For every "view" in the project you'd have to call a function to change precision. That's just pain in the ass. What if you are a bank and your clients keep losing money because some guy forgot to change precision for every render() call? |
From: Artyom B. <art...@ya...> - 2012-06-18 09:11:41
|
----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: cpp...@li... > Cc: > Sent: Monday, June 18, 2012 11:56 AM > Subject: Re: [Cppcms-users] How to set default response().out() stream precision? > > I went ahead and made a patch my self. > > File attached. Goes ahead HEAD. > > Now doing response().ostream().precision(9) works. > I would not apply this patch for several reasons. 1. I keep a right to change ostream object, for example, older version of CppCMS (1.0.1) used different ostream objects for different configurations/io-modes. 2. There is a locale stuff that should be defined 3. It would be very confusing. What happens if a user writes: response().ostream() << "foo"? It is bad idea to have different ostreams in response If you want to set precision... Do it right before rendering. Or if you want to setup other settings on "some_other_stream" and than use response().out().copyfmt(some_other_stream) Don't forget to configure the locale in some_other_stream Regards, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |
From: <ele...@ex...> - 2012-06-18 08:59:00
|
> No, the access to out() flushes the headers by design as the data stream > goes after the headers so the headers should be written. So you are saying that without the patch I just sent, there's no way to change ostream precision and the user is simply stuck with 6 decimal numbers(the default) Petr |