25
Extending SharePoint Extending SharePoint through Web Parts and through Web Parts and ASP.NET ASP.NET 최최최 최최 최최최 최최 ([email protected]) ([email protected]) 최최최최최최최최최 최최최최최최최최최

Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Embed Size (px)

DESCRIPTION

Summary of.NET support  WSS will use ASP.NET instead of ISAPI for base page execution  Web Part Framework  Server Object Model for programmatic access to SharePoint data  We offer functionality as XML web services for access from remote machines

Citation preview

Page 1: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Extending SharePoint Extending SharePoint through Web Parts and through Web Parts and ASP.NETASP.NET

최승현 대리최승현 대리([email protected])([email protected])한국마이크로소프트한국마이크로소프트

Page 2: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Built on .Net Built on .Net FrameworkFramework

Windows SharePoint Server (WSS) v2 is Windows SharePoint Server (WSS) v2 is built on top of the .Net Frameworkbuilt on top of the .Net Framework

WSS will ship as part of the OS; SharePoint WSS will ship as part of the OS; SharePoint Portal Server is built on top of WSSPortal Server is built on top of WSS

WSS has made large investments in WSS has made large investments in developer extensibilitydeveloper extensibility

By embracing .NET, WSS is positioned to By embracing .NET, WSS is positioned to leverage future advances in the platformleverage future advances in the platform

Page 3: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Summary of .NET Summary of .NET supportsupport

WSS will use ASP.NET instead of ISAPI for WSS will use ASP.NET instead of ISAPI for base page executionbase page execution

Web Part FrameworkWeb Part Framework Server Object Model for programmatic Server Object Model for programmatic

access to SharePoint dataaccess to SharePoint data We offer functionality as XML web services We offer functionality as XML web services

for access from remote machinesfor access from remote machines

Page 4: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Custom ControlsWeb Custom Controls Controls map directly to the XML (CAML) Controls map directly to the XML (CAML)

tags used on the WSS site pages:tags used on the WSS site pages: ListViewWebPartListViewWebPart A web custom control A web custom control

that will output a SharePoint viewthat will output a SharePoint view ListFormWebPartListFormWebPart A web custom control A web custom control

that will output a SharePoint form.that will output a SharePoint form. ViewSelectorViewSelector A web custom control for A web custom control for

representing a view selector.representing a view selector. ListPropertyListProperty A web custom control that A web custom control that

returns a property of a listreturns a property of a list ProjectPropertyProjectProperty A web custom control A web custom control

that returns a given web propertythat returns a given web property

Page 5: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Part FrameworkWeb Part Framework Personalize Personalize your SharePoint home page to your SharePoint home page to

simplify and focus on the information that simplify and focus on the information that is most relevant to you.is most relevant to you.

Authors Authors build custombuild custom solutions using Web solutions using Web Parts and Web Part Pages.Parts and Web Part Pages.

.NET developers .NET developers extendextend SharePoint by SharePoint by encapsulating web services and enterprise encapsulating web services and enterprise data as Web Partsdata as Web Parts

Page 6: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Extending the PlatformExtending the Platform Web Part Pages Web Part Pages

Scalable Dashboards v2Scalable Dashboards v2 Framework for extending SharePointFramework for extending SharePoint

Web PartsWeb Parts ASP.NET web custom controls are the ASP.NET web custom controls are the

building blocks of Web Part Pagesbuilding blocks of Web Part Pages Visual display of SharePoint liWSS, web Visual display of SharePoint liWSS, web

services, corporate information, etc.services, corporate information, etc. End users, authors, and developersEnd users, authors, and developers

Page 7: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Using Web Part PagesUsing Web Part Pages Shared ViewShared View and and Personal View Personal View allows allows

users to simplify and focus on the most users to simplify and focus on the most important information. important information.

Find and integrate data from many sources. Find and integrate data from many sources. Layout and settings are easy to configure. Layout and settings are easy to configure. Catalogs offer new content to add to your Catalogs offer new content to add to your

page.page. Information is available on other browsers.Information is available on other browsers.

Page 8: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Portable Web Parts Portable Web Parts Web Part is a .Net web custom control Web Part is a .Net web custom control

assemblyassembly DWP files contain meta-data describing the DWP files contain meta-data describing the

instance of the partinstance of the part Code doesn’t travel with the partCode doesn’t travel with the part Box administrators must install the Box administrators must install the

assemblyassembly

Page 9: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

DWP SampleDWP Sample

Page 10: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

FrontPageFrontPage Continues to be a great tool for customizing Continues to be a great tool for customizing

SharePoint sitesSharePoint sites Visual presentations on web services Visual presentations on web services

without writing code using the DataView without writing code using the DataView Web PartWeb Part

Setting zone propertiesSetting zone properties Editing the Html page layoutEditing the Html page layout Link fix-up of base-class partsLink fix-up of base-class parts

Page 11: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Parts for AuthorsWeb Parts for Authors

HTML view of List HTML view of List Content Editor Content Editor Page ViewerPage Viewer

DataViewDataView XML/XSLXML/XSL

Web Capture Web PartWeb Capture Web Part Spreadsheet Spreadsheet PivotViewPivotView ChartViewChartView Grid View of ListGrid View of List

Office:

Windows SharePoint Server:

Page 12: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Connecting Parts Connecting Parts TogetherTogether

Parts sending messages to other Parts sending messages to other partsparts RCA cablesRCA cables Standardized client and server interfacesStandardized client and server interfaces

Web Part interfacesWeb Part interfaces IListIList IRowIRow ICellICell IFilterIFilter TransformsTransforms

Page 13: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Key Features for Key Features for DevelopersDevelopers An extension to the .Net Framework:An extension to the .Net Framework:

Installed when you install WSS v2Installed when you install WSS v2 Web Part Pages are ASP.NET pagesWeb Part Pages are ASP.NET pages Web Parts are ASP.NET web custom Web Parts are ASP.NET web custom

controls controls Scales out for large server farmsScales out for large server farms

Use Visual Studio to quickly build, Use Visual Studio to quickly build, test, and deploy custom Web Parts. test, and deploy custom Web Parts.

Page 14: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Part ZonesWeb Part Zones Stuff on the Page…Stuff on the Page…

Web Part Zones are embedded directly on the Web Part Zones are embedded directly on the pagepage

Stuff in the db…Stuff in the db… All usersAll users and and just for mejust for me web parts inside zones web parts inside zones

are stored in the SharePoint are stored in the SharePoint WebPartsWebParts table table Personalizations are stored in the SharePoint Personalizations are stored in the SharePoint

PersonalizationsPersonalizations table table

<SmartPages:WebPartZone runat="server" <SmartPages:WebPartZone runat="server" Title=“Left ZoneID=“…" Title=“Left ZoneID=“…" Orientation="Vertical“Orientation="Vertical“AllowCustomization=“true”AllowCustomization=“true”AllowPersonalization=“true”/>AllowPersonalization=“true”/>

Page 15: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Part ZonesWeb Part Zones

ASP.NET Page

Zone

2

Zone 1

Zone

3

Web PartWeb PartFrameworkFramework

ContentDB

ASP.NET Page

Web Custom Controls

Page 16: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Zone PropertiesZone Properties Layout PropertiesLayout Properties

IDID OrientationOrientation ContainerWidthContainerWidth TitleTitle FrameTypeFrameType

Lockdown PropertiesLockdown Properties LockLayoutLockLayout AllowCustomizationAllowCustomization AllowPersonalizationAllowPersonalization

Page 17: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

PropertiesProperties Base class propertiesBase class properties Custom PropertiesCustom Properties

Default property sheet for browseable Default property sheet for browseable properties with builder infrastructureproperties with builder infrastructure

Use ToolParts for creating custom Use ToolParts for creating custom property UIproperty UI

There are limited types because we are There are limited types because we are serializing properties: serializing properties: string, bool, int, float, enum, string, bool, int, float, enum,

System.DateTime, and System.DateTime, and System.Drawing.KnownColorSystem.Drawing.KnownColor

Page 18: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Part PropertiesWeb Part Properties[Category("Custom Properties")][Category("Custom Properties")][WebPartStorage(Storage.PerUser)][WebPartStorage(Storage.PerUser)][FriendlyNameAttribute("Custom Integer")][FriendlyNameAttribute("Custom Integer")][Description("Type an integer value.") ][Description("Type an integer value.") ][Browsable(true)][Browsable(true)][XmlElement(ElementName="SuperInt")][XmlElement(ElementName="SuperInt")]

public int MyIntpublic int MyInt{{

getget{{ return _myInt;return _myInt; }}setset{{ _myInt = value;_myInt = value; }}

}}

Page 19: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Part CachingWeb Part Caching Using code developers have the ability to Using code developers have the ability to

cache rendered outputcache rendered output Two types of web part application cachingTwo types of web part application caching

ASP.NET web server memory cachingASP.NET web server memory caching Database cachingDatabase caching

Web.config setting for which typeWeb.config setting for which type

Page 20: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Other Framework Other Framework FeaturesFeatures

Run-time filter enables the ability to turn Run-time filter enables the ability to turn parts on and offparts on and off

Developers can add and remove Web Part Developers can add and remove Web Part menu itemsmenu items

Developers can create custom views of the Developers can create custom views of the Task Pane using ToolPartsTask Pane using ToolParts

Page 21: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Part Code Access Web Part Code Access SecuritySecurity Code access security (CAS) allows box Code access security (CAS) allows box

administrators grant specific rights to administrators grant specific rights to assembliesassemblies Goal of CAS is to separate access rights of Goal of CAS is to separate access rights of

the user from the access rights of the the user from the access rights of the assemblyassembly

Admin can deny access to local resources Admin can deny access to local resources for partial trusted assembliesfor partial trusted assemblies

Admin can allocate trust based on Admin can allocate trust based on signatures, strong names, and certificatessignatures, strong names, and certificates

Page 22: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Rights and RolesRights and Roles WSS has 4 user rolesWSS has 4 user roles

Reader—Cannot change web part Reader—Cannot change web part propertiesproperties

ContributorContributor Pages in webs—Can make personal Pages in webs—Can make personal

changeschanges Pages in document libraries—Can make Pages in document libraries—Can make

authoring changes along with authoring changes along with personal changespersonal changes

Web Designer—Can make authoring Web Designer—Can make authoring changes for all pageschanges for all pages

Administrator—Can upload web parts to the Administrator—Can upload web parts to the web part catalogweb part catalog

Page 23: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

SecuritySecurity Only registered set of web custom controls Only registered set of web custom controls

will run in SharePoint pageswill run in SharePoint pages Inline script in the page will not executeInline script in the page will not execute

Code behind in pages can be made to Code behind in pages can be made to workwork

All Executable code (e.g. web custom All Executable code (e.g. web custom controls, web parts, and code-behind controls, web parts, and code-behind classes) needs to be installed on physical classes) needs to be installed on physical web serverweb server

Page 24: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트

Web Services Object Web Services Object ModelModel

GetSmartPageDocument GetSmartPageDocument SaveWebPart SaveWebPart DeleteWebPart DeleteWebPart RenderWebPartForEdit RenderWebPartForEdit GetWebPart GetWebPart AddWebPart AddWebPart GetWebPartPropertiesGetWebPartProperties

GetXmlDataFromDataSource GetXmlDataFromDataSource GetWebPartCrossPageCompatiGetWebPartCrossPageCompati

bility bility GetSmartPageConnectionInfo GetSmartPageConnectionInfo GetWebPartsForDocGetWebPartsForDoc

Rich web service support for driving sites.Rich web service support for driving sites. FrontPage uses these public web services for page FrontPage uses these public web services for page

authoring.authoring. Path to web services: Path to web services:

http://[servername]/_vti_bin/smartpgs.asmxhttp://[servername]/_vti_bin/smartpgs.asmx

Page 25: Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트