Help with Cloud and Server Atlassian Common Code

Hi,

Is there any guide for how to use Cloud and Server Atlassian Common Code?
Or are there any additional resources about reusing code for both Atlassian Connect and Plugins 2?