Асаблівасці SharePoint & Рашэнні для кіравання — Не забывайце U ў CRUD (або D на тое пайшло)

Мы ўсе разам праводзім шмат часу, думаючы аб рашэннях SharePoint — як іх ствараць, Які інструмент выкарыстоўваць, што адбываецца, калі яны не ў стане разгарнуць, Заданні таймера, Вобласці, і г.д.. 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, З канцэптуальнай пункту гледжання дызайну, than deploying them. Deployment is basically a cookbook affair. Typically, ўсталяваць кампанент, можа быць, ёсць функцыя прымача загрузіць некаторыя дадзеныя ў спіс, that sort of thing. Аднак, ўцягванне з'яўляецца патэнцыйна больш складаных.

Дадзенае рашэнне можа стварыць падобныя артэфакты:

  • Тып кантэнту
  • Вызначэнне спісу
  • Вызначэнне сайта
  • Дадзеныя ў спісе
  • Нават рэсіверы
  • InfoPath Forms

Гэты спіс можна працягваць.

У той час як гэта, відавочна, важна распрацаваць рашэнне, якое стварае асобнік гэтых артэфактаў правільна, 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, што адбываецца, калі раствор адводзіцца? 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.

Каб дапамагчы ў гэтым, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, адзін для стварэння, абнаўлення і выдалення. For each case, вызначыць правільны вынік для гэтай аперацыі.

This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Аднак, як курэнне, 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, але па меншай меры, вы паставілі рамку вакол праблемы.

</канец>

Падпісацца на мой блог.

Выконвайце за мной на Twitter у http://www.twitter.com/pagalvin

Technorati Тэгі:

2 думкі пра «Асаблівасці SharePoint & Рашэнні для кіравання — Не забывайце U ў CRUD (або D на тое пайшло)

  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 тут.

    Hope that helps 🙂

    @ Пол

    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 (блог)

  2. Майк 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.

Пакінуць каментар да Майк Birtwistle адмяніць адказ

Ваш электронны адрас не будзе апублікаваны. Абавязковыя палі пазначаныя * *