It seems that #4 accomplishes what #1 alone does in other examples, but I’m not sure. It also seems as though #1 could be used for any of the above, but again I’m not sure.
Is there a benefit to using #2, #3, or #4, or could I just as well use #1 for all projects?
In general, I would always define a component and use it vs. create a text/stache script and render it with a view model.
In CanJS 4, we added the ability to upgrade an element that’s in the html to a component. Internally we call this auto-mounting, but I don’t think it’s a documented feature (it’s a by-product of CanJS components being backed by real custom elements). Some of our code examples haven’t been updated to take advantage of that, which is why you might see some recipes that show the “old” way.
The default type for a component’s ViewModel is a can-define/map/map, which is why you can just write ViewModel: { ... }. Just yesterday I opened a PR to make the docs a little more clear (feedback welcome): https://github.com/canjs/can-component/pull/268