I rather like the Emacs model of interactive functions. It allows you to build user-centric UIs whilst still being reusable.