The real value add of customized web apps is from a business perspective. I come from the embedded device world where the number of units sold is the driving factor (compared to the number of hits). By forcing apps to write to your API you are ensuring a certain level of stickiness. It can be a competitive advantage to limit the devices an app can run on by exposing custom functionality through the browser. GE won’t want its ice tray level app to run on LG with no modification for the same reason Apple does’t want its apps to run on Android without a rewrite.
Any C++ object can be complied into the browser and exposed to the JS engine.
posterInternalCommand(QString command, QString data);
bool FakeObject::postInternalCommand(QString command, QString data)
// Do something with data
After instantiation the object is exposed to the JS engine using a QWebFrame method.
FakeObject* m_pfake = new FakeObject(webView);
b = window.fake.postInternalCommand("fakeCommand", "fakeData")
x = x + 1