“Dynamic C++” presentation at Silicon Valley Code Camp

I will speak at the Silicon Valley Code Camp (Oct 6-7 @ Foothill College in Los Altos, CA).

The title of the speech is “Dynamic C++”; here is the description:

The C++ static type system is beneficial in many ways; it can, however, also be a straitjacket. Is there a rationale for dynamic type layer on top of a statically typed language like C++? Given both historical (ANSI C union and void*, Microsoft COM Variant, boost::[variant, any, lexical_cast]) and recent (boost::type_erasure, Facebook folly::dynamic) development trends, the answer is a resounding “yes”.

This presentation is based on Poco::Dynamic::Var (aka Poco::DynamicAny) – a dynamic-typing set of C++ classes; furthermore, it will show the simplicity and practical advantages of mapping ad-hoc generated data sets of unknown type, size, and structure to C++ data structures. Specifically, the presentation demonstrates how to:

  1. Execute a generic “SELECT * FROM Table”;
  2. Dynamically map returned data (row/column count and types) to C++ data structures at runtime;
  3. Format the result as [XML, JSON, HTML, your-favorite-data-format-here];
  4. Stream the resulting formatted string to std::ostream compliant HTTP socket stream.

Surely, this must be very complicated to do in C++, right? Not at all – we’ll demonstrate all of the above done with a single line of code and then peek under the hood to see where/how does the magic happen. Portable? Of course. Scalable? You bet – it’s C++! The content of this presentation fits perfectly into modern AJAXian trends and we’ll prove it with an ExtJS example; it prompts re-thinking of the rationale for (a) employing dynamic languages on the server side or (b) polluting HTML with server-side code.

If you are in the neighborhood or interested enough to travel, register online (it’s free) and stop by for some good time and interesting presentations/discussions. Also, if interested in my speech, indicate it on the Code Camp website so I can gauge what audience size to expect. See you there!