Tag Archives: SharePoint 2013

SharePoint 2013 Sandbox Solutions: Declarative or User Code, what’s dead really?

UPDATED! Microsoft has finally come out of their hole and shared!

From the SharePoint dev blog posted 1/14/2014:

While developing sandboxed solutions that contain only declarative markup and JavaScript — which we call no-code sandboxed solutions (NCSS) — is still viable, we have deprecated the use of custom managed code within the sandboxed solution. We have introduced the new SharePoint app model as a replacement to those scenarios that required the use of managed code. The app model decouples the SharePoint core product from the app runtime, and this enables much more flexibility and gives you the ability to run the code in the environment of your choice. We realize that our customers have made investments in coded sandboxed solutions and we will phase them out responsibly. Existing coded sandboxed solutions will continue to work in on-premises SharePoint farms for the foreseeable future. Given the dynamic nature of online services, we will determine support needs for coded sandboxed solutions in SharePoint Online based on customer demand. NCSSs continue to be supported. All future investments will go to making the new SharePoint app model richer and more powerful. Accordingly, we recommend that all new development should use the new app model whenever possible. In scenarios where you have to develop a farm solution or coded sandboxed solution, we recommend that you design it so that it can easily evolve toward a more loosely coupled development model.  [emphasis added]

The remainder of this post is what I wrote prior to the above being shared. I’m going to keep it for two reasons: 1) I was right :-p and 2) it took me a good amount of effort to write it and collect all the references. I’m keeping it!

Originally written 9/12/2013:

What’s the deal with Sandbox Solutions in SharePoint 2013?

I’ve read the Nth blog post on the topic, with the latest being Richard’s post http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2013/08/01/sharepoint-sandbox-isn-t-dead-usercode-is.aspx. He states:

With the introduction of apps for SharePoint, many have speculated that sandbox solutions are dead/deprecated.  This is accurate for solutions containing assemblies running on the Sandboxed Code Service (aka – SPUCHostService.exe).  However, declarative solutions are very much still in play and widely used internally by SharePoint (ex: Web Templates and Design Manager).  A declarative .wsp package (one containing no assemblies) is a powerful way to provision elements into the host web.  So don’t be afraid to leverage the solutions gallery as long as your .wsp packages don’t contain code.

And Waldek Mastykarz, an MVP I’ve come to respect, stated in MSDN forum http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e7aac2f8-acd8-486a-bc45-17f0a03c2962/when-to-use-sandbox-solutions-in-sharepoint-2013

My suggestion would be that whenever you need to provision some resources to your Site Collection or Site you would use a Sandboxed Solution. As long as you avoid writing code and stick to declarative assets you should be okay

This has been the general sentiment throughout the web, and everyone tends to agree. I’m not replying to Richard or Waldek directly, I’m just using them as examples ;).

The word on the street: You can create sandbox solutions in SharePoint 2013, however they cannot contain server-side code; you can only create objects via declarative methods (XAML).

As a consultant, I want to back up my claims to my customers with MS fact, which usually comes in form of TechNet, MSDN or KB articles, or justify decisions based on best practices and industry standards, rarely is it a “just trust me” situation. Sadly, I think this topic falls into the latter 2 categories. I want to find documentation proving it, and since everyone else stating the above hasn’t provided such documentation, I went hunting. Sadly, it’s not as clear as I had hoped.

What does deprecated mean? The deprecation of sandbox solutions means that SharePoint 2013 will allow sandbox solutions, even with server-side code, for the sake of being backwards compatible. When something deprecates, chances are it’ll be removed in a coming version, so upgrade it (to Apps).

http://msdn.microsoft.com/en-us/library/jj163114.aspx states

SharePoint sandboxed solutions are deprecated in SharePoint 2013 in favor of developing apps for SharePoint, but sandboxed solutions can still be installed to site collections on SharePoint 2013.

Eh? It’s deprecated but it can still be installed. But what can we do in a sandbox solution? Or is this purely for being backwards compatible? Clear as mud.

Shortly after the above statement, the page actually sends users to a SharePoint 2010 page on farm solutions. Ok, great, we can assume what is doable in a SP2010 farm solution is also doable in a SP2013 farm solution. However, nothing on sandbox solutions. Should I assume the same for sandbox solutions? I came across http://msdn.microsoft.com/en-us/library/ff798382.aspx but this is obviously for SharePoint 2010 sandbox solutions, or is it for SP2013 too, since they sent us to a SP2010 farm solution page.

[getting dizzy]

Then this wiki http://social.technet.microsoft.com/wiki/contents/articles/13373.sharepoint-2013-what-to-do-farm-solution-vs-sandbox-vs-app.aspx states about when to use Sandbox

Deprecated. Therefore, it’s unadvisable to build new sandboxed solutions

But then I come across http://msdn.microsoft.com/en-us/library/dn268593.aspx stating

Throughout this section, we will focus on full-trust code (SharePoint solutions) instead of partial-trust code (sandboxed solutions). Partial-trust user code is deprecated as of SharePoint 2013. If you are looking at partial-trust code, you should consider writing an app instead.

Huh, that’s pretty clear, other than it’s hidden, about half way down the page under Factors to consider. So the partial-trust code is not supported, what about declarative? Is the lack of including it stating it’s still supported?

Digging in deeper, I start to find other articles which don’t say sandbox directly, but imply.  http://msdn.microsoft.com/en-us/library/jj163199.aspx talks about creating workflows for SP2013 in Visual Studio. When it discusses deployment of the workflow:

Create a SharePoint solution package (.wsp) file and deploy the solution package to the site (SPWeb).

That’s a sandbox solution alright. It even goes into debugging Visual Studio workflows on SharePoint Online, so it definitely is not a farm solution. But sadly, everything is around workflows.

I can’t find a SharePoint 2013 reference for declaring other object types, which we are assuming is supported like web templates, lists, libraries, etc. That’s all I could find, did I miss something?

What’s my decision?

I will agree with the “industry standard” of server-side code is not supported, but anything that can be done via declarative XAML is supported in Sandbox Solutions (lists, content types, custom actions, etc). I wish Microsoft would come out and say it, clearly.

What do you think?

Advertisements

SharePoint Browser Support… Improved with 2013, really?

I wrote a post a little while ago about Microsoft’s boasts on supporting all browsers in SharePoint 2010. The fact is, SharePoint 2010 does not. What about SharePoint 2013? Let’s see:

Right off the bat, I see this when using Chrome, but not in FireFox.

Microsoft add on for Chrome

I went ahead and ignored it and tested out some items (below). As soon as I hit the first time that didn’t work as planned in Chrome, I enabled it, and it didn’t help things. Not sure what this is for.

The following tests were completed with Internet Explorer 10.0.9200.16540, Chrome 23.0.1271.64 m, and FireFox 16.0.2. See the bottom for IE8 or IE9.

Within a document library…

Try uploading multiple documents… this has changed since SharePoint 2010. There is no longer an option to upload multiple from the ribbon. Instead, you can drag your files into the library.

Funny enough, this doesn’t always work in IE, works great in Chrome and FireFox. Have you experienced the same in IE? I’m betting this is a bug in my IE with one of the add ons.

ie_dragdrop

Drag and Drop in IE

firefox_dragdrop

Drag and Drop in FireFox

Drag and Drop in Chrome

Drag and Drop in Chrome

Try opening the library in Windows Explorer, only works in IE still.

Open with Explorer in FireFox

Open with Explorer in FireFox

Open with Explorer with Chrome

Open with Explorer with Chrome

Open with Explorer with IE

Open with Explorer with IE

Try opening a Word doc and have it connect and save back to SharePoint. This was terrible in SharePoint 2010, only worked in IE. It appears it works amazingly well on SharePoint 2013!

Live editing in Chrome

Live editing in Chrome

Live editing in IE

Live editing in IE

Live editing in FireFox

Live editing in FireFox

Then there’s lists…

SharePoint 2010 had the datasheet view, which only worked in IE. SharePoint 2013 has updated it to Quick Edit. This appears to work in each browser, however copy/paste from Excel doesn’t work in Chrome and FireFox. The two rows I added in IE were copied from Excel. Couldn’t get it to work in the others.

Quick Edit in FireFox

Quick Edit in FireFox

Quick Edit in IE

Quick Edit in IE

Quick Edit in Chrome

Quick Edit in Chrome

A photo library works so much better in all three browsers. This is a big improvement over SharePoint 2010.

Photo library in IE

Photo library in IE

Photo library in Chrome

Photo library in Chrome

Photo library in FireFox

Photo library in FireFox

Let’s give Excel Services a go…

Beautiful, can you tell the difference between the three?

Excel Web Services in FireFox

Excel Web Services in FireFox

Excel Web Services in IE

Excel Web Services in IE

Excel Web Services in Chrome

Excel Web Services in Chrome

What about exporting a list to Excel…

Export to Excel button

Export to Excel in FireFox

Export to Excel in FireFox

It does actually open it in FireFox.

It does actually open it in FireFox.

Export to Excel in Chrome

Export to Excel in Chrome

Chrome doesn't open the file, just does this weird thing.

Chrome doesn’t open the file, just does this weird thing.

Funny enough, my IE prompted me in the same manner.

Funny enough, my IE prompted me in the same manner.

IE did download and open the file in Excel.

IE did download and open the file in Excel.

As you can see, browser support has greatly improved with SharePoint 2013, with the only disappointment being the Open with Explorer feature. Overall, most if not all of the features work cross browsers. Microsoft removed the ActiveX controls that once controlled most of the above features, now SharePoint uses HTML5 for most of its interfaces. This allows equal access and treats the other (non-IE) browsers are first class citizens.

What about Internet Explorer 8 and 9? Natively, they don’t support HTML5, however, if you have Office 2013 installed, it should all work. For more info, see TechNet blog: http://blogs.technet.com/b/wkng/archive/2012/11/07/sharepoint-server-2013-drag-and-drop-contents-to-library.aspx.

This is excellent news!

For more information on Microsoft’s official stance on browser support: http://technet.microsoft.com/en-us/library/cc263526(v=office.15).aspx. Also Joel Oleson has put together a SharePoint 2013 Browser Comparison Report Card.

Let’s try mobile browsers next…

‘Til then, Happy SharePointing!

My Chat with Jared Spataro on Socializing Outside of SharePoint

Yesterday there was a Facebook chat with Jared Spataro on enterprise social and SharePoint. He took questions on the social features within SharePoint, some general questions around social in the enterprise, and of course what can we expect in the upcoming version of SharePoint.

I love the social aspects in SharePoint 2010: tagging, newsfeed, my profile, etc. I think it’s a great step in the right direction. Social is an important piece in the enterprise, allowing users to collaborate using methods they’re use to is a no brainier. There’s plenty out there explaining why, I won’t dive into it here.

My biggest question, and area for concern, is that of socializing with external users, while keeping collaboration in SharePoint. It’s easy to chat with someone via Skype, and then email them a file, but now I have a separate file out there, a different version. Getting feedback and input directly with SharePoint is key. I’ve created many extranets for customers where they extended SharePoint for this sole purpose. Partners have to log in, navigate to the documents, contribute, then log out. Later partner accounts have to be cleaned up and removed from the authentication store. Such a large undertaking to get a file to a partner, and keep it within SharePoint.

So, with that in mind, my question to Jared was:

“Will there be hooks into external social networks (ala G+, FB, Twitter, etc) which can help leverage external users in collaboration?”

I asked the wrong question…

Great answer. I didn’t ask the right question. (who said there are no stupid questions). The following two fellows asked exactly what I was hoping, and got a even better answers.

Both of his replies are big hints towards a “Yes” to my question. With Microsoft’s focus shifting from connecting employees to “crossing organizational boundaries and making it easier than ever before to connect with customers and partners” is a HUGE step in the right direction. Awesome.

In addition to the above good news, Bjørn Furuknap revealed in his research of the next version of SharePoint the addition of a Document Sharing Web Service. I won’t go into details (check out his publications: http://sharepoint2013beta.com/) but it appears that this new service will allow sharing with some other cloud services, as well as providing an anonymous link to a document (similar to linking to a file in SugarSync or DropBox). Couple this with the new social, and hey, you might just be able to share with SharePoint!