SharePoint Features & Solucións de Xestión — Non esqueza da U en CRUD (ou D para que a materia)

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>

Rexístrate para o meu blog.

Siga-me no Twitter http://www.twitter.com/pagalvin

2 pensamentos sobre "SharePoint Features & Solucións de Xestión — Non esqueza da U en CRUD (ou D para que a materia)

  1. John Bender

    @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)

    Responder
  2. Mike Birtwistle
    When I started developing solutions and features I did look for a setting somewhere in the definition that defines what happens on deletion or update. It left me wondering if there should be a few built in behaviours to a WSP – or a swtich on stsadm – that do some of the common tasks you mentioned above such as on deleting a solution – remove everything or leave everything and on updating – remove and replace or simply update the definition and then have the option of doing a custom action in a feature receiver.
    Responder

Deixe unha resposta Mike Birtwistle cancelar resposta

Enderezo de correo electrónico non será publicado. Os campos obrigatorios están marcados *