Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Parts Overview Web parts in SharePoint 2007 “Hello World” web part Typical deployment.

Slides:



Advertisements
Similar presentations
Module 4: Deploying and Managing BizTalk Applications
Advertisements

Randy Williams, MOSS MVP Senior Consultant Synergy Corporate Technologies.
PCT401 – Security for the SharePoint Developer Eugene Rosenfeld Black Blade Associates
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Microsoft Office SharePoint 2007 Technical Enablement Tour Patrick Tisseghem (Managing Partner – U2U)
Advanced Object-Oriented Programming Features
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
Lesson 18: Configuring Application Restriction Policies
Site Provisioning Options Web Template Fundamentals Web Templates and App Webs Custom Solutions for Site Provisioning Wrap Up.
Definitions Collaboration – working together on team projects and sharing information, often through ad-hoc processes, to accomplish project goals. Document.
Branding SharePoint 2007 March 19, 2008 Lori Neff, SharePoint Designer.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
A GUIDE TO SHAREPOINT 2007 CUSTOMIZATION OPTIONS Heather Solomon, WSS MVP.
Welcome to the Minnesota SharePoint User Group. Quick Intro Announcements Personalization in SharePoint Configuring User Profiles Configuring Audiences.
OFC406 Windows SharePoint Services (version 3) Development 2: ASP.NET, Web Parts, Master Pages, Field Types, and More Ted Pattison Researcher and Trainer.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Integrating CFML with ASP.NET Vince Bonfanti President New Atlanta Communications, LLC.
| | Tel: | | Computer Training & Personal Development Microsoft Office PowerPoint 2007 Expert.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
IT 211 Project Integration and Deployment Lab #11.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Sustainable SharePoint 2010 Customizations By Bill Keys.
11 MANAGING AND DISTRIBUTING SOFTWARE BY USING GROUP POLICY Chapter 5.
Basic Developer Knowledge That Every SharePoint Admin Must Have Randy Williams, MVP MOSS Synergy Corporate Technologies
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Overview Scale out architecture Servers, services, and topology in Central Administration.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Workflow Development Overview Architecture Requirements Types of workflows Stages of workflow.
.NET Framework Danish Sami UG Lead.NetFoundry
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
WSS “v3” for Developers Jan Tielens Blog: Architect & Trainer U2U, Brussels.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Sites Lists Advanced Site collection administration –Moving sites –Save site as template.
HOW SHAREPOINT WORKS By Gary Newman. Root Folder Virtual Directories SP Farm DNS Iterative Forward DNS query for A host record HTTP request HTML & JS.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Definitions Collaboration – working together on team projects and sharing information,
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Customization Using SharePoint Designer 2007 Overview Editing look and feel –Master pages.
Module 9 Configuring Messaging Policy and Compliance.
Slide 1.NET Development for Project 2003 Samples from the Project 2003 SDK Jim Corbin Programmer Writer Office Developer Documentation Microsoft Corporation.
Welcome to the Minnesota SharePoint User Group. Develop and support a local community focused on Microsoft SharePoint Technologies Educate user group.
Eric Maurer Copyright Keller Schroder 6/11/2008. Types of Customization Customize pre-installed Microsoft Web Parts i.e. Content Editor Web Part Write.
Module 6 Securing Content. Module Overview Administering SharePoint Groups Implementing SharePoint Roles and Role Assignments Securing and Auditing SharePoint.
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Event Handlers Overview Classes Simple Event Handler from the SDK Deployment –Object model.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. SharePoint API and Development in ASP.NET Creating “Hello World” application Working with.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Office Server Specific Web content management –Page structure, layouts, and controls –Publishing.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Profiles and Active Directory Overview User profiles –Import from Active Directory –Creating.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
Sofia, Bulgaria | 9-10 October ASP.NET: Developing Portal UI With Web Parts Goksin Bakir Yage Ltd Microsoft Regional Director, MEA Goksin Bakir Yage Ltd.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Office Integration Outlook –SharePoint lists in outlook –Documents in outlook InfoPath.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Impersonation in SharePoint Developers use impersonation when an application needs to.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Search Overview Search Features: WSS and Office Search Architecture Content Sources and.
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Security Overview Functional security – users, groups, and permissions for sites, lists,
Microsoft ® Official Course Developing a Publishing Site for Web Content Microsoft SharePoint 2013 SharePoint Practice.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Site Definitions and Features Overview Review of SharePoint 2003 site definitions What’s.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Course Overview Introduction Target Audiences Course Structure Virtual PC Demo.
Configuring and Deploying Web Applications Lesson 7.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트.
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
Windows SharePoint Services v3.0 Martin Parry Developer & Platform Group Microsoft Limited
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Packaging and Deploying Windows Applications
Developing GIS WebParts in SharePoint
Matt Gibbs ASP.NET Development Manager
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Parts Overview Web parts in SharePoint 2007 “Hello World” web part Typical deployment in development environment Properties Using user controls in a web part Security Production deployment

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Parts Overview Web parts in SharePoint 2007 are using ASP.NET 2.0 web part technology. Although SharePoint 2007 still supports 2003 web parts, any current or future development should be done using ASP.NET 2.0 web parts.

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Part Page Structure Web Part Page inherits from SharePoint Web Part Page class and usually has the following components WebPartManager - manages all WebParts; has no user interface. WebPartZone - a container for web parts; provides a layout. WebPart - any control that extends WebPart class CatalogZone - a container for CatalogPart controls. CatalogPart - presents web parts available for addition to the page. EditorZone - a container for EditorPart controls. EditorPart - a control that allows modification to web part properties.

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Typical Development Process Create a new web control project that will contain classes that inherit from web parts Specify the project output to bin folder of a specific web application Register the assembly as safe within the web application Use the web part gallery on a site to make the web part available to be used on pages and add the web part to the page Make changes to the web part code, build the project, and test changes.

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Simple Web Part SayHello.cs is the c# code file for the web part class AssemblyInfo.cs file specifies version and other information to be used in a strong name References contains a reference to Microsoft.SharePoint dll and to System.Web Install web part templates in Visual Studio.NET (This will not be available until final release) Start a “web control library” project

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Hello Word Web Part using System.Web.UI; using System.Web.UI.WebControls.WebParts; namespace HelloWorld { public class SayHello : WebPart { protected override void RenderContents(HtmlTextWriter output) { output.Write("Hello there"); }

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Changing Project Properties Change the project build properties to output assembly to bin folder of a web application root. (drive:\Inetpub\wwroot\wss\VirtualDirectories\ \bin) Deployment to web application bin folder simplifies the debugging process in comparison to GAC deployment which requires iisreset. Optionally: Change the project signing properties to sign the assemby which will give an assembly a strong name HelloWorld, Version= ,Culture=Neutral,PublicKeyToken=894812d009aa4cc94

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Change web.config in a Web Application Change to web.config of a web application to register the assembly in section Change the trust level to Full to lift security restrictions since the assembly is not in GAC (Alternatively, create a custom policy file, to be covered later)

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Add Web Part to a Web Part Page A web part deployed to a web application and registered as safe is available for addition into a web part gallery (there is only one web part gallery per site collection). Using a new button, administrator or developer can add the web part. Once in a web part gallery, add the web part to any web part page in the site collection.

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Demo: Basic Web Part Development 1.Create a web control project 2.Create a web part class 3.Change the project build and sign properties 4.Change the web.config of a web application 5.Add web part to the page

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Lab: Exercises 1-3 Perform exercises 1-3 from Web Part Development Lab

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Part Properties Properties persist web part metadata information in the database either for all users or on per user basis. Base Class Properties – control appearance and behavior (height, width, etc) Custom properties – additional properties required to enhance web part functionality private string message; [Personalizable(), WebBrowsable(true), WebDisplayName("Message"), Category("Custom")] public string Message { get { return message; } set { message = value; } }

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Demo: Web Part Properties 1.Web Part Properties 2.Editor Controls

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. CreateChildControls Instead of overriding RenderContent all user interface elements can be created in CreateChildControls. TextBox txtBox; Button btn; Label lbl; protected override void CreateChildControls() { base.CreateChildControls(); txtBox = new TextBox(); Controls.Add(txtBox); btn = new Button(); btn.Text = "Update Message“; btn.Click += new EventHandler(btn_Click); Controls.Add(btn); lbl = new Label(); lbl.Text = "Message is “ ; Controls.Add(lbl); }

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Using User Controls in Web Parts Develop user control in _controltemplates or any other virtual directory excluded using “managed” paths. Use user control within a web part protected UserControl time = null; protected override void CreateChildControls() { time = (UserControl)Page.LoadControl("/_controlstemplates/CurrentTime.ascx"); this.Controls.Add(time }

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Demo: CreateChildControls and UserControls Demo: Web Parts Functionality 1.Build a web part that only overrides CreateChildControls 2.Build a web part that uses a user control

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Lab: Exercise 4 Perform exercise 4 from Web Part Development Lab

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Production Deployment Production deployment –Web part dll should be strongly named which gives a web part a unique name so that multiple versions of the DLL can coexist without having to rename the DLL. –Web part dll should be in GAC or have a custom security policy –Web part should packaged in a web part or solution package (to be covered in Feature Development)

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Code Security - Permissions ASP.Net has a set of permissions such as –IsolatedStorageFilePermission –messageQueuePermission –OdbcPermission SharePoint adds more permissions –SharePoint Permission - controls rights to access resources used by Windows SharePoint Services such as the object model –WebPart Permission - controls rights to access webpart resources such as connections.

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Code Security - Trust Levels ASP.NET defines the following trust levels: Full, High, Medium, Low, Minimal SharePoint adds the following trust levels: –WSS_Minimal - default level for any WSS virtual directory (even if web application has Office Server features on it). –WSS_Medium The above trust levels are defined in wss_minimaltrust.config and wss_mediumtrust.config local drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\config

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Custom Policy File There are several ways to give assemblies the correct permissions –Change trust to Full –Install assembly into GAC –Recommended: Create a custom policy file for the assembly Custom policy file will define the permissions necessary for the specific assembly

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Demo: Security and Custom Policy Files 1.Examine security settings 2.Build a custom policy file for the assembly

Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Enabling Call Stack for Debugging Purposes WSS overrides the CallStack attribute which controls whether a call stack and an exception message are displayed when a system-level exception occur. To enable the CallStack attribute. Find the following element In the Web.config file: and change CallStack=“true”