Sharepoint Site Creation
-
Wednesday, February 03, 2010 2:12 PM
I am new to Sharepoint and trying to collect/read all available information on Sharepoint 2010 to get going.
I know that there is 3 ways to access a Sharepoint site -> via the sharepoint web interface, sharepoint designer and visual studio 2010.
As I am a developer, my preferred way is to do as much as I can from Visual Studio 2010. But I don't quite understand if I can do everything in Visual studio or do I need to use the web interface or designer for some things? If yes, what is it that I can't do in visual studio? Are all the sharepoint artefacts in designer also availale via visual studio? Also how can I transfer the site between the 3 environment? Can I use the out of the box web parts within visual studio?
Any help or direction to information appreciated.
All Replies
-
Wednesday, February 03, 2010 9:09 PMWhen you use Visual Studio you will be interacting with the SharePoint API which you can do everything that you can do from the UI/Designer and even more. Some functionalities are not available on the UI so you will have to work on it using the API.You can create, delete, edit Site collections (SPSite), Web sites within the site collection (SPWeb), and lists and items within the webs (SPList, SPListItem).You can package sites into Site Templates and deploy them to SharePoint. You can create the packages using Designer, or Visual Studio. Developers usually start with designer, and then import it into Visual Studio, because the XML for the Site Templates are complicated.Again, you can just start creating sites and lists using the SharePoint API.
-
Thursday, February 04, 2010 9:59 AMThans for that...
If I create a Site within Designer and save it as a Site Template, this would be similar to templates provided by sharepoint e.g. Team, Publishing etc. and it would save it as a wsp... Is that correct?
I can then open this in Visual studio and do further development. I can then use the deploy command to deploy it back to sharepoint. This would then update the site that I have created earlier in designer.
This template when I open it in designer, is this a site definition or a sharepoint project?
I don't understand what is the difference between them.
Also, you say I can do all in Visual studio, that I can in designer... so would this be the place to apply branding, like the master page and the css? -
Friday, February 05, 2010 12:29 AM
I suggest that you create a new SharePoint project in VS 2010 and then add modules and features that modify the site through the API.Refer to the following post on how to attach an event receiver to a feature which modifies the Master Page of a site in SharePoint.This is the easiest and the recommended way to customize a SharePoint site.After you finish the solution, then you can use the "Deploy" command in VS to deploy it to your development machine. When you happy with your code and want to take it to the test/prod environment, you would use "package" command which will create the WSP file for you in the "debug" folder in the project files.- Marked As Answer by mblue Wednesday, February 17, 2010 8:21 AM

