Thread:Project:Support desk/Implement my business logic using MediaWil

I can create my personal page(template), but how and where I can implement my business logic?and how to add it to the MediaWiki?(I will put on my personal page info about companies from db with certain preprocessing)