Biz kollektiv SharePoint həllər zaman düşüncə böyük sərf — necə yaratmaq, hansı aracı istifadə etmək üçün, onlar yerləşdirmək uğursuz zaman nə olur, timer iş, scopes, və s.. We spend so much time thinking about the up-front bits that it’s easy to forget that we need to retract them as well. Retracting solutions is probably more difficult, from a conceptual design perspective, than deploying them. Deployment is basically a cookbook affair. Typically, install a feature, maybe have a feature receiver load some data into a list, that sort of thing. Lakin, retracting is potentially more complex.
A given solution may create artifacts like these:
- Content Type
- List Definition
- Site Definition
- Data in a list
- Even receivers
- InfoPath forms
The list goes on.
While it’s obviously important to design a solution that instantiates those artifacts correctly, it’s just as important to consider the update and delete cases. If your solution creates a new list and populates that list with data, what happens when the solution is retracted? In some cases, the list should be deleted. In other cases, it should be left intact for historical purposes. Your business requirements will guide you to the right decision.
To help with this, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, one for create, update and delete. For each case, determine the correct outcome for that operation.
This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Lakin, like smoking, it’s never too late to start doing things correctly. Create that matrix and develop a plan to address the missing update/delete scenarios. It may be a hard problem to solve, but at least you’ll have put a box around the problem.
</son>
Da Twitter məni izləyin http://www.twitter.com/pagalvin
@no name
That’s what the Feature Receiver class is for. You write custom code to handle what ever you want within the Object Model in override methods within your custom Feature Reciever. See the MSDN article burada.
Hope that helps 🙂
@ Paul
I’m linking this article in this months SharePoint user group presentation because, as was discussed at this months SPUG, this is really a central issue to creating robust SharePoint features.
-john bender
nickelcode.com (blog)