Initial Thoughts on Polymer

I've been doing some web development off and on for many years (since 1996). I started out in an interpreted language on top of an object database that was serving up a web-based discussion forum that I was writing and shipping. I moved on from there to various other tools over the years including various home-grown templating languages, Django templates, Jinja2 and others. I helped produce web applications using ExtJS, others using jQuery / jQuery UI, and experimented with various other frameworks over the years. I've followed along with what people are doing in ReactJS and related tools like Om. It is all interesting.

A Recent Project

I recently built a web-based UI for a memory / heap profiler for emscripten. This is just some Jinja2 templates and Flask on the server side. The UI is using Bootstrap and went through several iterations of various JS tools and frameworks for handling graphs, grids, and charts. This was something of a nightmare (and honestly, the code still is terrible). Many tools didn't play well together. Some had issues due to CSS or JS clashing. Others just wanted to control more than I wanted to let them control. Getting jQuery UI, Bootstrap, Slick Grid …

read more »

SWIG and JavaScript - Part One

I experiment with a lot of ideas for projects and see which ideas stick, which seem interesting, which require something that I can't provide, etc.

A project that I'm working on now may well be interesting and within my capabilities and the resources that I can muster, but I don't want to identify it specifically yet.

Anyway, this project requires using Node.js to talk to a C++ library with an extensive API. An interesting detail is that this library already has a solid Python API, built via SWIG.

JavaScript and SWIG

Version 3.0 of SWIG began to support JavaScript. It supports using JavaScriptCore or V8 as the JS engine, and Node.js as a specialization of the V8 support.

For now, I have hacked the SWIG interface files from the C++ library to wrap Python-specific portions in #ifdef SWIG_PYTHON so that they can be shared with JavaScript. In the longer term, should this project work out and I decide to upstream the changes to support having JavaScript bindings, I will clean this up and move some things into separate files for each language in a tidier fashion.

In fairly short order, I was able to get a Node …

read more »