How to share function or data between APPs?

Hello,
is there a way how to share function or data between two apps? For example like “file” API in OCP?
Kind regards,
Bob

Not so easily, but there are ways.

What exactly are you trying to achieve?

Thank you Christoph,
I would like to extend Calendar app (add some tabs into the events) but as I cant find an easy solution, I decide to change calendar app directly (first idea was change few rows and everything take from 2nd app).
Kind regards,
Bob