How to create a node based shader editor?

Hi
I need to add something like this to my engine:
http://www.torquepowered.com/community/forums/viewthread/106073 http://www.torquepowered.com/community/forums/viewthread/106073
But I actually don’t know how these editors work? When working with shaders, we must pass uniform data to the shaders and write the code of the fragment and vertex shader. But how we can achieve this with a node based shader editor?
Are there any books about such node based shader editors?
Unreal Engine and Maya also have such editor.
Thanks