Friday, 1 October 2010

Save site as template link missing in site settings

Problem: You want to create an WSP for your site however, the "Save site as template" link is missing from the "Site Settings" page as shown below.
Hypothesis: Deactivate the Publishing features namely: Manage Site features > Sharepoint Server Publishing & Site Collection features > SharePoint Server Publishing Infrastructure.   You know have the ability to create site templates i.e. wsp files.  The problem is you don't have your publishing infrastructure.

Resolution: If publishing is enabled on your site, craft a url so you can create the wsp file.  Url is http://demo/_layouts/savetmpl.aspx

Tip:  You can only include up to 50 MB of contentin SP2010

SP2010 Connections Conference in The Hague - Day 2

Managed Meta data in custom solutions by AC was a real eye opener.  Managed Metadata Service (MMS) is very powerful and i need to be using it to a much greater degree.  AC's earlier talk on WCM was interesting but not a technical discussion but we were warned so not AC's fault. 

Mirjam van Olst gave a presentation on Logging, Monitoring & throttling.  It's the 1st time I've been to 1 of her presentations and I was hugely impressed she really knows her stuff.

Dan Holme gave a good session on Information Architecture (IA) and the MMS.  Useful as after AC's session i decided i definatelty needed more MMS info.

The last session I went to Wouter van Vugt's session on Access Services - Access services could potentially be huge in SP2010 and it was good to see a techy like Wouter highlight what it was good and bad at.

Generally a good day and a good conference.  Not exactly Vegas 2009 or even Berlin 2007 in quality but worth the trip and met some nice people that are really passionate about SharePoint.

Tuesday, 28 September 2010

SP2010 Connections Conference in The Hague - Day 1

Keynote by Steve Fox was good but felt too sales orientated.  It's always hard to deliver a keynote at a  technical conference with the variety of attendees.  So overall not the worst and it covered a lot from previous conferences so not much new information outside of prepare for Azure with SharePoint.  Also SP1 for SharePoint 2010 will be available sometime in 2011 Q1.

Andrew Connell - AC is always good value however today he had a problem with his laptop/VM and the demos didn't work, still a good presentation on building RIA Rich Internet Applications or as the slide read "Rich Business Applications".  Looked at 2 demos for building RIAs using Silverlight client object model vs Restful web services (*.svc), nothing ground breaking but useful if you are new to using the Client Object model.
  • SharePoint apparently in it's page headers returns how busy the SharePoint server is with a number between 1-10, 10 being very busy.  You can see this in fiddler.
  • Anonymous user sites should generally use RESTful WS rather than Client OM/Silverlight as you need authentication. 
Ted Pattison's Extending the Visual Studio 2010 SharePoint tools was a great session.  Forget T4 templates.  Extensibility projects (VSIX) uses .NET4.0 and is based on MEF.  It's pretty straight forward and I can't wait to build some templates for SP2010.

Michael Noel's session on on Disaster Recovery & High Availability cover load balancing (use sticky sessions, Hardware is better than Sw load balancing), search options and improvements of MOSS search, SQL clustering and mirroring, use SQL alias's for pointing your farm at the db, common farm architectures, SP2010 and virtualisation (not ideal for SQL server), 3types of mirroring, Split content db's but not too small, Backup options and i need to review MS's DPM product.

Went to Andrew Connell's LINQ to SharePoint 201 Best practices.  Key takeaway is SPMetal only works on native SP Foundation types, M+LINQ to SharEPoint can be extended as it is implemented using partial classes, the iCustomise interface helps extend SPMEtal for more complex types such as Html fields and Metadata.

See Razvan-Petru Radu conference notes

Monday, 27 September 2010

SharePoint 2010 BCS workshop with Scot Hillier

Overview:  attended a workshop on Business Connectivity Services (BCS) given by Scot Hillier in Den Haag (The Hague).  I have used BDC in MOSS and the BCS in SP2010  briefly.  I can honestly say I am now a BCS convert.  I know BCS was an improvement on BDC but looking at the tooling and going building advanced BCS solutions is really powerful and covers a lot more that I understood or had seen in a previous demo.

Summary:
  • Office can use BCS - pretty obvious but I didn't realise the client application goes straight from the client application i.e. work/outlook to the SQL/WCF/.NET data type directly.
  • Double hop issue with NTLM.  Scot laid out a table to direct the options available for various scenarios that I will hopefully post here.
  • Secure Store Service is extensively used for authentication in BCS.
  • SPD has a good tool set for BCS.  Probably the place to start.
  • SQL 2000 doesn't work as an External Content Type (ECT) - this needs verification.
  • BCS doesn't support transactions and is not strongly typed however data access options can be intermingled to get transaction functionality if you need it. 
http://uscatu.wordpress.com/2010/09/30/business-connectivity-services-deep-dive-mdvwrk1-%e2%80%93-my-notes/  A far better summary was written by my fellow attendee Razvan-Petru.

BCS versions feature table

Thursday, 23 September 2010

Creating Site Columns / fields declaratively

Problem: Adding site columns decoratively has nuances.  This post adds information for getting fields/site columns correct when building them declarative using a feature to deploy to a Site Collection.

Resolution: You can use the following reverse engineering technique on the list.  This will show you the xml/CAML to create lists.  This works in MOSS & SP2010.  I used the list reverse engineering technique to figure out how to create a Lookup site columns with multiple values. 

Steps to Reverse engineering a SharePoint List:
1.> Create a list, content type and site column for the lookup (or field you want) using the SharePoint's UI
2.Then retrieve the list using a formatted url to see the native CAML used to create the site column.  http://url/_vti_bin/owssvr.dll?Cmd=ExportList&List=listguid
This approach saved me a lot of time today.

Tips:
CAML attributes required for each field element are: ID, Name, DisplayName, Group, and Type.
MSDN field element attributes
Attributes explained
Type="Note" will create a site column in the UI showing "Multiple line of text".  Attribute to get full html imput capabilities are RichText="True" (default is false)  & RichTextMode="FullHtml".
Type="Choice" can have a default value selected as shown below:
Built-in Site Column Append-only Comment can be referenced in a content type to provide comments that are appended and basic html is available.
Lookup columns work in SP2010 without having to create an event receiver to setup the lookup relationship using the list guid as is the case in MOSS.  Multiple lookups are possible also simple set the field attributes Type="Lookup" & Mult="TRUE".

Tip: Updated 18 Oct 2010 - CKSDev has the functionality to import Site Columns, this is useful in that you may of created the SiteColumns via the UI on a prototype site and you can not easily get the xml to create the site columns/fields declaritively. http://blog.mastykarz.nl/cksdev-support-importing-site-columns/

Monday, 20 September 2010

CKSdev codeplex SPMetal SPI improvement

Matt Smith, David Mann, Todd Bleaker, Wes Hackett, Waldek Mastykarz & Wouter van Vugt have done a great job with CKSdev and they have upgraded the codeplex project recently that includes "Improved SPMetal SPI".  This is a visual studio template placed under the SharePoint 2010 grouping that allows you to add your SPMetal code to your project easily.  Previously you had to either create the LINQ to SharePoint class using the command prompt and provide switches such as the namespace.   Then I have to manually add/over right the class file generated into my source controlled code.  The other option was to add the SPMetal build to pre-build using the SPMetal cmds and each time and you need the SPMetal proxy file being overwritten to be out of source control i.e. this wouldn't work with your source control without a workaround.

Using the SPMetal Definitions included in the latest CKSDev project code is definitely a productivity improvement.

Data access options - SharePoint Lists or Database Tables

Problem:  I have built a composite application that uses SP 2010 lists for storing the application data.  There are 2 related lists within the application that are high transactional lists like a shopping cart (order with order items).  These 2 lists have had many fields added to them over the duration of the project and are no longer light lists. 
Hypothesis: SharePoint 2010 supports up to 50 million lists and I need to insert, edit and read often the information in these 2 related lists.  The lists are getting rather complex and transactional support is not available vie LINQ to SharePoint.  I need a full audit history which is pretty useful in SharePoint.  The volume and complexity of this transactional data is to heavy for SP especially as the lists grow.  I have to use SQL Server to store the data directly and link the appropriate SP lists using BCS and external content types.  My preferred methods of accessing data are the Entity Framework v4 or Linq to SQL.  As my data is pretty small, I don't need a multi tier system and we are using LINQ to SharePoint. 
Resolution: Create the SP lists in SQL, use LINQ to SQL to add and work with the SQL data.  I use tomb tables in SQL Server to keep a full audit history.  There are now 2 areas of storage: SP lists and directly to SQL tables.  Not ideal but worth that change.

Pros of using SharePoint List vs Database tables
SharePoint ListsDatabase Tables
SharePoint Security and PermissionsTransactional
WorkflowPerformance & higher transaction volumes
VisioningDistinct queries and aggregations
Office intregrationGreater Flexibility
Native / Easy setupEasier for existing .NET developers
SP generates UI
Update 18 Oct 2010 - Storing data for SharePoint 2010 comparison