Meta

January 6, 2008

I love things that “just work”. Ubuntu distro is supposed to be one of those things. Some time ago, I tried to install it on an old laptop and ended up with LCD panel split in three screens (I’m not kidding) and mouse popping up all over the place. Then I tried Mepis and I ended up with a crystal clear 1280×1024 resolution – something I was never able to achieve myself (who the heck has time and patience for xorg.conf), not even with Gentoo.

Ah, yes, Poco::Data:

I had one main thing in mind when I pushed for Poco::Data – I wanted to throw in a SQL and automagically get out whatever the heck I need – a HTML table, an XML document or whatever else an end user may need. After almost a year (bear in mind, this is still a hobby of mine) of development and tweaking, I finally got where I wanted to be, so we can do this now:

Now, ages may be inaccurate since I made them up, but the code works. For details, see RowFormatter sample.

Unicode (shudder) support code is in, for both Windows and *NIX. It has been fully tested on Windows only, since things are quite murky on *NIX with wchar_t being (mostly) 32-bit, unixODBC Unicode being 16-bit by default (with 32-bit option), iODBC being 32-bit (only) and drivers being all over the place. I’m still trying to make sense of that mess and come up with a coherent strategy.

This will work together great with something I plan to release next week: a C++ Server Page compiler. It will compile C++ contained in HTML pages into a HTTPRequestHandler class. The thing uses basic JSP syntax (< %, %>, etc.) and it has saved me a lot of work in a previous project. I still have to clean up the code a bit and write documentation. More on it next week.

While talking to other projects and trying to merge may seem like a good idea initially, it is our experience that usually it does not bear much fruit and proves to be a waste of time. We tried it with SOCI and Platinum. The main reason for failure is that ultimately none of the options turns out to be aceptable for both sides. Merging is a tough thing and people (including us) usually stick strongly to their code. While I may be willing to consider molding PocoServlet code to meet Total Knowledge half way, I would not be willing to give up Poco::Net dependency in favor of socket++ and would not be willing to have firm Apache dependency. That being said, we are very interested in your fastCGI code (I had plans myself for it) – it would be a nice addition to the servlet library, so if you are willing to contribute it, by all means do so. Recently, Paschal has ported all the Tomcat samples (I’ll submit them, I hope, this weekend) to SVN.

Also, this reply is by no means meant to discourage you to talk to CppServ folks. Please do talk to them if you have time and enthusiasm, but be aware what you may be facing.

This is easily doable for POD bindings and some databases (SQLite for sure), but the only truly portable way across all databases that I can think of would be to massage the SQL string and replace the placeholders before execution or turn placeholders into question marks and provide sufficient amount of bindings. Things then get more complicated when bindings are containers or complex types such as tuples or objects. Even more complicated for containers of tuples or objects. And yet more complicated for bulk execution. The solution I’d be willing to add as a feature should work in all of the above cases.