What is proper author order when you write paper based on colleague's work?
In this particular case 


Author of the framework
you
your advisor


but that is strongly dependent on your local and institutions' customs and practices. Ask your advisor informally. When still in doubt, always add yourself second to the first draft. If appropriate, your advisor will suggest moving you to first position, which is a lot less embarrasing than the other way around (your advisor suggesting you should take your name down a notch)