面向 C# ASP.NET 开发人员的 SharePoint

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/535255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-04 07:09:49  来源:igfitidea点击:

SharePoint for a C# ASP.NET Developer

c#asp.netsharepoint

提问by zSynopsis

I've been asked to create a website in SharePointwithin the next couple of weeks or so and I'm entirely new to SharePoint.

我被要求在接下来的几周内在SharePoint 中创建一个网站,而我对 SharePoint 完全陌生。

Does anyone have any good examples/tutorials on how to do some basic operations such as creating custom forms, using basic CRUDoperations, with a custom SQL Serverdatabase?

有没有人有关于如何使用自定义SQL Server数据库执行一些基本操作(例如创建自定义表单、使用基本CRUD操作)的好的示例/教程?

Also is there any way to code in ASP.NET (with code-behindpages), but use the SharePoint look and feel and authentication stuff?

还有什么方法可以在 ASP.NET 中编码(使用代码隐藏页面),但使用 SharePoint 外观和身份验证内容?

采纳答案by AndreasKnudsen

SharePoint is not quitelike what you're used to. My two main gripes are:

SharePoint与您习惯的不太一样。我的两个主要抱怨是:

Deployment:

部署:

If your requirements are for a single production site (no staging/test/development sites) your best bet is probably to go with the SharePoint Designerand hack stuff together directly on the production site (yes I know it's dirty).

如果您的要求是针对单个生产网站(没有暂存/测试/开发网站),您最好的选择可能是使用SharePoint Designer并直接在生产网站上将内容组合在一起(是的,我知道它很脏)。

If you need those other environments you should produce deployment packages for everything (no xcopy deployment). Deployment packages are a PITAIMHO and are veryeasy to get wrong.

如果您需要那些其他环境,您应该为所有内容生成部署包(无 xcopy 部署)。部署包是PITA恕我直言,容易出错。

IIS

信息系统

SharePoint basically takes over your IISinstallation and introduces a new set of rules for where things are located etc. One gotcha is "ghosted" files. i.e. whenever a file is changed using the SharePoint Designer the file is backed up to a database and from now on IIS will only use the file in the database, so there is no use changing the one in the file system.

SharePoint 基本上接管了您的IIS安装,并引入了一套新的规则来确定事物的位置等。一个问题是“幻影”文件。即,每当使用 SharePoint Designer 更改文件时,该文件都会备份到数据库,从现在起 IIS 将只使用数据库中的文件,因此更改文件系统中的文件没有用。

To sum up:

总结:

In my humble opinion if you are making a site where uptime isn't that important and you can afford to make mistakes in production, SharePoint can be good enough with the designer. If you are making a CMSsite where you need the code to go through multiple environments before it reaches production, (with continuous integration), I can think of no other .NET based CMS that does a worse job. You will spend a LOT of time grokking how to get the deployment routines to work for you, and you will spend a LOT of time with issues relating to "ghosted" files

以我的拙见,如果您正在制作一个正常运行时间不是那么重要的网站,并且您可以承受在生产中犯的错误,SharePoint 对设计师来说就足够了。如果您正在制作一个CMS站点,在该站点中您需要代码在进入生产环境之前通过多个环境(通过持续集成),我认为没有其他基于 .NET 的 CMS 做得更糟。您将花费大量时间研究如何让部署例程为您工作,并且您将花费大量时间处理与“幻影”文件相关的问题

Good luck.

祝你好运。

回答by fuentesjr

Perhaps the fastest and easiest way to get started is by using the SharePoint Designer application that is part of one of the Microsoft Office versions. If you just need to create simple Forms, Microsoft InfoPath will go along way. I would then go ahead and buy a book on SharePoint development since its a big landscape. Channel 9is a good resource for SharePoint bits as well.

也许最快和最简单的入门方法是使用 Microsoft Office 版本之一中的 SharePoint Designer 应用程序。如果您只需要创建简单的表单,Microsoft InfoPath 将助您一臂之力。然后我会继续购买一本关于 SharePoint 开发的书,因为它是一个广阔的领域。Channel 9也是一个很好的 SharePoint 资源。

回答by Cory Foy

The first thing to remember is that SharePoint is just an ASP.NET application. It has a ton of framework, and various things like security, etc, built-in. But from your perspective, you can just build a Web Control, and basically deploy it right to the server. Check out this postfrom MikeG, and especially look at SmartParton CodePlex. That will help you get up and running without too much fuss. Since you are using standard web controls, you have access to CodeBehind. The one caveat is that your assemblies have to either be deployed to the GAC or granted Full Trust in the config files - something SmartPart will help you through.

首先要记住的是,SharePoint 只是一个 ASP.NET 应用程序。它有大量的框架,以及内置的安全性等各种内容。但从您的角度来看,您只需构建一个 Web 控件,然后基本上将其部署到服务器即可。查看MikeG 的这篇博文,尤其是CodePlex上的SmartPart。这将帮助您启动并运行而无需大惊小怪。由于您使用的是标准 Web 控件,因此您可以访问 CodeBehind。一个警告是您的程序集必须部署到 GAC 或在配置文件中授予完全信任 - SmartPart 将帮助您完成。

SharePoint Designer is just FrontPage, rebranded. It very much could help you with some basic stuff, and might be worth looking into if this is an occasional thing. But if you are going to be doing any kind of long term work, I highly recommend taking a class on developing SharePoint applications. It can be quite a beast, and you may find yourself in quicksand faster than you think.

SharePoint Designer 只是重新命名的 FrontPage。它可以为您提供一些基本的帮助,如果这是偶尔的事情,可能值得研究。但是,如果您要从事任何类型的长期工作,我强烈建议您参加有关开发 SharePoint 应用程序的课程。它可能是一头野兽,您可能会比您想象的更快地发现自己陷入流沙。

回答by Gulzar Nazim

Technet has a bunch of virtual labsfor SharePoint products.

Technet 有许多用于 SharePoint 产品的虚拟实验室

回答by Bj?rn Furuknap

A very good start, to get you rolling in the right direction, is Microsoft site for SharePoint Development, at http://www.mssharepointdeveloper.com/. This will get you a long way towards understanding what you need to prioritize in your learning efforts.

Microsoft SharePoint Development 网站是一个很好的开始,可以让您朝着正确的方向前进,网址为http://www.mssharepointdeveloper.com/。这将使您在了解学习工作中需要优先考虑的事情上有很长的路要走。

To answer your second question, in short: yes, you can create pages that use code-behind, just like regular ASP.net. The longer answer is a bit beyond the scope here since it requires a better understanding of how SharePoint works with master pages, customized pages, and the layouts or application pages concepts in SharePoint.

要回答您的第二个问题,简而言之:是的,您可以创建使用代码隐藏的页面,就像常规 ASP.net 一样。较长的答案有点超出此处的范围,因为它需要更好地了解 SharePoint 如何处理母版页、自定义页面以及 SharePoint 中的布局或应用程序页面概念。

回答by Charles Graham

Get Ted Pattison's book, Inside Microsoft Windows SharePoint Services 3.0. It's an absolute mustif you are going to do any sharepoint develelopment.

获取 Ted Pattison 的书Inside Microsoft Windows SharePoint Services 3.0。如果您要进行任何共享点开发,这是绝对必须的

回答by Julian de Wit

The fastest way to get up to speed is to use smartpart. It allows you to build ASP.NET usercontrols and deploy them in sharepoint.

加快速度的最快方法是使用smartpart。它允许您构建 ASP.NET 用户控件并将它们部署在 sharepoint 中。

http://www.codeplex.com/smartpart/Release/ProjectReleases.aspx?ReleaseId=10697

http://www.codeplex.com/smartpart/Release/ProjectReleases.aspx?ReleaseId=10697

Sharepoint designer/CAML: - Nice for starter apps.

Sharepoint 设计器/CAML: - 适合入门应用程序。

Visual studio tools:

视觉工作室工具:

  • painfull
  • documented very bad
  • bug ridden
  • Very heavy deploy cycle..
  • 痛苦的
  • 记录非常糟糕
  • 臭虫缠身
  • 非常繁重的部署周期..

IMO Microsoft has to come up with something better. Until then, smartpart is great.

IMO 微软必须想出更好的办法。在那之前,smartpart 很棒。

回答by Dana

We build our Sharepoint apps through a combination of SmartParts (as mentioned above) for simpler apps and _Layout applications for more complex stuff.

我们通过 SmartParts(如上所述)的组合来构建我们的 Sharepoint 应用程序,用于更简单的应用程序和 _Layout 应用程序用于更复杂的东西。

A _layout application lets you build a traditional ASP.NET web app and pretty much plop it right into Sharepoint. Here's a link to get you started.

_layout 应用程序可让您构建传统的 ASP.NET Web 应用程序并将其直接放入 Sharepoint。这是一个可以帮助您入门的链接。

http://msdn.microsoft.com/en-us/library/bb418732.aspx

http://msdn.microsoft.com/en-us/library/bb418732.aspx

回答by Brian

I just started using SharePoint about 3 months ago. I learned all of the basics and got a good foundation for SharePoint using the Pilothouse Consulting SharePoint training DVD (http://www.pilothouseconsulting.com/dvd/sharepoint-training-dvd-development-benefits.html). It was very helpful and all of the tutorials, demos, and code examples for development are in C#.

我大约 3 个月前才开始使用 SharePoint。我学习了所有基础知识,并使用 Pilothouse Consulting SharePoint 培训 DVD ( http://www.pilothouseconsulting.com/dvd/sharepoint-training-dvd-development-benefits.html)为 SharePoint 打下了良好的基础。它非常有帮助,所有用于开发的教程、演示和代码示例都使用 C#。