Nós colectivamente gastar moito tempo a pensar sobre o SharePoint solucións — como crealos, cal ferramenta utilizar, o que ocorre cando non poden implantar, traballos de timer, alcance, etc. 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, desde unha perspectiva de deseño conceptual, than deploying them. Deployment is basically a cookbook affair. Typically, instalar un recurso, quizais un receptor de recurso cargar algúns datos nunha lista, that sort of thing. Con todo, retracción é potencialmente máis complexo.
A solución dada pode crear artefactos como estes:
- Tipo de contido
- Definición de lista
- Definición da web
- Datos nunha lista
- Mesmo receptores
- Os formularios de InfoPath
A lista segue.
Aínda que sexa obviamente importante para proxectar unha solución que instancia os artefactos correctamente, 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, o que ocorre cando a solución é retraído? 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.
Para axudar con iso, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, un para crear, actualizar e borrar. For each case, determinar o resultado correcto para que a operación.
This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Con todo, como o tabaquismo, 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, pero polo menos vai ter colocar unha caixa en torno ao problema.
</final>
Siga-me no Twitter 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 aquí.
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)