Skip to content

Node.js + Gtk = hxGtk2

April 21, 2010

I’ve updated my hxGtk2 project to use node.js as it’s base rather than neko – actually neko is still there but it’s currently out of date.

This project uses gtk-server and communicates to gtk over either tcp or stdin by passing simple strings – which is rather perfect for node and it’s child process functionality.

It’s not in any way complete, I’ve have wrapped a few classes and functions  but I think the structure is looking ok. It works with Glade so you can load form layout from a .glade file.

What’s really great, is I have an entire stack based on haXe, client and server, and if I really want can also target flash, or php etc all from one language – and crucially use the same datastructures on any tier.

For example, I have a have my bingo system which has an account server, bingo server, chat server and client controller which are all haxe and node.js. I can now test the entire system outside of the browser using hxGtk2. The client controller simply raises events to whoever is listening, that may be the node.js gtk interface or it may be the browser – but it’s exactly the same controller compiled with haXe to js – or if I was inclined the controller could also be the foundation of a flash client.

I’ve updated hxGtk2 on github, it’s not very coherent right at this moment, but it’s working quite well, I’ll be continuing to update in the coming days and months as I use it for my latest project.



From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: