Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Develop SharePoint web parts in ASP.NET [closed]

I have been asked to develop some usercontrols in ASP.NET that will at a later point be pulled into a SharePoint site as web parts. I am new to SharePoint and will not have access to a SharePoint server during the time I need to prototype these parts.

Does anyone know of any reasons that this approach will not work? If this approach is not recommended, what would other options be? Any suggestions on a resource/tutorial on what to consider when developing an ASP.NET web part with SharePoint in mind?

Thanks

Edit: 12/31/2008 I finally marked an answer to this one. It took me a while to realize that going the SharePoint route right away, though painful at first, is the best way to go about it. The free VPC image makes getting set up to develop relatively painless.

While you can, as I did, develop web parts in ASP.NET without SharePoint, when it comes to developing and deploying SharePoint applications you haven't learned a thing, only pushed the learning curve off into a time when you think you are done, (and have probably informed stakeholders to that effect). To delay the SharePoint learning curve doesn't do you or your project any favors, and your final product will better for the expertise you gain along the way.

like image 332
TheZenker Avatar asked Sep 25 '08 13:09

TheZenker


1 Answers

ASP.NET web parts work in SharePoint the same as they work in ASP.NET. That's the route I would take (custom control that derives from the ASP.NET Web Part class). This will alleviate any requirement to actually develop on a SharePoint server.

The only issue you are going to encounter is that you will not be able to take advantage of the SharePoint framework. If you are doing anything advanced in SharePoint this is a big deal. However, SharePoint is ASP.NET plus some additional functionality, so anything you can develop using the System.Web.UI.WebControls.WebPart class should work great in SharePoint.

Some considerations that will help ease your pain as you go from pure ASP.NET to SharePoint:

  • If you can put everything inside of a single assembly, deployment will be easier
    • try to put everything you need into the DLL's that are deployed to SharePoint
    • use assembly resources to embed JS, CSS, and image files if needed
  • Strong name the assembly you are building
    • Most SharePoint deployments end up in the GAC and a strong name will be required

Here is a relevant blog post; Developing Basic Web Parts in SharePoint 2007

like image 175
Eric Schoonover Avatar answered Oct 03 '22 10:10

Eric Schoonover