Inheriting WebParts and Implementing DataProvider

Last post 11-25-2003 11:51 AM by jbusa. 4 replies.

Sort Posts:

  • Inheriting WebParts and Implementing DataProvider

    11-24-2003, 4:04 PM
    • Member
      15 point Member
    • jbusa
    • Member since 11-24-2003, 10:52 AM
    • Posts 3
    The WebParts in SharePoint 2003 are very nice and integrate well with Office 2003, such as the data grid for lists, Excel integration and Outlook. First, will these WebParts be available in Whidbey?

    Secondly if so, will they be extensible? Currently the WebParts in SharePoint 2003 have the attribute "sealed" on their C# classes so they are not extensible.

    Ideally the WebParts should be able to be inherited and give the developer the ability to implement virtual functions or interfaces to responde to callback events or implement a data provider layer.

    In SharePoint 2003, the WebParts read and write their data to specific places in the SQL database. As a developer, you should be able to define where you read or write data independent of the WebPart. Is this something that Whidbey WebParts will allow?












  • Re: Inheriting WebParts and Implementing DataProvider

    11-25-2003, 12:23 AM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 5:03 AM
    • Sweden
    • Posts 5,334
    • TrustedFriends-MVPs
    Please, read this.

    Personalization of a WebPart will use the new personalization manager shipped with Whidbey to save customized data.

    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
  • Re: Inheriting WebParts and Implementing DataProvider

    11-25-2003, 10:26 AM
    • Member
      15 point Member
    • jbusa
    • Member since 11-24-2003, 10:52 AM
    • Posts 3
    The question is not personalization, it is population of data within a WebPart. The WebParts built in SharePoint do not allow you to inherit them ( again they have the C# Sealed attribute on their classes ) and therefore you cannot specify an interface from where the data is read from or where it is written to. You are bound by where the WebPart expects to read and write data ( hardcoded ), mainly in specific tables in a sql database.

    Are you saying that the new personalization manager shipped with Whidbey will allow a developer to populate a WebPart from it's own datasource and write it to it's own datasource?

    Or are you just saying that if an individual user of the final application decides they want to have a different color size for the WebPart that these values will persist for that user in the personalization manager?

  • Re: Inheriting WebParts and Implementing DataProvider

    11-25-2003, 11:39 AM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 5:03 AM
    • Sweden
    • Posts 5,334
    • TrustedFriends-MVPs
    The new WebPart Framework shipped with Whidbey is only a framework that helps you to build WebParts (It‘s not the WebPart Framework shipped with SharePoint 2003, this is a new sort of WebPart that is more like the IBuySpy implementation. But they are similar to the WebPart framework shipped with SharePoint 2003). There will be a new version of SharePoint that uses this new ASP.Net 2.0 WebPart framework.

    The personalization manager will store the appearance of theWebparts, such as size, borders, which zone it will appear in, and even your own additional settings added like properties to your WebParts. But the rest, like getting data from a database etc is up to you to implement. But with the new SqlDataSource and the new GridView, DetailView and other controls will make it much easier then it was before. You don’t need to write one single line of code to retrieve data from a datasource, not even if you would like to have features like paging, sorting, updating in a gird. All of this code is already added to the new data controls.

    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
  • Re: Inheriting WebParts and Implementing DataProvider

    11-25-2003, 11:49 AM
    • Member
      15 point Member
    • jbusa
    • Member since 11-24-2003, 10:52 AM
    • Posts 3
    Thanks, exactly the information I was looking for!
Page 1 of 1 (5 items)