Let me show this using Nxt DNS as an example.
What I have to do to add Nxt DNS
1] Add a new subtype of messages -- SUBTYPE_MESSAGING_DOMAIN
2] Add code for processing "resolveAlias" request -- ~30 lines of code
That's it. Now an Nxt node processes transactions that set domain aliases and requests from JavaScript that asks for real address.