JQuery Mobile Web Client on SharePoint – The Source Code

After numerous requests of publishing the source code of my demo as showed before in JQuery Mobile Web Client on SharePoint enabled I have decided to do so.
You lucky bastards… from the goodness of my hart… and for the good of community… and for world peace.

Please be aware that the solution has not left the alpha stage.
Download the code here … SharePoint4Mobile… this is a .DOC file, cause WP didn’t allow me to upload an archive.
So …  rename the download from .DOC to .ZIP and you’ll be all set.

Things you wanna know:

  • It was developed against SharePoint 2007 in an BPOS environemnt… so you come across some BPOS specific tag in the ASPX  pages.
  • It is mainly JavaScript, cause of the BPOS SharePoint 2007 restrictions… you can make this work using .NET better and faster I’ll bet.
  • An important component I used was the 2008 SPAPI by Darren Johnstone (http://darrenjohnstone.net).

Good luck and feel free to let me know what the experiences were with this piece of code.
I’m allways open for feedback.

 

You may wonder why I stopped developing futher.
This has a fairly simple reason.

My goal was developing an App that enabled a user on at least iPhone or iPad to not just Open and Edit MS Office files… but Save modified files back to SharePoint.
This last feature … saving changed files back to SharePoint – is not possible with iPhone or iPad.
Read one of many articles stating what Apple had NOT done to to leverage SharePoint functionality with an iPhone or iPad.
http://blog.wortell.nl/jasper/the-ipad-and-sharepoint-%E2%80%93-what-can-and-can%E2%80%99t-you-do-%E2%80%93-part-1/

 

Advertisements

Pass a ListItemId to SharePoint workflow

In SharePoint Designer 2007 open the page where an action is needed.

Right click the control the wher you want to start the workflow from… click Form Actions.

Add Custom Action and click Settings and the Workflow Wizard will start.

Click Variables and add a variable called something like MyListItemId.

Finish the workflow and see that the code around your control will be updated somewhat like this:

<a href=”javascript: {ddwrt:GenFireServerEvent(‘__workflowStart={{FA532C23-6F80-4266-868D-1EBC219A7E11},New,{8F0B8599-4B45-421A-A4A2-9BD2817078DE},}’)}”>
//MyControl//
</a>

 

Here’s what you need to do to pass the variable MyListItemId

<a href=”javascript: {ddwrt:GenFireServerEvent(concat(‘__workflowStart={{FA532C23-6F80-4266-868D-1EBC219A7E11},New,{8F0B8599-4B45-421A-A4A2-9BD2817078DE},MyListItemId=’,@ID, ‘}’))}”>
//MyControl//
</a>

 

EASY AS PIE

SharePoint, Remote BLOB Storage (RBS), External BLOB Storage (EBS) and FILESTREAM

Finding #1: Remote Blob Storage RBS is recommended for SharePoint 2010 in conjunction with SQL Server 2008 R2. 

Finding #2: I don’t need FILESTREAM when I want use RBS. I can use FILESTREAM in conjunction with RBS though.

 

RBS

EBS

On Microsofts deprecation list

No

Yes

BLOB Store scope

Per Content DB

Entire farm

BLOB Storage Providers

More than one

Just one

Just for informational purposes, a high level architectural difference between RBS and EBS is that RBS is implemented by SQL Server 2008 R2 and EBS is implemented from a hotfix for MOSS 2007 in SP1 and is part of the SharePoint stack. EBS is still supported but is on the deprecation list.

For RBS, out-of-the-box you get a FILESTREAM provider from Microsoft which allows you to store blobs to disk drives (i.e. c:\myblobstore). It is important to note that SharePoint 2010 doesn’t know (and doesn’t care) that BLOBs are not in the database. That is the provider’s job. Third party vendors will surely release other providers, think storage in the cloud, NAS, other storage mechanisms. So if you need something more than the FILESTREAM provider from Microsoft, you are looking to the third party market.

What is Remote BLOB Storage?

A new feature in SQL Server 2008 R2 is Remote Blob Storage (RBS) which allows admins to setup SQL to save data that would normally go into a BLOB field to be stored outside the database using an RBS provider. This provider could store data on a cheaper disk solution (compared to the expensive disk solutions usually selected for SQL Server), to a SAN or maybe even into the cloud… it really doesn’t matter where. The point is that BLOBs can be kept out of a SQL Server DB.

For SharePoint this has big implications because as a document/attachment centric product, it stores a LOT of data in BLOBs generating large content databases. Before this feature became available in SQL 2008 R2 RBS was pretty much impossible. Some like External Blob Storage (EBS) was just not recommended. SharePoint 2010 when combined with SQL Server 2008 R2 allows admins to do RBS, keeping only metadata in de content DBs and keep the BLOBs out. This is a decisions not to be taken lightly.

First think about backup & restore policy. Additional backups are needed for the remotely stored BLOBs. Those who are looking to gain from RBS are large SharePoint implementations, high investment and usage. Third party vendors of backup software who support RBS therefor have an edge.

When to use Remote BLOB Storage

  • RBS is typically recommended in the case where the content databases are 4 gigabytes (4 GB) or larger.
  • When the number and the file size get bigger and bigger.
  • Intelligent backup and restore mechanisms are in place that support RBS.

When to use FILESTREAM

In SQL Server, BLOBs can be standard varbinary(max) data that stores the data in tables, or FILESTREAM varbinary(max) objects that store the data in the file system. The size and use of the data determines whether you should use database storage or file system storage. If the following conditions are true, you should consider using FILESTREAM:

  • Objects that are being stored are, on average, larger than 1 MB.
  • Fast read access is important.
  • You are developing applications that use a middle tier for application logic.

For smaller objects, storing varbinary(max) BLOBs in the database often provides better streaming performance.

Comparison point

Storage solution

File server / file system

SQL Server (using varbinary(max))

FILESTREAM

Maximum BLOB size

NTFS volume size

2 GB – 1 bytes

NTFS volume size

Streaming performance of large BLOBs

Excellent

Poor

Excellent

Security

Manual ACLs

Integrated

Integrated + automatic ACLs

Cost per GB

Low

High

Low

Manageability

Difficult

Integrated

Integrated

Integration with structured data

Difficult

Data-level consistency

Data-level consistency

Application development and deployment

More complex

More simple

More simple

Recovery from data fragmentation

Excellent

Poor

Excellent

Performance of frequent small updates

Excellent

Moderate

Poor

Table 1: Comparison of BLOB Storage Technologies Before SQL Server 2008


Figure #1: Read performance of various BLOB sizes

Find more info on FILESTREAM here and here.

Searching SharePoint from Windows7 Windows Explorer

In Windows7 you can create custom search connectors to OpenSearch search engines.

And YES… SharePoint 2007 en 2010 publish OpenSearch standard search engines.

It is really simple to create a connector to SharePoint.

  1. Open Notepad and copy in the XML below
  2. Replace the areas in red with your SharePoint Search Center information.  Be sure to only replace just the part of the URL that gets to your Search Center:  e.g.  http://sharepoint.company.com/SearchCenter  
  3. Change the scope if you want:  e.g.  &amp;s=Intranet  or  &amp;s=All%20Sites  or even  &amp;s=People
  4. Save the file to your Desktop as:    SearchMySharePointSite.osdx
  5. Double click the file to install the Search Connector.  (it will install to your “Searches” directory  e.g.   c:\Users\<username>\Searches

And if you don´t have enough connectors… here is the rest of them

Amazon, DeviantArt, eBay, Flickr, Google Blogs, Google News, Live Search, MSN Search, Redmond Pie, Wikipedia, Yahoo and YouTube


————————————————————————————

<?xml version=”1.0″ encoding=”UTF-8″?>
<OpenSearchDescription xmlns=”http://a9.com/-/spec/opensearch/1.1/” xmlns:ms-ose=”http://schemas.microsoft.com/opensearchext/2009/”>
<ShortName>SharePoint Search</ShortName>
<Description>Search the SharePoint site.</Description>
<Url type=”application/rss+xml” template=”http://sharepoint.company.com/searchcenter/_layouts/srchrss.aspx?k={searchTerms}&amp;s=All%20Sites“/>
<Url type=”text/html” template=”http://sharepoint.company.com/searchcenter/Pages/Results.aspx?k={searchTerms}&amp;s=All%20Sites“/>
<ms-ose:ResultsProcessing format=”application/rss+xml”>
<ms-ose:LinkIsFilePath>-1</ms-ose:LinkIsFilePath>
</ms-ose:ResultsProcessing>
</OpenSearchDescription>

MOSS2007: Error adding a New WebPart

What to do when this error occurs when you need to add a new webpart to your gallery of webparts.

The error:

File Not Found. at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Signature..ctor(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RuntimeMethodInfo.get_Signature()
at System.Reflection.RuntimeMethodInfo.GetParameters()
at Microsoft.SharePoint.WebPartPages.SPWebPartSerializer.GetPersonalizableProperties()
at Microsoft.SharePoint.WebPartPages.SPWebPartManager.GetEffectiveWebPartType(Type webPartType, SerializationTarget serializationTarget, Boolean ignoreSupportsAttributeMarkup)
at Microsoft.SharePoint.WebPartPages.SPWebPartManager.GetEffectiveWebPartType(Type aspWebPartType, SerializationTarget serializationTarget)
at Microsoft.SharePoint.ApplicationPages.NewDwp.Page_PreRender(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnPreRender(EventArgs e)
at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

The cause of this error is caused probably for two reasons:

  1. You are using either the SmartPart webpart of Jan Tielens.
  2. Or ASP.NET Ajax is not installed on the SharePoint server.

All you need to do to correct this is download ASP.NET 2.0 AJAX Extensions 1.0, install it… and do a IISRESET.

 

Good luck.