3 ms·
I'm building a framework some what like this but maybe better for some use cases. It's still a work in progress but it's part of my tinderbox application. htt
by zbowling 15y ago
I'm building a framework some what like this but maybe better for some use cases.
It's still a work in progress but it's part of my tinderbox application.
https://github.com/zbowling/tinderbox https://github.com/zbowling/tinderbox
It embeds a node.js server in the background (soon it will embed a custom Node server were I forked libev to use libdispatch on the mac and run behind inside a secure XPC server that launchd will manage on the Mac). Then using a Unix socket, it serves up through a custom webkit protocol handler. Two way communication to the frontend from a custom webserver written in Cocoa.
Instead of going down the road of trying to write Cocoa code with Javascript, instead just surface what you need as you need to your own backend. It's abstract so that it can be reused in other applications on other platforms in the future. Node.js was a good solution because it offers sandboxing and eventbased IO which for my first use case (Campfire) made prefect sense.
Doing this kind of binding with a generated kind of interface is always going to keep fighting an abstraction. (Like fighting some C++ lib you wrapped and are trying access through SWIG). My approach you just use the tool best suited for the job and embrace both Cocoa and Javascript.
- 18pfsmt 15y agoI'm wondering what it would take to run your project on an old, jailbroken iPhone with a static IP on my LAN. Have you tried this?