开发者

what the best methodology to create lists in sharepoint 2010 for developers?

while developing a solution on sharepoint what's the best method to create site lists is it: 1.Solution features in Visual studio开发者_StackOverflow社区 2.Sharepoint designer 3 the browser

considering code reusability and easier deployments.


Creating custom lists in Sharepoint designer is quite straightforward. Assuming you don't need any custom fields, this is a good place to start.

Create your definition here, and then export it as a template. You can then import this wsp into visual studio for further customizing. You can then deploy this as per any other package. It's also nice to have this inside VS so you can version control / etc.

Here is a good video link on doing the import:

http://channel9.msdn.com/Blogs/funkyonex/Importing-SharePoint-Solution-Packages-WSP-into-Visual-Studio-2010

Edit

This isn't quite correct. You'll have to save the site as a template (wsp) that you can then import into VS. You'll get a wizard that lets you choose the list(s) you want. It's a bit of a pain as you have to uncheck everything - there's no 'uncheck all' that I can see.


For quick results, you can't beat using the browser. Starting from a custom list template, you can have a shiny site list with lookup fields, calculated fields, ... but you'll need to save your list as a list template if you want to deploy it somewhere else.

If you go to the Visual Studio way, you'll ideally have to create some site columns first, then a content type that will use these site columns and then a list template (and eventually instance(s) of this template) based on that content type. Everything will be package within a WSP that you'll be able to deploy everything, that's obviously more work but thanks to VS 2010 this is a lot easier than it used to be with SharePoint 2007.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜