What is the core usage of a Component Definition item?
Is it used to store the rendering parameters of the component? Or does it allow the component to be added to a placeholder? Or Both?
Component/Rendering/Sublayout (depending how you call it or which technology you are using WebForms or MVC) definition item is an item in Sitecore content tree which defines a rendering.
It is used for storing following information:
As you can see it describe the rendering in general. We can say it describe the type of a rendering (similar analogy to object oriented programming concept of type and instance of types)
It is used to store the rendering parameters of the component
No. Like I said above it is just a rendering (type) definition. If you add rendering to a page then it will create an instance of this rendering but rendering parameters won't be stored in component definition item but in __Renderings
or __Final Renderings
fields of your current page item)
This is how rendering instance is stored in one of those fields:
<r uid="{B343725A-3A93-446E-A9C8-3A2CBD3DB489}" s:par="Param1=Value1" />
Notice the s:par
attribute.
or it allows the components to be added to a placeholder?
To define whether rendering can be added to a particular placeholder is set in different place. Search for Placeholder Settings
to learn more.
This video might give you some overview:
Friday Sitecore Best Practice: How to Properly Use Placeholder Settings https://www.youtube.com/watch?v=HDNdVLFTNLc