This post was migrated from an older system. Some links may point to content that no longer exists. Comments were not migrated.
One of the nicest new web part framework features in SharePoint 2010 is Web Part versioning.
Remember all those times you've edited a page only to misconfigure or delete a web part? Versioning may help you unwind your mistakes, but it depends on how you are making edits.
How does it work?
- Web Part instances are versioned only when a page is checked in.
- Only Shared instances are versioned
- Versioning is controlled by the document-level settings.
If you are editing in any of the following conditions, versioning will not occur:
- Editing Personalized or Personal Web Parts
- Editing a page that is not checked out
Under these conditions, edits occur as they always have... directly and w/o opportunity to fall back to a saved state.
As you can see Web Part versioning is really targeted toward protecting the broadest, most common usage scenarios. If you are not checking in/out, you'll never see Web Part versioning at work. Likewise, if you are dealing with anything other than a Shared Web Part, versioning does not occur.
What are the developer ramifications?
In it's simplicity, there nothing that you as a developer can really do. The web part instances will either be on the page or they will not.
There is no visibility into a Web Part's history or opportunities for a Web Part to control its own destiny. Web Part versioning is directly tied to the page history.
The only side effect of versioning that I can foresee is the very same issue that people have with document version histories. Each version is a complete instance/copy. Therefore, if you are storing large amounts of data in a web part property, be aware that versioning will automatically force the user to consume more of their storage allocation.
In short, Web Part versioning is available and is really designed to be transparent to the developer and the end user. The parts that are instantiated are completely dependent on the page version that is being rendered.