Migrate SharePoint SubSite to a Different Site Collection Programmatically - sharepoint

Is it possible to move a MOSS subsite and content to a different site collection using the SharePoint API? For example, I would like to archive a subsite, by moving it from /teamsite/subsite1 to /teamsite/archive/subsite1. I am using MOSS 2007.
Thanks, MagicAndi.

MagicAndi,
The answer is a resounding "yes." The import and export of sites within SharePoint is handled through the Content Deployment API (also known as the PRIME API). This API is responsible for providing the backing to both import/export functionality supplied through STSADM.exe; it also handles the content deployment within MOSS.
A great place to get started with the Content Deployment API is with a series of articles written by Stefan Gossner. Stefan is an escalation engineer for Microsoft, and you'd be hard pressed to find someone more knowledgeable in the practical workings of the PRIME API:
http://blogs.technet.com/stefan_gossner/archive/2007/08/30/deep-dive-into-the-sharepoint-content-deployment-and-migration-api-part-1.aspx
All parts of this six-part series are excellent, and I recommend reading them all. Parts three and four, though, get to some of the specifics of the import and export operations you indicated you'd like to implement.
I hope this helps!

You need to look in to the Content Deployment API, Here is one of the Class Article in the subject.

Related

Deploy List Definitions, content types and site columns on Office365

I was wondering which is the best way to deploy our typical SharePoint artifacts such as list definitions, content types and site columns that we usually design in Visual Studio to a Office365 site collection.
I have been working on O365 for more than an year now and the only solution that I came up with is to create a sandboxed solution with no code and obviously deploy it to my site.
Unfortunately many clients nowadays don't even want to hear the word "sandboxed", so is there an alternative solution?
Thanks for the help!
The Office 365 Patterns and Practices has examples on how to do that:
https://github.com/OfficeDev/PnP
Mainly in https://github.com/OfficeDev/PnP/tree/master/Samples you will find all the items you are looking for.
https://github.com/OfficeDev/PnP/tree/master/Solutions/Provisioning.Framework.Cloud.Async contains a fully built solution with an xml based templating engine to fully provision sites/site collections.
Sandbox solutions are still very applicable, especially in O365 .CSOM with PowerShell is another viable alternative solution .This thread has discussed about this topic. Please refer to below article :
Programmatically creating Site Columns and Content Types using the App Model

Creating a new CMS, importing content from ASP - Umbraco or Sharepoint?

I'm working on a project to create a CMS, which will entail importing a lot of existing content, most of which is static, but in ASP (so they're not all just pure HTML, there are includes and sometimes other server-side code).
We're considering using Umbraco or Sharepoint (2010) for managing the external content, which currently comprises a few thousand pages. I've read this and I think there are good cases to be made for both sides. However, while I've read about the features of adding and managing content, I have not seen anything regarding the importing of existing content into either. And since we have a lot of content that will have to be imported, the ability of either CMS to facilitate this will be a major factor in the decision.
I'd like to know if anyone has any experience trying to import a lot of content into either Umbraco or Sharepoint, or if you have any idea how I might go about doing that. Is it easy for either? Are there plug-ins I can find, or scripts I can write? Or will I pretty much have to import each existing file manually with either CMS?
If you have experience with Umbraco or Sharepoint and have any ideas about this, I would value your input and/or recommendations.
Are you just using SharePoint as a CMS? IMHO whilst SharePoint can be used as a CMS that is not where its real strengths lie - its more suited to Intranet/Portals/Collaboration tools.
I am sure someone will be on in a minute with links to SharePoint showcase sites but the disadvantages :-
Its expensive (even with 'free' WSS
version you need Internet connector
license) + windows licenses.
The
markup can be fairly 'heavy' and
difficult to customise (tables galore in 2007
and javascript files measured in
hundreds of kb)
Questionable cross
browser functionality in 2007
Relatively poor 'website' features e.g. blogging engine as compared to some dedicated CMS's
Basically - if all you are after is a CMS then perhaps there are better options?
(I should say that I think that in an Intranet/Portal setting SharePoint is brilliant, frustrating sometimes for sure, but brilliant).
I cannot speak for SharePoint but I have had to import content from a MS Content Management Server 2002 database into Umbraco.
Umbraco is very extensible and I was able to build a dashboard component that allowed me to do this.
It effectively examined the MSCMS channels and postings and recreated the structure using Umbraco document types. It was very much working at the API level but I would say the learning curve wasn't too steep and Umbraco documentation has come on leaps and bounds over the last two years.
There is also the possiblity that someone has already written a package to do what you need to do so it is worth checking out the community at http://our.umbraco.org.
Hi I don't know Sharepoint but I build a package for Umbraco which can help you importing data from other systems into Umbraco. In the way you dewscribe it you could export your site to a file format using the HTML Agility pack and then use my tool www.cmsimport.com to import the data into Umbraco.
Hope this helps,
Richard
I haven't done any Sharepoint but I've imported content into Umbraco and found it very flexible.
I imported data from a database and created doctypes and custom datatypes in Umbraco then created and populated umbraco documents with code like this:
using umbraco.cms.businesslogic.web;
...
DocumentType dt = DocumentType.GetByAlias("myDoc");
Document doc = Document.MakeNew(name, dt, user, parentId);
doc.getProperty("whatever").Value = getWhateverXML();
doc.Save();

Getting started with Sharepoint 2007 development

We have an ASP.NET website that we use internally to do some project tracking and various work. We would like to integrate some pieces of it to co-exist with Sharepoint2007 WSS.
Basically what we would really need to do is be able to add items to a list in one of the Sharepoint sites.
I'm not sure where to begin. I've looked online a bit but it seems overly complicated. Is there a quick start guide somewhere that can get me rolling with ease?
The SharePoint Web Services would be a logical place to start. In my opinion this would be the easiest way to build interaction between ASP.NET and SharePoint.
A list of available web services can be found on MSDN.
If adding items to a list is the primary goal, then check out the UpdateListItems method of the Lists web service.
With the scope narrowed to Web Services, you can certainly find tutorials/references online. However, this InfoQ post by Trent Swanson is a decent introduction to SP web services. Note that they recommend generating .NET types using XSD files; in practice, for simple projects I have simply parsed the XML myself using LINQ. You can make it as easy or complex as you like, I suppose.

Creating a subsite/web via the Sharepoint Web Serivces - is it possible?

I'm trying to create/add a Sharepoint subsite on an existing site collection through the web service api (as oppposed to the object model or RPC), but I see no clear way on any of the Admin.asmx, Webs.asmx, Site.asmx, or Sites.asmx services to do so.
I can see ways to create a full site collection, lists, and list items, but not to create a subsite on an existing site collection.
Can someone please confirm whether or not there is a way on the out-of-the-box sharepoint web services to do this?
It's exceedingly (well, maybe not exceedingly) easy to create your own SharePoint-aware web service. If the existing API isn't sufficient to meet your needs, then you might consider rolling your own to give you more domain-specific functionality. I found this MSDN article to be pretty helpful, and I rolled up the WSDL modifications into a post-build event to simplify the edit-build-deploy process.
http://msdn.microsoft.com/en-us/library/ms464040.aspx
I have googled around and found these 2 references
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/47d63dbf-3740-4e97-bc5c-17c39ef7b174/
http://community.officesharepointpro.com/forums/post/16971.aspx

What are the best methods to ensure our SharePoint implementation is accessible?

Are there any blogs, guides, checklists, or controls we should be using to ensure our SharePoint implementation is accessible?
Preferrably to the W3C double A standard, or as close to that as we can get.
We're implementing an extranet solution.
This study has already been funded by Microsoft, and unfortunately the results only seem to be online in a Word Document.
The document is hosted on this blog:
http://blog.mastykarz.nl/best-practices-for-developing-accessible-web-sites-in-microsoft-office-sharepoint-server-2007/
And the path to the document is here:
http://go.microsoft.com/fwlink/?LinkId=121877
I'm unsure on whether it would be a good thing to copy the contents of that into here to fully answer the question in a way that will be indexed by search engines, but I'll play safe as it's not my content.
The best place to start is the Accessibility Kit for Sharepoint. With this, you may reach single A standard, but in my experience, you will find it very tough to reach AA.
Microsoft didn't factor in accessibility in Sharepoint, and even 2007 suffers from a huge overdependence on table layout.
Good luck!
How are you deploying the implementation? Is it as an Intranet, or, is it as a public facing website.
I think one of the first rules is to be extremely selective with the use of out of the box web parts. Many of the web-parts I looked at weren't compliant even on a basic level.
Andrew
The best way is to run checks as you develop so you know where your pain points are.
The next step maybe to start with a minimal masterpage so you can choose what elements are presented to the user.
More advanced you can override the render methods to remove or change bits of the page that are not compliant with your checks. EG changing the case of tags (XHTML does not like all caps)
A bit more in this guide.
http://techtalkpt.wordpress.com/2008/06/18/building-accessible-sharepoint-sites-part-1/
http://techtalkpt.wordpress.com/2008/08/07/building-accessible-sharepoint-sites-part-2/
I recently read the MOSS book by Andrew Connell (www.andrewconnell.com) and it has a chapter dedicated to accessibility and SharePoint sites.
Simply put SharePoint sites are very difficult to generate W3C AAA standards, but the Accessibility Kit is one of the best starting points.
Stronly recommend his book for this chapter (http://www.amazon.com/dp/0470224754?tag=andrewconnell-20&camp=14573&creative=327641&linkCode=as1&creativeASIN=0470224754&adid=18S6FKQJR5FZK56WHH6A&)
It depends how much of Sharepoint out of the box you are intending to use. In implementing our public facing site we managed to achieve AA compliance, although the amount of custom development required has raised questions over the benefits we are actually gaining from using Sharepoint in the first place.
A few pointers:
We made heavy use of SPQuery/SPSiteDataQuery to render site data to screen using xslt which gave us full control over the output. I found this link helpful:
http://blog.thekid.me.uk/archive/2007/02/25/xml-results-using-spsitedataquery-in-sharepoint.aspx
Check out RadEditor for Sharepoint for a nice accessible rich text editor for publishing.
For xhtml compliance, things were a little more tricky, we had to override most of the Sharepoint publishing controls' render methods to correct dodgy output.
If you are wanting to leverage the portal like capabilites of Sharepoint in your extranet it is more problematic. The web part framework is not accessible and I have not yet found a way to make it so. Any suggestions welcome!

Resources