Showing posts with label sharepoint links. Show all posts
Showing posts with label sharepoint links. Show all posts

Friday, June 4, 2010

New Event Handlers in SharePoint 2010




With SharePoint 2010, there is now a new host of event handlers that Developers can leverage to interject custom code into their sites when end users perform various actions. To be precise, there are 12 new event handlers available. Notice the chart below, highlighting what is new:

List Events

A field was added

A field is being added

A field was removed

A field is being removed

A field was updated

A field is being updated

A list is being added

A list is being deleted

A list was added

A list was deleted

List Item Events

An item is being added

An item is being updated

An item is being deleted

An item is being checked in

An item is being checked out

An item is being unchecked out

An attachment is being added to the item

An attachment is being removed from the item

A file is being moved

An item was added

An item was updated

An item was deleted

An item was checked in

An item was checked out

An item was unchecked out

An attachment was added to the item

An attachment was removed from the item

A file was moved

A file was converted

The list received a context event

List Workflow Events

A workflow is starting

A workflow was started

A workflow was postponed

A workflow was completed

List Email Events

The list received an e-mail message

Feature Events

A feature was activated

A feature is deactivating

A feature was installed

A feature is being upgraded

Web Events

A site collection is being deleted

A site is being deleted

A site is being moved

A site is being provisioned

A site collection was deleted

A site was deleted

A site was moved

A site was provisioned

Of particular interest is the site provisioning event handlers. I believe this greatly opens the doors for corporations to interject their custom site approval or request workflows into SharePoint, and the obvious, run some custom code on a site after it has been provisioned. Notice that now you are no longer depending on "feature stapling" to execute code on a site after it is provisioned. You can now just attach this web event.

If you recall, feature stapling was/is the action of editing the ONET.xml file within a site definition, adding features to the "WebFeatures" element which would auto-activate features upon provisioning. People would use that functionality to execute code upon site provisioning via a feature activating/ed event receiver, but that is now no longer necessary. Much simpler with this new event!!

Another great improvement to event handlers in SharePoint 2010 is with the improvements to Visual Studio 2010, and what it takes to create them. Notice, when you add a new item into a Visual Studio project, three is an Event Receiver template you can choose from:

When you choose that template, you get a dialog box allowing you to choose what event you want to capture, as well as what content type you want to associate the event receiver with:

After you click finish it will stub out all the code for you! Very slick!

Also notice how Visual Studio 2010 will also stub out all the necessary features and Solution Packages necessary to deploy into SharePoint. Literally all you have to do is hit F5, and then navigate into SharePoint and unit test your event receiver. SO COOL:

It is really great to see Microsoft place such a significant effort on enabling Developers to customize the product, as well as make it so easy to do so (which is so easily seen with their improvements with Visual Studio 2010). Thanks MS!


SharePoint 2010 Visual Web Parts


Ever since the sneak peak developer videos were released months ago I’ve been wondering about the implementation of SharePoint 2010’s visual web parts. If your not sure what I mean, with SP 2010 and Visual Studio 2010 you can now create a web part with a design time experience, so you can drag and drop controls etc:

VS2010Designer

Now that the beta is upon us I can finally take a look under the covers at a visual web part, the default project structure looks like:

VS2010WebPart

The project contains a number of new items: Features and Package both relate to the deployment features of Visual Studio 2010 in that you can create SharePoint solutions (aka the Package) and features which can be activated, visual studio will automatically deploy and activate your web parts using this solution and features.

Next we move on to the VisualWebPart1.cs file which contains the secret sauce:

    public class VisualWebPart1 : WebPart
{


// Visual Studio might automatically update this path when you change the Visual Web Part project item.
private const string _ascxPath = @"~/_CONTROLTEMPLATES/TestVisualWebPart/VisualWebPart1/VisualWebPart1UserControl.ascx";

public VisualWebPart1()
{
}

protected override void CreateChildControls()
{
Control control = this.Page.LoadControl(_ascxPath);
Controls.Add(control);
base.CreateChildControls();
}

protected override void RenderContents(HtmlTextWriter writer)
{
base.RenderContents(writer);
}

As you can see, the web part still derives from WebPart, no special VisualWebPart base class, nothing special going on here.

In fact we are using the same techniques and approach that would have worked in Visual Studio 2008, the only difference now is that Visual Studio 2010 has better tooling support for SharePoint 2010 and will deploy the ascx file automatically for us to the _CONTROLTEMPLATES directory as part of the solution.

There are still a few things a web part developer should know, lets look at the case where we want to expose some custom properties on a web part that we want a user to configure via the web interface:

      [System.Web.UI.WebControls.WebParts.WebBrowsable(true),
System.Web.UI.WebControls.WebParts.WebDisplayName("Custom Prop"),
System.Web.UI.WebControls.WebParts.WebDescription(""),
System.Web.UI.WebControls.WebParts.Personalizable(
System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared),
System.ComponentModel.Category("Settings"),
System.ComponentModel.DefaultValue("")
]
public string CustomProp
{
get { return customProp; }
set { customProp = value; }
}

Now if we put this property and attributes on the VisualWebPart1UserControl (in VisualWebPart1UserControl.ascx.cs) we will find that the custom property builder won’t appear (the web interface that lets us set a value to this property).

We have to add the custom property on the VisualWebPart1 class (in VisualWebPart1.cs) :

    public class VisualWebPart1 : WebPart
{

// Visual Studio might automatically update this path when you change the Visual Web Part project item.
private const string _ascxPath = @"~/_CONTROLTEMPLATES/TestVisualWebPart/VisualWebPart1/VisualWebPart1UserControl.ascx";

protected override void CreateChildControls()
{
Control control = this.Page.LoadControl(_ascxPath);
Controls.Add(control);
base.CreateChildControls();
}

protected override void RenderContents(HtmlTextWriter writer)
{
base.RenderContents(writer);
}

[System.Web.UI.WebControls.WebParts.WebBrowsable(true),
System.Web.UI.WebControls.WebParts.WebDisplayName("Custom Prop"),
System.Web.UI.WebControls.WebParts.WebDescription(""),
System.Web.UI.WebControls.WebParts.Personalizable(
System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared),
System.ComponentModel.Category("Settings"),
System.ComponentModel.DefaultValue("")
]
public string CustomProp
{
get { return customProp; }
set { customProp = value; }
}
}

Now we get our custom property builder:

WebPartSettings

Lets assume that we want to pass the user entered value to the Visual component (the usercontrol) we now need to change the visual studio generated code to cast the user control to our visual user control class, rather than the more generic base Control:

       protected override void CreateChildControls()
{
//user control is of type VisualWebPart1UserControl and defined with private scope
userControl = (VisualWebPart1UserControl)this.Page.LoadControl(_ascxPath);
Controls.Add(control);
base.CreateChildControls();
}

From here we can set properties on the userControl variable as normal.

The same principles apply to web part connections, so the connection points need to be defined on the web part class (not the usercontrol). Visual Studio will take care of deploying the ascx file which is still a big win.

I doubt an experienced web part developer would have any issues, but I wonder how many new web part developers will not know that they can make there web parts configurable and connectable given that they will likely only use the Visual Studio lie presented to them?

Thursday, June 3, 2010

Wednesday, June 2, 2010

SharePoint 2010 Certification and SharePoint 2007 Certification

Once upon a time, I use to blog about Certifications for .NET. I felt my first post for this year should have a theme of ‘moving forward’, so decided to write about the future of SharePoint certification.

I’m a big proponent of the Microsoft Certification program and think that anyone in the IT industry working with Microsoft technologies should have a certification for their field. I’ve actually even contributed some content to certain exams, and look forward to helping with more in the future.

Do I think a certification means that you know what you are doing? Nope… I’ve met people that have certifications, and didn’t know diddly-squat when it came to ‘real-world’ work. To the contrary, I’ve also met people that do not have certifications, but know a specific technology inside and out.

Still, I think it’s beneficial to anyone’s career and something that I’m an advocate of. Why is it beneficial though? The Microsoft Learning website puts it best:

Build your expertise and advance your career. By earning a Microsoft Certification, you gain advanced, market-relevant skills that employers recognize and respect as well as opportunities to connect with a global community of other certified professionals. Additionally, certification provides you with access to exclusive Microsoft resources and benefits, such as the MCP member Web site, career-building tools, and training. Explore the benefits of certification—and start your journey to attaining your ideal career.


To date, I’ve been pretty disappointed in the lack of certifications available for SharePoint 2007. Let’s look at what we currently have.

Existing SharePoint 2007 Certifications

MCTS – Microsoft Certified Technology Specialist

IT Pro
Exam 70-630: TS: Office SharePoint Server 2007, Configuring

Exam 70-631: TS: Configuring Windows SharePoint Services 3.0

Dev
Exam 70-541: TS: Microsoft Windows SharePoint Services 3.0 - Application Development

Exam 70-542 : TS: Microsoft Office SharePoint Server 2007, Application Development

So the inherent problem in my opinion now becomes apparent… MCTS is the lowest level of Microsoft Certification, and the next available certification is the Master program.

MCM – Microsoft Certified Master

IT Pro / Dev
Microsoft Certified Master: Microsoft Office SharePoint Server 2007

The Master program is an advanced certification, and costs a good bit of money as well. It’s worth it for sure, I will not argue against this. It’s a true practical test of your ability, and comes with 3 weeks of classroom courses led by some of the industry’s best.

But for a certification ‘path’, it has not existed for SharePoint. There is the lower certification and the advanced certification – nothing in the middle.

Future SharePoint 2010 Certifications
(Disclaimer: this information is not confirmed or posted anywhere that I have seen. Its based upon printed marketing material, and the 2010 certification release of other server platforms.)

With the release of SharePoint 2010 this year, there will also be a release of new certifications. The best part however, is that there will be the release of additional certifications that will fill the gap of that middle-ground.

MCTS – Microsoft Certified Technology Specialist

SharePoint Server 2010
Exam 70-667: TS: Microsoft SharePoint 2010, Configuring

Developer, SharePoint Server 2010
Exam 70-573: TS: Microsoft SharePoint 2010, Application Development

MCITP – Microsoft Certified IT Professional

SharePoint Server 2010
Exam 70-668: PRO: SharePoint 2010, Administrator

MCPD– Microsoft Certified Professional Developer

Developer, SharePoint Server 2010
Exam 70-576: PRO: Designing and Developing Microsoft SharePoint 2010 Applications

MCM – Microsoft Certified Master

IT Pro / Dev
Microsoft Certified Master: SharePoint Server 2010

Although I’m not graphically showing a road map here, as you may be able to interpret these are in order of a career path, so MCTS would come before MCITP / MCPD and those would come before MCM. There are also plans for a MCA (Microsoft Certified Architect) that have not been released. Essentially that’s the cream of the crop.

Now that I think about it, the Microsoft Certification path follows almost a Higher Education academic degree system, and probably not by mistake.

MCTS = Associate’s Degree

MCITP/MCPD = Bachelor’s Degree

MCM = Master’s Degree

MCA = Doctoral Degree


Upcoming SharePoint 2010 Certifications

Upcoming SharePoint 2010 Certifications

Well it looks like Microsoft have listened and decided to make 2 professional level certifications available for SharePoint. In SharePoint 2010 you will now be able to get certified as an MCITP and MCPD for SharePoint as well as the usual MCTS certifications.

SharePoint2010_2_05B51426

For the IT Pros

New on for IT Pros are 2 certifications. MCTS SharePoint 2010 Configuring and MCITP SharePoint 2010.

  • 70-667 TS: Microsoft SharePoint 2010, Configuring
    Microsoft Official Curriculum: Will cover configuration of SharePoint 2010 including deployment, upgrade, management, and operation on a server farm.

  • 70-668 PRO: SharePoint 2010, Administrator
    Microsoft Official Curriculum: Will cover advanced SharePoint 2010 topics including capacity planning, topology designing, and performance tuning.

For developers

Also for developers there will be 2 new certifications. MCTS SharePoint 2010 Application Development and MCPD SharePoint 2010.

  • 70-573 TS: Microsoft SharePoint 2010, Application Development
    Microsoft Official Curriculum: Five-day instructor-led course designed for developers with six months or more of .NET development experience. Course covers what you need to know to be an effective member of a SharePoint development team using Visual Studio 2010.

  • 70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications
    Microsoft Official Curriculum: Five-day instructor-led training course designed for development team leads who have already passed the Developing on SharePoint 2010 technical specialist exam. The course covers choosing technologies for and scoping a SharePoint project, best practices for SharePoint development, configuring a SharePoint development environment, advanced use of SharePoint developer features, and debugging of code in a SharePoint project.

These new certifications also feed into the Microsoft Certified Master certification for SharePoint 2010. The MCM for SharePoint 2007 required 4 MCTS certifications whereas the 2010 version will require the MCPD and MCITP for SharePoint 2010. The experience requirements have not yet been release nor has the how the upgrade will work from MCM 2007 to MCM 2010.

There will be no upgrade path from the MCTS 2007 to MCITP/MCPD 2010 due to the fact that there are Pro level certifications for 2007 making the upgrade process redundant.

More information can be got on the MS Partners site here. Release dates according to the documentation I have here estimate June 2010


Read more: http://www.certsandprogs.com/2009/10/upcoming-sharepoint-2010-certifications.html#ixzz0ph59ZjaL
Under Creative Commons License: Attribution

Tuesday, June 1, 2010

SharePoint 2010 Web services

ollowing is the list of SharePoint 2010 Web services that you can use for remote SharePoint development.

Web Services

WebSvcAdmin :Provides methods for managing a deployment of SharePoint Foundation, such as for creating or deleting sites.

WebSvcAlerts : Provides methods for working with alerts for list items in a SharePoint Foundation site.

WebSvcAuthentication : Provides classes for logging on to a SharePoint Foundation site that is using forms-based authentication.

WebSvcCellStorage :
Enables client computers to synchronize changes made to shared files that are stored on a server.

WebSvcCopy : Provides methods for copying items between locations in SharePoint Foundation.

WebSvcdiagnostics :
Enables client computers to submit diagnostic reports that describe application errors that occur on the client.

WebSvcDspSts : Provides a method for performing queries against lists in SharePoint Foundation.

WebSvcDWS : Provides methods for managing Document Workspace sites and the data they contain.

WebSvcForms : Provides methods for returning forms used in the user interface when working with the contents of a list.

WebSvcImaging : Provides methods that enable you to create and manage picture libraries.

WebSvcLists :
Provides methods for working with lists and list data.

WebSvcMeetings :
Provides methods that enable you to create and manage Meeting Workspace sites.

WebSvcPeople :
Provides methods for working with security groups.

WebSvcPermissions : Provides methods for working with the permissions for a site or list.

WebSvcSharedAccess :
Provides a method that determines whether a document is being coauthored.

WebSvcsharepointemailws : Provides methods for remotely managing distribution groups.

WebSvcSiteData : Provides methods that return metadata or list data from sites or lists in SharePoint Foundation.

WebSvcsites : Provides methods for working with Web sites.

WebSvcspsearch : Provides methods for remotely performing searches within a SharePoint Foundation deployment.

WebSvcUserGroup : Provides methods for working with users and groups.

WebSvcVersions : Provides methods for managing file versions.

WebSvcviews : Provides methods for working with list views.

WebSvcwebpartpages : Provides methods to send and retrieve Web Part information to and from Web services.

WebSvcWebs : Provides methods for working with Web sites and content types.

[OrganizationProfileService Web service] :
Provides an interface for remote clients to read and create organization profiles.

[BiAuthoring Web service] :
Represents the Web service used by PerformancePoint Dashboard Designer to create, modify, or delete dashboard objects; retrieve dashboard content; and retrieve data from data sources.

[BiRendering Web service] : Represents the Web service used by PerformancePoint Services in SharePoint Server 2010 to render dashboard objects in the browser.

[PublishedLinksService Web service] :
Provides a published links interface for remote clients to read and create published links.

[Search Web service] :
Provides methods that can be used to remotely query SharePoint search.

[SocialDataService Web service] :
Provides an interface for remote clients to read, create, and manipulate social data.

[UserProfileChangeService Web service] : Provides a user profile interface for remote clients to read and create user profiles.

[UserProfileService Web service] :
Provides a user profile interface for remote clients to read and create user profiles.


The following services are reserved for internal use of SharePoint Server:

BdcAdminService.svc

BdcRemoteExecutionService.svc

BDCResolverPickerService.svc

bdcservice.svc

client.svc

securitytoken.svc

spclaimproviderwebservice.svc

topology.svc

windowstokencache.svc

The SharePoint Web Services

Windows SharePoint Services was being designed and developed during the time when Microsoft was beginning to heavily push Web services. It should be no surprise, then, to find out that you can get at the data in SharePoint through Web services. In fact, there's not just one Web service involved; there are 16. Here's a brief rundown of the Web services that a SharePoint server makes available out of the box:

http://server:5966/_vti_adm/Admin.asmx - Administrative methods such as creating and deleting sites
http://server/_vti_bin/Alerts.asmx - Methods for working with alerts
http://server/_vti_bin/DspSts.asmx - Methods for retrieving schemas and data
http://server/_vti_bin/DWS.asmx - Methods for working with Document Workspaces
http://server/_vti_bin/Forms.asmx - Methods for working with user interface forms
http://server/_vti_bin/Imaging.asmx - Methods for working with picture libraries
http://server/_vti_bin/Lists.asmx - Methods for working with lists
http://server/_vti_bin/Meetings.asmx - Methods for working with Meeting Workspaces
http://server/_vti_bin/Permissions.asmx - Methods for working with SharePoint Services security
http://server/_vti_bin/SiteData.asmx - Methods used by Windows SharePoint Portal Server
http://server/_vti_bin/Sites.asmx - Contains a single method to retrieve site templates
http://server/_vti_bin/UserGroup.asmx - Methods for working with users and groups
http://server/_vti_bin/versions.asmx - Methods for working with file versions
http://server/_vti_bin/Views.asmx - Methods for working with views of lists
http://server/_vti_bin/WebPartPages.asmx - Methods for working with Web Parts
http://server/_vti_bin/Webs.asmx - Methods for working with sites and subsites
To use any of these Web services, replace server with the name of your SharePoint server. Because they're implemented using ASP.NET code, you can retrieve the matching WSDL file for any service by appending ?WSDL to the end of the URL. When you do so, you'll discover that each one supports multiple methods, making this one of the richest sets of Web services of any current product. For full information on the available Web methods, download the SharePoint Products and Technologies 2003 SDK.

VB.NET to SharePoint
http://www.developer.com/tech/article.php/3104621/SharePoint-and-Web-Services.htm

Monday, May 31, 2010

Popular Posts

Recent Posts

Unordered List

Text Widget