First i had to get a basic understanding of how it all worked, these pages helped a lot. (but you have to be careful of pages relating to the beta)
Adding a few simple buttons, i found out that adding a global button was not very straight forward. For starters most of the examples bind to lists, but i wanted to bind to all lists. Easy enough to change the RegistrationType to ContentType, just like you do with workflows and then the RegistrationId would be 0x01, the root content type of everything.
I tried to apply what i had learnt from the examples, to this global button, but it ended up in a mess.
Take these two list types as examples:
100 (GenericList) has a ContextualGroup "List Tools" with Tab "Items" and "List"
101 (DocumentLibrary) has a ContextualGroup "Library Tools" with Tabs "Documents" and "Library"
Each list type has different and unique Location paths, so you need to have a CommandUIDefinition for each location. Sure, i could duplicate the CommandUIDefinition definitions, but eventually someone would add a new list definition, with a different ribbon, and my button would not display. And duplicating xml definitions bugs me. It must be pointed out though that some people would not want an extra tab cluttering up their ribbon.
Then it hit me, i didn't have to add this button to an existing tab, i could create my own and that way the Location would be the same, globally. First i tried to create it as a ContextualGroup. Why would i do that? Well it would be cool to have a ContextualGroup called say Custom and then developers could add their custom actions to it. Unfortunately i couldn't get it to work without code. ContextualGroups need to be showed from code, which kind of makes sense (because they are contextual). So i just ended up with a simple Tab instead.
I ended up with something like this
<?xml version="1.0" encoding="utf-8"?>
ToolTipDescription="Opens Show In configuration"
Alt="Show In" />
<Layout Title="Large" LayoutTitle="Large">
<Section Alignment="Top" Type="OneRow">
<ControlRef DisplayMode="Large" TemplateAlias="button1" />