SlideShare una empresa de Scribd logo
1 de 27
Nguyen Ba Quang
basquang@hotmail.com
http://basquang.spaces.live.com
http://msdnvietnam.net/blogs/quang


SharePoint
Web parts Development
Agenda
●   Web Parts fundamentals
●   Develop simple Web Part using VS 2008
●   Customization and Personalization
●   Design Web Part using VS 2008
●   How to create AJAX and Silverlight Web Parts
●   Web Parts Verbs the new features
●   Web Parts Connections




2    © 2006 Microsoft Corporation.   5/13/2012
3   © 2006 Microsoft Corporation.   5/13/2012
Web Parts Fundamental
● Web Parts are the fundamental building blocks for SharePoint’s
  user interface
● Web Parts are used within the site to enable further
  collaboration or integration within the site context
● There are some built-in Web Part in WSS 3.0 and MOSS 2007
    –   Content Editor Web Part
    –   User Tasks Web Part
    –   XML Web Part
    –   Business Data Catalog Filter Web Part
    –   Search Core Results Web Part
    –   …




4   © 2006 Microsoft Corporation.   5/13/2012
Web Part History
● Windows SharePoint Services 2.0 (WSS)
    – Designed with its own Web Part infrastructure
    – WSS serializes/stores/retrieves personalization data

● ASP.NET 2.0
    –   Designed with newer universal Web Part infrastructure
    –   Serializes/stores/retrieves personalization data
    –   More flexible and more extensible than WSS
    –   ASP.NET 2.0 does not support WSS v2 Web Parts

● Windows SharePoint Services 3.0 (WSS)
    – Backward-compatible with v2 Web Parts
    – Offers a layer on top of the ASP.NET 2.0 Web Part infrastructure


5   © 2006 Microsoft Corporation.   5/13/2012
Web Part Types for WSS v3

       ASP.NET 2.0 Runtime
                                                WSS v3 Runtime

               WSS Web Parts
               ASP Web Parts
                                                  ASP Web Parts


                                                 Hybrid Web Parts
            WSS v2 Runtime
                                                 WSS Web Parts
               WSS Web Parts




6   © 2006 Microsoft Corporation.   5/13/2012
WSS v3 Web Part Page Structure

                SPWebPartManager


           SPWebPartZone (Left)                 SPWebPartZone (Right)    Editor Zone

                    Web Part 1                       Web Part 3         Editor Part 1


                    Web Part 2                       Web Part 4         Editor Part 2


                                                     Web Part 5         Catalog Zone

                                                                        Catalog Part 1


                                                                        Catalog Part 2




7   © 2006 Microsoft Corporation.   5/13/2012
Developing simple Web Part using VS 2008
● Web Parts derive from ASP.NET 2.0 WebPart base class

using System;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;

namespace HelloWebPart {
[Guid("91f30b14-2172-4fbf-b0de-d9d28b5e3680")]
  public class HelloWorldWebPart : WebPart {
    protected override void CreateChildControls()   {
        base.CreateChildControls();
       // TODO: add custom rendering code here.
       Label label = new Label();
       label.Text = "Hello World";
       this.Controls.Add(label);}
        }
}


8   © 2006 Microsoft Corporation.   5/13/2012
Develop simple WebPart using VS 2008
● Step 1: Create new Project using SharePoint  WebPart
  template
● Step 2: Override CreateChildControls in webpart classs
● Step 3: Setting your SharePoint URL in Project properties 
  Debug tab  Start Browser with URL
● Step 4: Build and Deploy solution
● Step 5: Ready to test in SharePoint pages




9   © 2006 Microsoft Corporation.   5/13/2012
DEMO
Develop simple Web Part using VS 2008
Customization and Personalization
● Enable Web Parts to be reused for multiple business
  applications
● Customization refers to a change that is shared by all users of
  the Web Part instance.
     – Setting PersonalizationScope.Shared
● Personalization is specific to the individual user’s Web Part
  instance
     – Setting PersonalizationScope.User
● Editor Part is a special type of control that is used only to edit
  Web Part properties that support customization and
  personalization



11   © 2006 Microsoft Corporation.   5/13/2012
Create custom Editor Pad
● Step 1: create new WebPart project
● Step 2: Setting WebBrowsable to false in WebPart properties
● Step 3: Override CreateEditorParts method
● Step 4: Create new class derive from EditorPart
● Step 5: define controls and override CreateChildControls
● Step 6: override ApplyChanges and SyncChanges methods
● Step 7: Setting your SharePoint URL in Project properties 
  Debug tab  Start Browser with URL
● Step 8: Build and Deploy solution
● Step 9: Ready to test in SharePoint pages



12   © 2006 Microsoft Corporation.   5/13/2012
DEMO
Create RSS Reader Web Part
Design Web Part using VS 2008
● Problems:
     – Design UI in Web Part
     – Reuse existing Web pages
● Solutions:
     – Using Web User Control
     – Design using VS 2008
     – Host in Web Part using Page.LoadControl




14   © 2006 Microsoft Corporation.   5/13/2012
Create Web Part host User Controls
● Step 1: Create New WebPart project
● Step 2: Override CreateChildControls
     – Use Page.LoadControl to add UserControls
● Step 3: Create new Web Application project
● Step 4: Create new Web User Controls
● Step 5: Publish the Web Application to
  C:inetpubwwwrootwssVirtualDirectories[port
  number]UserControls
● Step 6: Setting your SharePoint URL in Project properties 
  Debug tab  Start Browser with URL
● Step 7: Build and Deploy WebPart
● Step 8: Ready to test in SharePoint pages

15   © 2006 Microsoft Corporation.   5/13/2012
DEMO
Web Part host User Controls
AJAX and Silverlight Web Part
● Problems:
     – Using AJAX in SharePoint
     – Host Silverlight in SharePoint
● Solutions:
     – Create AJAX and Silverlight in VS 2008
     – Configure SharePoint web.config to enable AJAX and
       Silverlight




17   © 2006 Microsoft Corporation.   5/13/2012
Create AJAX and Silverlight Web Part
● Step 1: config your SharePoint site to work with .NET 3.5
     – Modify in web.config of SharePoint Application
● Step 2: Create new Web Part project in VS 2008
● Step 3: Override OnLoad method to get ScriptManager object
● Step 4: Create AJAX and Silverlight in other project
● Step 5: Deploy your AJAX and Silverlight controls in SharePoint
  folders
● Step 6: Override CreateChildControls to Load AJAX and
  Silverlight controls
     – Use Page.LoadControl to add AJAX user controls
     – Silverlight.Source to load Silverlight controls



18   © 2006 Microsoft Corporation.   5/13/2012
DEMO
AJAX Web Part
Silverlight Web Part
Web Part Verbs
● Web Part Verb is an action that is rendered in the Web Part
  menu by the Web Part framework
● Web Part Verb action support:
     – Client-side function
     – Server-side handler




20   © 2006 Microsoft Corporation.   5/13/2012
Create Web Part Verbs
● Step 1: Create new Web Part project using VS 2008
● Step 2: Override Verbs Properties
public override WebPartVerbCollection Verbs         {
  get             {
        List<WebPartVerb> objVerbs = new List<WebPartVerb>();
        WebPartVerb verb = new WebPartVerb(this.ID, new
WebPartEventHandler(ServerSideHandler));
        verb.Text = "Click to execute server side code";
        verb.Visible = true;
        verb.Description = “Execute server side code";
        objVerbs.Add(verb);
        WebPartVerbCollection allverbs = new
WebPartVerbCollection(base.Verbs, objVerbs);
         return allverbs;
             }
         }


21   © 2006 Microsoft Corporation.   5/13/2012
DEMO
Web Part Verbs
Web Part Connections
● Enables reuse among diverse applications
● Frequently used for master/detail records
● Simple implementation:
     – Implementing custom interface
     – Using ConnectionProvider attribute
     – Using ConnectionConsumer attribute




23   © 2006 Microsoft Corporation.   5/13/2012
Create Connectable Web Part
● Step 1: Create new WebPart project as WebPart provider
● Step 2: Create new Interface
● Step 3: Implement interface in WebPart provider
● Step 4: Specify the data object with the ConnectionProvider
  attribute
● Step 5: Create new WebPart item in your project
● Step 6: Create a connection method with the
  ConnectionConsumer attribute




24   © 2006 Microsoft Corporation.   5/13/2012
DEMO
Web Part Connections
Resource and References

Microsoft SharePoint Products and Technologies Web sites

Web Parts in Windows SharePoint Services MSDN

Inside Microsoft Windows SharePoint Services 3.0 byTed PattisonandDaniel
Larson

Microsoft Office SharePoint 2007 Technical Enablement Tour by Patrick
Tisseghem (Managing Partner – U2U)
Section title here
Sub title here

Más contenido relacionado

La actualidad más candente

Building a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologiesBuilding a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologiesn_adam_stanley
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue MaterialEueung Mulyana
 
Sencha touchonbb10 bootcamp
Sencha touchonbb10 bootcampSencha touchonbb10 bootcamp
Sencha touchonbb10 bootcampn_adam_stanley
 
Asp.net difference faqs- 8
Asp.net difference faqs- 8Asp.net difference faqs- 8
Asp.net difference faqs- 8Umar Ali
 
Meet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssMeet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssAmasty
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump StartHaim Michael
 
Sg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanleySg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanleyn_adam_stanley
 
WebKit and Blink: open development powering the HTML5 revolution
WebKit and Blink: open development powering the HTML5 revolutionWebKit and Blink: open development powering the HTML5 revolution
WebKit and Blink: open development powering the HTML5 revolutionjuanjosanchezpenas
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.jsTechMagic
 
Becoming an IBM Connections Developer
Becoming an IBM Connections DeveloperBecoming an IBM Connections Developer
Becoming an IBM Connections DeveloperRob Novak
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01Vivek chan
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionMurat Doğan
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Luciano Mammino
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineAlexander Zamkovyi
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themVlad Fedosov
 
Android chromium web view
Android chromium web viewAndroid chromium web view
Android chromium web view朋 王
 

La actualidad más candente (20)

Building a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologiesBuilding a Next Generation Mobile Browser using Web technologies
Building a Next Generation Mobile Browser using Web technologies
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue Material
 
Sencha touchonbb10 bootcamp
Sencha touchonbb10 bootcampSencha touchonbb10 bootcamp
Sencha touchonbb10 bootcamp
 
Asp.net difference faqs- 8
Asp.net difference faqs- 8Asp.net difference faqs- 8
Asp.net difference faqs- 8
 
Frameworks in java
Frameworks in javaFrameworks in java
Frameworks in java
 
Meet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssMeet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis Lukss
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump Start
 
Vue, vue router, vuex
Vue, vue router, vuexVue, vue router, vuex
Vue, vue router, vuex
 
Sg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanleySg conference multiplatform_apps_adam_stanley
Sg conference multiplatform_apps_adam_stanley
 
WebKit and Blink: open development powering the HTML5 revolution
WebKit and Blink: open development powering the HTML5 revolutionWebKit and Blink: open development powering the HTML5 revolution
WebKit and Blink: open development powering the HTML5 revolution
 
Intro to vue.js
Intro to vue.jsIntro to vue.js
Intro to vue.js
 
BlackBerry WebWorks
BlackBerry WebWorksBlackBerry WebWorks
BlackBerry WebWorks
 
Becoming an IBM Connections Developer
Becoming an IBM Connections DeveloperBecoming an IBM Connections Developer
Becoming an IBM Connections Developer
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
 
Android chromium web view
Android chromium web viewAndroid chromium web view
Android chromium web view
 

Destacado

高一英语必修5 unit 5 first aid using language课件
高一英语必修5 unit 5 first aid using language课件高一英语必修5 unit 5 first aid using language课件
高一英语必修5 unit 5 first aid using language课件hangyupeng0319
 
SMX Presentation: "Google+: More than a +1 Trick Pony"
SMX Presentation: "Google+: More than a +1 Trick Pony"SMX Presentation: "Google+: More than a +1 Trick Pony"
SMX Presentation: "Google+: More than a +1 Trick Pony"Lucia Novara
 
Outsourced Innovation Case Study-Rose Acre Farm
Outsourced Innovation Case Study-Rose Acre FarmOutsourced Innovation Case Study-Rose Acre Farm
Outsourced Innovation Case Study-Rose Acre Farmadambcarney
 
Open innoveren in tijden van schaarste
Open innoveren in tijden van schaarsteOpen innoveren in tijden van schaarste
Open innoveren in tijden van schaarsteVincent Van Malderen
 
http://accountants.intorontonow.com
http://accountants.intorontonow.comhttp://accountants.intorontonow.com
http://accountants.intorontonow.comrobertwarner02
 
Project Open Badges Selor (Belgian Badges)
Project Open Badges Selor (Belgian Badges)Project Open Badges Selor (Belgian Badges)
Project Open Badges Selor (Belgian Badges)Vincent Van Malderen
 
Webデザイントレンドと a-blog cms に組み込みたい実装
Webデザイントレンドと a-blog cms に組み込みたい実装Webデザイントレンドと a-blog cms に組み込みたい実装
Webデザイントレンドと a-blog cms に組み込みたい実装takuo yamada
 
Instructional multimedia project final
Instructional multimedia project finalInstructional multimedia project final
Instructional multimedia project finalcrierson
 
pension jugement
pension jugementpension jugement
pension jugementraph98
 
Armed forces parade
Armed forces paradeArmed forces parade
Armed forces paradeRobert Bell
 
Concepciones sobre evolucion
Concepciones sobre evolucionConcepciones sobre evolucion
Concepciones sobre evolucionGerman Chaves
 
Outsourced Innovation- Cold Storage Research
Outsourced Innovation- Cold Storage ResearchOutsourced Innovation- Cold Storage Research
Outsourced Innovation- Cold Storage Researchadambcarney
 

Destacado (20)

Rbp ph
Rbp phRbp ph
Rbp ph
 
高一英语必修5 unit 5 first aid using language课件
高一英语必修5 unit 5 first aid using language课件高一英语必修5 unit 5 first aid using language课件
高一英语必修5 unit 5 first aid using language课件
 
Magazine TwentseWelle mei 2014
Magazine TwentseWelle mei 2014Magazine TwentseWelle mei 2014
Magazine TwentseWelle mei 2014
 
SMX Presentation: "Google+: More than a +1 Trick Pony"
SMX Presentation: "Google+: More than a +1 Trick Pony"SMX Presentation: "Google+: More than a +1 Trick Pony"
SMX Presentation: "Google+: More than a +1 Trick Pony"
 
Data communication
Data communicationData communication
Data communication
 
Outsourced Innovation Case Study-Rose Acre Farm
Outsourced Innovation Case Study-Rose Acre FarmOutsourced Innovation Case Study-Rose Acre Farm
Outsourced Innovation Case Study-Rose Acre Farm
 
Prueba
PruebaPrueba
Prueba
 
Czech competence model
Czech competence modelCzech competence model
Czech competence model
 
Open innoveren in tijden van schaarste
Open innoveren in tijden van schaarsteOpen innoveren in tijden van schaarste
Open innoveren in tijden van schaarste
 
http://accountants.intorontonow.com
http://accountants.intorontonow.comhttp://accountants.intorontonow.com
http://accountants.intorontonow.com
 
Project Open Badges Selor (Belgian Badges)
Project Open Badges Selor (Belgian Badges)Project Open Badges Selor (Belgian Badges)
Project Open Badges Selor (Belgian Badges)
 
Webデザイントレンドと a-blog cms に組み込みたい実装
Webデザイントレンドと a-blog cms に組み込みたい実装Webデザイントレンドと a-blog cms に組み込みたい実装
Webデザイントレンドと a-blog cms に組み込みたい実装
 
Instructional multimedia project final
Instructional multimedia project finalInstructional multimedia project final
Instructional multimedia project final
 
pension jugement
pension jugementpension jugement
pension jugement
 
Armed forces parade
Armed forces paradeArmed forces parade
Armed forces parade
 
Dka 2012
Dka 2012Dka 2012
Dka 2012
 
Industries sfx11
Industries sfx11Industries sfx11
Industries sfx11
 
Wireless Sensor Network
Wireless Sensor NetworkWireless Sensor Network
Wireless Sensor Network
 
Concepciones sobre evolucion
Concepciones sobre evolucionConcepciones sobre evolucion
Concepciones sobre evolucion
 
Outsourced Innovation- Cold Storage Research
Outsourced Innovation- Cold Storage ResearchOutsourced Innovation- Cold Storage Research
Outsourced Innovation- Cold Storage Research
 

Similar a SharePoint Web part programming

Parallelminds.web partdemo1
Parallelminds.web partdemo1Parallelminds.web partdemo1
Parallelminds.web partdemo1parallelminder
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22Niit Care
 
Parallelminds.web partdemo
Parallelminds.web partdemoParallelminds.web partdemo
Parallelminds.web partdemoManishaChothe
 
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...SPTechCon
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22Vivek chan
 
ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015Shahed Chowdhuri
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
ASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMShahed Chowdhuri
 
ASP.NET 5 Overview for Apex Systems
ASP.NET 5 Overview for Apex SystemsASP.NET 5 Overview for Apex Systems
ASP.NET 5 Overview for Apex SystemsShahed Chowdhuri
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Lucas Jellema
 
SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5Usman Zafar Malik
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam KamelHosam Kamel
 
SharePoint Framework
SharePoint FrameworkSharePoint Framework
SharePoint FrameworkVitaly Zhukov
 
Updated Resume
Updated ResumeUpdated Resume
Updated Resumechaunhi
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentationdimuthu22
 

Similar a SharePoint Web part programming (20)

Parallelminds.web partdemo1
Parallelminds.web partdemo1Parallelminds.web partdemo1
Parallelminds.web partdemo1
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
 
Parallelminds.web partdemo
Parallelminds.web partdemoParallelminds.web partdemo
Parallelminds.web partdemo
 
Microsoft Tech Ed 2006 #1
Microsoft Tech Ed 2006 #1Microsoft Tech Ed 2006 #1
Microsoft Tech Ed 2006 #1
 
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
 
ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015ASP.NET 5 Overview - Post Build 2015
ASP.NET 5 Overview - Post Build 2015
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
ASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTM
 
ASP.NET 5 Overview for Apex Systems
ASP.NET 5 Overview for Apex SystemsASP.NET 5 Overview for Apex Systems
ASP.NET 5 Overview for Apex Systems
 
ASP.NET OVERVIEW
ASP.NET OVERVIEWASP.NET OVERVIEW
ASP.NET OVERVIEW
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
 
ASP.NET 5 Overview
ASP.NET 5 OverviewASP.NET 5 Overview
ASP.NET 5 Overview
 
SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5SharePoint 2010 Training Session 5
SharePoint 2010 Training Session 5
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
 
A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net  A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam Kamel
 
SharePoint Framework
SharePoint FrameworkSharePoint Framework
SharePoint Framework
 
Updated Resume
Updated ResumeUpdated Resume
Updated Resume
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 

Más de Quang Nguyễn Bá

Lesson 09 Resources and Settings in WPF
Lesson 09 Resources and Settings in WPFLesson 09 Resources and Settings in WPF
Lesson 09 Resources and Settings in WPFQuang Nguyễn Bá
 
Lesson 08 Documents and Printings in WPF
Lesson 08 Documents and Printings in WPFLesson 08 Documents and Printings in WPF
Lesson 08 Documents and Printings in WPFQuang Nguyễn Bá
 
Lesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFLesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFQuang Nguyễn Bá
 
Lesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPFLesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPFQuang Nguyễn Bá
 
Lesson 02 Introduction to XAML
Lesson 02 Introduction to XAMLLesson 02 Introduction to XAML
Lesson 02 Introduction to XAMLQuang Nguyễn Bá
 
TDD - Test Driven Dvelopment | Test First Design
TDD -  Test Driven Dvelopment | Test First DesignTDD -  Test Driven Dvelopment | Test First Design
TDD - Test Driven Dvelopment | Test First DesignQuang Nguyễn Bá
 
Scrum sử dụng Team Foundation Server 2012
Scrum sử dụng Team Foundation Server 2012Scrum sử dụng Team Foundation Server 2012
Scrum sử dụng Team Foundation Server 2012Quang Nguyễn Bá
 
Introduction to Microsoft SQL Server 2008 R2 Integration Services
Introduction to Microsoft SQL Server 2008 R2 Integration ServicesIntroduction to Microsoft SQL Server 2008 R2 Integration Services
Introduction to Microsoft SQL Server 2008 R2 Integration ServicesQuang Nguyễn Bá
 
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2Quang Nguyễn Bá
 
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
Introduction to Microsoft SQL Server 2008 R2 Analysis ServiceIntroduction to Microsoft SQL Server 2008 R2 Analysis Service
Introduction to Microsoft SQL Server 2008 R2 Analysis ServiceQuang Nguyễn Bá
 
SharePoint 2010 Business Intelligence
SharePoint 2010 Business IntelligenceSharePoint 2010 Business Intelligence
SharePoint 2010 Business IntelligenceQuang Nguyễn Bá
 

Más de Quang Nguyễn Bá (20)

Lesson 09 Resources and Settings in WPF
Lesson 09 Resources and Settings in WPFLesson 09 Resources and Settings in WPF
Lesson 09 Resources and Settings in WPF
 
Lesson 08 Documents and Printings in WPF
Lesson 08 Documents and Printings in WPFLesson 08 Documents and Printings in WPF
Lesson 08 Documents and Printings in WPF
 
Lesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPFLesson 07 Actions and Commands in WPF
Lesson 07 Actions and Commands in WPF
 
Lesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPFLesson 06 Styles and Templates in WPF
Lesson 06 Styles and Templates in WPF
 
Lesson 05 Data Binding in WPF
Lesson 05 Data Binding in WPFLesson 05 Data Binding in WPF
Lesson 05 Data Binding in WPF
 
Lesson 04 WPF Controls
Lesson 04 WPF ControlsLesson 04 WPF Controls
Lesson 04 WPF Controls
 
Lesson 03 Layouts in WPF
Lesson 03 Layouts in WPFLesson 03 Layouts in WPF
Lesson 03 Layouts in WPF
 
Lesson 02 Introduction to XAML
Lesson 02 Introduction to XAMLLesson 02 Introduction to XAML
Lesson 02 Introduction to XAML
 
Lesson 01 Introduction to WPF
Lesson 01 Introduction to WPFLesson 01 Introduction to WPF
Lesson 01 Introduction to WPF
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
TDD - Test Driven Dvelopment | Test First Design
TDD -  Test Driven Dvelopment | Test First DesignTDD -  Test Driven Dvelopment | Test First Design
TDD - Test Driven Dvelopment | Test First Design
 
Scrum sử dụng Team Foundation Server 2012
Scrum sử dụng Team Foundation Server 2012Scrum sử dụng Team Foundation Server 2012
Scrum sử dụng Team Foundation Server 2012
 
Introduction to Microsoft SQL Server 2008 R2 Integration Services
Introduction to Microsoft SQL Server 2008 R2 Integration ServicesIntroduction to Microsoft SQL Server 2008 R2 Integration Services
Introduction to Microsoft SQL Server 2008 R2 Integration Services
 
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
Introduction to Business Intelligence in Microsoft SQL Server 2008 R2
 
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
Introduction to Microsoft SQL Server 2008 R2 Analysis ServiceIntroduction to Microsoft SQL Server 2008 R2 Analysis Service
Introduction to Microsoft SQL Server 2008 R2 Analysis Service
 
Office 2010 Programming
Office 2010 ProgrammingOffice 2010 Programming
Office 2010 Programming
 
Giới thiệu WCF
Giới thiệu WCFGiới thiệu WCF
Giới thiệu WCF
 
MOSS 2007 Overview
MOSS 2007 OverviewMOSS 2007 Overview
MOSS 2007 Overview
 
SharePoint Programming Basic
SharePoint Programming BasicSharePoint Programming Basic
SharePoint Programming Basic
 
SharePoint 2010 Business Intelligence
SharePoint 2010 Business IntelligenceSharePoint 2010 Business Intelligence
SharePoint 2010 Business Intelligence
 

Último

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Último (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

SharePoint Web part programming

  • 2. Agenda ● Web Parts fundamentals ● Develop simple Web Part using VS 2008 ● Customization and Personalization ● Design Web Part using VS 2008 ● How to create AJAX and Silverlight Web Parts ● Web Parts Verbs the new features ● Web Parts Connections 2 © 2006 Microsoft Corporation. 5/13/2012
  • 3. 3 © 2006 Microsoft Corporation. 5/13/2012
  • 4. Web Parts Fundamental ● Web Parts are the fundamental building blocks for SharePoint’s user interface ● Web Parts are used within the site to enable further collaboration or integration within the site context ● There are some built-in Web Part in WSS 3.0 and MOSS 2007 – Content Editor Web Part – User Tasks Web Part – XML Web Part – Business Data Catalog Filter Web Part – Search Core Results Web Part – … 4 © 2006 Microsoft Corporation. 5/13/2012
  • 5. Web Part History ● Windows SharePoint Services 2.0 (WSS) – Designed with its own Web Part infrastructure – WSS serializes/stores/retrieves personalization data ● ASP.NET 2.0 – Designed with newer universal Web Part infrastructure – Serializes/stores/retrieves personalization data – More flexible and more extensible than WSS – ASP.NET 2.0 does not support WSS v2 Web Parts ● Windows SharePoint Services 3.0 (WSS) – Backward-compatible with v2 Web Parts – Offers a layer on top of the ASP.NET 2.0 Web Part infrastructure 5 © 2006 Microsoft Corporation. 5/13/2012
  • 6. Web Part Types for WSS v3 ASP.NET 2.0 Runtime WSS v3 Runtime WSS Web Parts ASP Web Parts ASP Web Parts Hybrid Web Parts WSS v2 Runtime WSS Web Parts WSS Web Parts 6 © 2006 Microsoft Corporation. 5/13/2012
  • 7. WSS v3 Web Part Page Structure SPWebPartManager SPWebPartZone (Left) SPWebPartZone (Right) Editor Zone Web Part 1 Web Part 3 Editor Part 1 Web Part 2 Web Part 4 Editor Part 2 Web Part 5 Catalog Zone Catalog Part 1 Catalog Part 2 7 © 2006 Microsoft Corporation. 5/13/2012
  • 8. Developing simple Web Part using VS 2008 ● Web Parts derive from ASP.NET 2.0 WebPart base class using System; using System.Web.UI; using System.Web.UI.WebControls.WebParts; namespace HelloWebPart { [Guid("91f30b14-2172-4fbf-b0de-d9d28b5e3680")] public class HelloWorldWebPart : WebPart { protected override void CreateChildControls() { base.CreateChildControls(); // TODO: add custom rendering code here. Label label = new Label(); label.Text = "Hello World"; this.Controls.Add(label);} } } 8 © 2006 Microsoft Corporation. 5/13/2012
  • 9. Develop simple WebPart using VS 2008 ● Step 1: Create new Project using SharePoint  WebPart template ● Step 2: Override CreateChildControls in webpart classs ● Step 3: Setting your SharePoint URL in Project properties  Debug tab  Start Browser with URL ● Step 4: Build and Deploy solution ● Step 5: Ready to test in SharePoint pages 9 © 2006 Microsoft Corporation. 5/13/2012
  • 10. DEMO Develop simple Web Part using VS 2008
  • 11. Customization and Personalization ● Enable Web Parts to be reused for multiple business applications ● Customization refers to a change that is shared by all users of the Web Part instance. – Setting PersonalizationScope.Shared ● Personalization is specific to the individual user’s Web Part instance – Setting PersonalizationScope.User ● Editor Part is a special type of control that is used only to edit Web Part properties that support customization and personalization 11 © 2006 Microsoft Corporation. 5/13/2012
  • 12. Create custom Editor Pad ● Step 1: create new WebPart project ● Step 2: Setting WebBrowsable to false in WebPart properties ● Step 3: Override CreateEditorParts method ● Step 4: Create new class derive from EditorPart ● Step 5: define controls and override CreateChildControls ● Step 6: override ApplyChanges and SyncChanges methods ● Step 7: Setting your SharePoint URL in Project properties  Debug tab  Start Browser with URL ● Step 8: Build and Deploy solution ● Step 9: Ready to test in SharePoint pages 12 © 2006 Microsoft Corporation. 5/13/2012
  • 14. Design Web Part using VS 2008 ● Problems: – Design UI in Web Part – Reuse existing Web pages ● Solutions: – Using Web User Control – Design using VS 2008 – Host in Web Part using Page.LoadControl 14 © 2006 Microsoft Corporation. 5/13/2012
  • 15. Create Web Part host User Controls ● Step 1: Create New WebPart project ● Step 2: Override CreateChildControls – Use Page.LoadControl to add UserControls ● Step 3: Create new Web Application project ● Step 4: Create new Web User Controls ● Step 5: Publish the Web Application to C:inetpubwwwrootwssVirtualDirectories[port number]UserControls ● Step 6: Setting your SharePoint URL in Project properties  Debug tab  Start Browser with URL ● Step 7: Build and Deploy WebPart ● Step 8: Ready to test in SharePoint pages 15 © 2006 Microsoft Corporation. 5/13/2012
  • 16. DEMO Web Part host User Controls
  • 17. AJAX and Silverlight Web Part ● Problems: – Using AJAX in SharePoint – Host Silverlight in SharePoint ● Solutions: – Create AJAX and Silverlight in VS 2008 – Configure SharePoint web.config to enable AJAX and Silverlight 17 © 2006 Microsoft Corporation. 5/13/2012
  • 18. Create AJAX and Silverlight Web Part ● Step 1: config your SharePoint site to work with .NET 3.5 – Modify in web.config of SharePoint Application ● Step 2: Create new Web Part project in VS 2008 ● Step 3: Override OnLoad method to get ScriptManager object ● Step 4: Create AJAX and Silverlight in other project ● Step 5: Deploy your AJAX and Silverlight controls in SharePoint folders ● Step 6: Override CreateChildControls to Load AJAX and Silverlight controls – Use Page.LoadControl to add AJAX user controls – Silverlight.Source to load Silverlight controls 18 © 2006 Microsoft Corporation. 5/13/2012
  • 20. Web Part Verbs ● Web Part Verb is an action that is rendered in the Web Part menu by the Web Part framework ● Web Part Verb action support: – Client-side function – Server-side handler 20 © 2006 Microsoft Corporation. 5/13/2012
  • 21. Create Web Part Verbs ● Step 1: Create new Web Part project using VS 2008 ● Step 2: Override Verbs Properties public override WebPartVerbCollection Verbs { get { List<WebPartVerb> objVerbs = new List<WebPartVerb>(); WebPartVerb verb = new WebPartVerb(this.ID, new WebPartEventHandler(ServerSideHandler)); verb.Text = "Click to execute server side code"; verb.Visible = true; verb.Description = “Execute server side code"; objVerbs.Add(verb); WebPartVerbCollection allverbs = new WebPartVerbCollection(base.Verbs, objVerbs); return allverbs; } } 21 © 2006 Microsoft Corporation. 5/13/2012
  • 23. Web Part Connections ● Enables reuse among diverse applications ● Frequently used for master/detail records ● Simple implementation: – Implementing custom interface – Using ConnectionProvider attribute – Using ConnectionConsumer attribute 23 © 2006 Microsoft Corporation. 5/13/2012
  • 24. Create Connectable Web Part ● Step 1: Create new WebPart project as WebPart provider ● Step 2: Create new Interface ● Step 3: Implement interface in WebPart provider ● Step 4: Specify the data object with the ConnectionProvider attribute ● Step 5: Create new WebPart item in your project ● Step 6: Create a connection method with the ConnectionConsumer attribute 24 © 2006 Microsoft Corporation. 5/13/2012
  • 26. Resource and References Microsoft SharePoint Products and Technologies Web sites Web Parts in Windows SharePoint Services MSDN Inside Microsoft Windows SharePoint Services 3.0 byTed PattisonandDaniel Larson Microsoft Office SharePoint 2007 Technical Enablement Tour by Patrick Tisseghem (Managing Partner – U2U)

Notas del editor

  1. The primary task of the SharePoint developer is to build reusable components for business users. Business users in turn will take these components and build applications, customizing the application for the particular business need and personalizing the application for their own working style. This development mindset is in contrast to typical Windows or Web software that is deployed as a complete unit. With WSS technologies, the application is always evolving as business users employ deployed components to build their own applications and workspaces. Web Parts are used within the site to enable further collaboration or integration within the site context.Web Parts are the fundamental building blocks for SharePoint’s user interface, and with them we can build and integrate many different types of applications. The built-in Web Parts serve as good design examples when writing your own. For example, the Data View Web Part can be configured to point at any data source and display the data in many different ways. In the same way, all of the Web Parts that ship with WSS are generic and built for reuse. Although you may build more specific applications with Web Parts, it is important to be as generic as possible to allow the greatest flexibility for your customer, the business user, who can then configure the Web Part for a specific use.
  2. Customization and personalization of Web Parts enable your Web Parts to be reused for multiple business applications. Customization refers to a change that is shared by all users of the Web Part instance, whereas personalization is specific to the individual user’s Web Part instance. For example, the site owner may choose a specific news feed to display on a site’s home page. This would be a customization, because the change would be shared by all users of the site. Individual users on the site may choose different rendering formats according to their preferences, which would be an example of personalization. Personalization applies to individual users and is persisted on a per-user basis.To add a new custom property, just add a public property and the Personalizable attribute. The WebBrowsable, WebDisplayName, WebDescription, and Category attributes also will be useful in administering the property from the Web Part’s Editor Parts. These attributes are defined in the System.Web.UI.WebControls.WebParts and System.ComponentModel namespaces.If you create a property and apply the WebBrowsable attribute, the Web Part framework will automatically display this property in a generic Editor Part when the user selects Modify Web Part. An Editor Part is a special type of control that is used only to edit Web Part properties that support customization and personalization
  3. Sometimes you may have an existing Web page application that needs to be ported to SharePoint. It is relatively simple to do this by converting the pages to User Controls. Although User Controls aren’t recommended for all Web Part applications, they can be a quick way to get an ASP.NET application deployed into your SharePoint Web sites. User Controls deployed in SharePoint either must inherit from the UserControl class or from a UserControl-derived class that is available to the Web application (through either the bin directory or the GAC) and must exist in the same IIS Web application. Web Part code then can load the control and add it to your Web Part using the method Page.LoadControl. Since your User Control will exist on the file system and not in the content database, it can contain inline code if needed, since it isn’t processed through the Safe Mode Parser. Note that you cannot deploy User Controls through the content database. You only have to load the control and add it to the controls collection, and the Control framework will render it
  4. Enabling .NET 3.5 in SharePoint 2007 Sites (Include AJAX and Silverlight)Start Visual Studio 2008.Create a new dummy ASP.NET Web Application Project, and make sure you target the .NET Framework 2.0 (upper right dropdown of the New Project dialog). The name of this project is not important; you won’t need it anymore when we’re done.Copy the web.configof your SharePoint 2007 site, into the dummy Web Application project in Visual Studio.Open the Project Properties in Visual Studio (right click on the Project node in the Solution Explorer, and choose Properties; or in the Project menu, select WebApplicationX Properties).Select .NET Framework 3.5 in the Target Framework dropdown (select Yes in the confirmation dialog).Copy the web.config from the Web Application Project back to SharePoint.
  5. A Web Part Verb is an action that is rendered in the Web Part menu by the Web Part framework as part of the chrome that is rendered around the control. The action can call a client-side function or a server-side handler. To add Web Part Verbs as menu items, override the Verbs property of the Web Part. The Verbs property returns a read-only WebPartVerbCollection, so you will need to merge a collection of Verbs with the base.Verbs property to create a new WebPartVerbCollection.
  6. Web Part connections are another Web Part technology that enables reuse among diverse applications. Connections are frequently used for master/detail records and are used in Web Parts for late-bound connections. As long as a Web Part provides data that your Web Part can consume, it can be connected using the Web Part frameworkConnections are enabled through the ConnectionProvider attribute. The simplest way to add a connection to your Web Part is by implementing a custom interface such as the ICustomerProvider interface and specifying the data object with the ConnectionProvider attribute. To connect to the provider Web Part, the consumer Web Part simply marks a connection method with the ConnectionConsumer attribute.