Category Archives: Elumenotion

Doug Ware’s SharePoint posts from the original Elumenotion blog.

Task Runner Explorer is the Best Visual Studio Feature You Probably Aren’t Using

TL;DR – There is a handy feature in VS 2015 called Task Runner Explorer that you can use to run PowerShell or batch commands to do just about anything. You can also bind these to build events.

A task runner is a program that runs tasks. If you’ve been doing much web development these past couple of years you are probably familiar with this concept and popular task runners like Grunt and Gulp. In fact one or both of these might be essential to your development workflow. And, since many web developers consider these to be essential tools, the Visual Studio team released the Task Runner Explorer extension for Visual Studio 2013 and later made Task Runner Explorer an out of box feature in Visual Studio 2015.

If you aren’t aware that this feature exists, you aren’t alone! I took a poll on twitter.

<sarcasm>I was a bit surprised by this as the feature is prominently available by going to View | Other Windows | Task Runner Explorer.</sarcasm>

JavaScript Task Runner? No Thanks!

If your work isn’t mostly JavaScript, using a JavaScript based task runner probably sounds pretty unappealing. Happily there is an extension that supports .exe, .cmd, .bat, .ps1 and .psm1 files called Command Task Runner.

We use this in the Azure Functions for SharePoint project to automate deployment at build time by binding the script to the build event.

The deploy script is complicated, but there are a couple others that are pretty simple and are not bound to any events. We run them manually and I think they illustrate best why this tool is something that belongs in your everyday toolkit.

For example, each Azure Function for SharePoint relies on a config.json file. It would be an error-prone pain to create them by hand or by copying an existing configuration and so we have a script that creates a new config and puts it on the clipboard:

$scriptdir = $PSScriptRoot
[Reflection.Assembly]::LoadFrom("$scriptdir\AzureFunctionsForSharePoint.Core\bin\Debug\AzureFunctionsForSharePoint.Core.dll")
$config = New-Object AzureFunctionsForSharePoint.Core.ClientConfiguration

#Pretty print output to the PowerShell host window
ConvertTo-Json -InputObject $config -Depth 4

#Send to clipboard
ConvertTo-Json -InputObject $config -Depth 4 -Compress | clip
														

When a new client config.json is needed, all one must do is run the command from Task Runner Explorer.

Pretty cool eh?

–Doug Ware

Introducing Azure Functions for SharePoint

I’m excited to announce the first public release of Azure Functions for SharePoint, a powerful but inexpensive to operate open source backbone for SharePoint add-ins. We’ve been using Azure Functions in production for a while now, and I love it!

I’ll be speaking about Azure Functions next Saturday, January 21, 2017 at Cloud Saturday Atlanta. You should come!

About Azure Functions for SharePoint

AzureFunctionsForSharePoint is a multi-tenant, multi-add-in back-end for SharePoint add-ins built on Azure Functions. The goal of this project is to provide the minimal set of functions necessary to support the common scenarios shared by most SharePoint provider hosted add-ins cheaply and reliably.

Features include:

  • Centralized Identity and ACS token management
  • Installation and provisioning of add-in components to SharePoint
  • Remote event dispatching to add-in specific back-end services via message queues including
    • App installation
    • App launch
    • SharePoint Remote Events

Navigating the Documentation

These documents consist of articles that explain what the functions do, how to set up the hosting environment, and how to use the functions in your add-ins and API documentation for .NET developers linked to the source code in GitHub.

A Note on Terminology

These documents use the term client to refer to a given SharePoint add-in. A client is identified using its client ID which is the GUID that identifies the add-in’s ACS client ID in the SharePoint add-in’s AppManifest.xml.

Functions

There are three functions in this function app.

  1. AppLaunch
  2. EventDispatch
  3. GetAccessToken

Setup Guide

We’re working on full automation with an ARM template, etc. The Visual Studio Solution includes a PowerShell script you can use with Task Runner Explorer and Command Task Runner. Until then, create a function app and copy the contents of this zip file into the function app’s wwwroot folder.

Configuring the Function App

Until the automation is fully baked, you can use this video to guide you through the relatively easy setup of the function app.

Configuring SharePoint Add-ins to use the Function App

Azure Functions for SharePoint is multi-tenant in that it can service add-ins installed broadly across SharePoint Online and also because the back-end processes that respond to client specific events in SharePoint or rely on Azure Functions for SharePoint for security token management can be located anywhere with a connection to the Internet.

See the Client Configuration Guide for more information.

Using the Function App to Support Custom Back-ends

It is possible to use Azure Functions for SharePoint to deliver pure client-side solutions, i.e. HTML/JS. However, many add-ins must support scenarios that are difficult or impossible to achieve through pure JavaScript. Azure Functions for SharePoint supports custom back-ends in two ways:

  1. Notification of add-in and SharePoint events via Azure Service Bus queues via the EventDispatch Function
  2. A REST service that provides security access tokens for registered clients via the GetAccessToken Function

In both cases the client back-end receives all the information it needs to connect to SharePoint as either the user or as an app-only identity with full control. The function app does the actual authorization flow and its client configuration is the only place where the client secret is stored.

Your custom back-ends can live anywhere from the same Function App where you deployed Azure Functions for SharePoint to completely different Azure tenancies or on-premises servers. All that is required is that the back-end can read Azure Service Bus Queues and access the REST services via the Internet. Aside from these requirements, the back-end can run on any platform and be written in any language.

That said, if you are using .NET, this project included an assembly named AzureFunctionsForSharePoint.Common that you can use to make things even easier!

API Docs

Complete documentation of the Azure Functions for SharePoint API see the API Guide.

Want to Contribute to this Project?

We’re still working on that too, but please reach out to me if you want to help!

–Doug

Comparing InstantQuick SharePoint Provisioning and OfficeDev PnP

The purpose of this post is to help you understand when to use InstantQuick SharePoint Provisioning and when to use OfficeDev PnP-PowerShell by contrasting the two. At the outset I will admit I am biased as I created the former, but I also use the latter. And, not to put the conclusion before the comparison, I think both have a place in your toolbox. Each PowerShell module gets its functionality by wrapping a set of class libraries that you can use independently of the module in your own solutions, and so a comparison of the PowerShell modules is also a comparison of the class libraries they wrap which are also open source and located in GitHub.

Where InstantQuick SharePoint Provisioning Shines – Templated Provisioning

PnP and IQ each offers the ability to create provisioning templates by reading from an existing site and the ability to deploy the resulting templates to other SharePoint sites. PnP has a number of other very useful and granular features. At the time of this writing PnP offers 170! individual PowerShell commands. Most of these are not for creating provisioning templates or application of provisioning templates, but are instead for administration and manipulation of individual elements of a SharePoint tenant or site. Examples include such diverse commands Send-SPOMail, Enable-SPOFeature, and Get-SPOTimeZoneId. Most of the commands wrap types from the SharePoint Client Object Model which are extended by OfficeDevPnP.Core.dll.

I’ll talk about these PnP commands in general in the next section. In this section I’m comparing the primary PnP commands dedicated to templating and template provisioning. These are:

PnP has two different package formats and there are a few other commands in PnP for the management and conversion of the templates themselves that are outside the scope of this comparison as they don’t affect the actual provisioning functionality.

In contrast IQ has only 24 PowerShell commands, is considerably less granular, and is more or less focused on creating, installing, and uninstalling provisioning templates. IQ offers two types of templates: AppManifest and SiteDefinition. An AppManifest describes fields, content types, lists, etc. and a SiteDefinition defines a hierarchy of one or more Webs each with a corresponding AppManifest. To keep this comparison simple, I’ll focus on only the two commands that most closely match PnP:

For a more detailed look at the IQ commands in action see the samples on GitHub. For this comparison I am using the Board of Directors Site sample. If you’d like to play along at home, use IQ to create a site for this samples, use PnP to create a template from the sample site, and then apply the PnP template to another site for comparison – do not use the same site collections or the items will collide!

Get-SPOProvisioningTemplate Versus Get-WebCreator

Each of these commands creates a template by reading from a site that contains customizations. Get-SPOProvisioning determines what to include by comparing the site to an XML document embedded in the PnP stack whereas Get-WebCreator compares the site with the customizations with another site to produce a delta. Here at InstantQuick we prefer the latter because we don’t have to maintain a static template as Microsoft changes SharePoint between versions but primarily because we treat AppManifests as modules we combine to produce larger customizations. For example, our Practice Manger apps are composed of many different manifests, some of which are shared making customizations and maintenance much easier. To create a custom solution for a client we can install a base solution to a site, modify it, and extract the delta as a new package. To deploy it, we install the AppManifests in order so that the delta takes precedence over the original.

Big Difference #1 – Support for Pages with Web Parts

One side-effect of the PnP approach is that they have different installers for different versions of SharePoint. At present there are three, SP2013, SP2016, and SharePoint Online. This can be a pain if you work with more than one version of SharePoint. The core PnP solution uses build configurations and conditional compilation to deal with the differences between versions whereas IQ has one build configuration with conditional logic and heuristics to decide how to behave at runtime based on the server’s version.

If you are using a version of PnP compiled for a version where the Client Object Model doesn’t support a particular operation, for example reading a Web Part definition from a page in SharePoint 2013, PnP will simply skip those steps. Among IQ’s conditional logic is code that will fall back to older SOAP based API’s as necessary to read Web Parts and 2010 style workflows.

PnP therefore doesn’t support Web Part, Wiki, or Publishing Pages that contain Web Parts for anything but the newest versions of SharePoint and (as far as I can tell) doesn’t support SharePoint 2010 workflows at all.

Big Difference #2 – Site Specific Fixups

Both Get-SPOProvisioningTemplate and Get-WebCreator will include the source site’s home page in the template by default. The screen shots below are from sites created by IQ and PnP respectively. The PnP version was created from a template produced by using Get-SPOProvisioningTemplate against the IQ version and then applying the template to a web in a different site collection.

The second site’s home page looks pretty good, but unfortunately all of the URLs in the template point to the original site. This includes the navigation links, the image’s source URL, etc.

Get-WebCreator tokenizes a variety of things including URLs, list IDs, and group IDs in links, filed, web parts, and files. Install-IQAppManifest substitutes the correct values during provisioning and does things in the proper order when necessary. Both Get-SPOProvisioningTemplate and Apply-SPOProvisioningTemplate simply read the values and reproduce them on the target without modification.

Example one from IQ

Example two from PnP

 

Big Difference #3 – Creation of Complete Templates

If you are following along at home, there are a number of other differences you will quickly notice. Among them are the fact that the Board Events list has a workflow that is missing in the PnP site, that the Meeting Minutes library has a custom document template that is missing in the PnP version, and that several of the lists have custom view pages that are missing in the PnP version. To be fair, Get-WebCreator won’t include all of these files by default as part of the differencing process, but it will if you use the -Options switch to specify the lists and libraries with items you wish to include. You can also extend a created template using IQ commands such as Get-FileCreatorAndFolders and Get-ListCreatorListItems.

PnP has the ability to extend the provider with custom handlers for such situations, and the Office PnP samples repository has samples for just about anything you might want to do, but to get a complete template generally means you will have to understand PnP at a fairly deep level and be willing to write a bunch of code.

Where OfficeDev PnP-PowerShell Shines – Formal and AdHoc Admin Scripting

If you are responsible for a SharePoint environment and you use PowerShell, I have no reservations saying that you should be using OfficeDev PnP-PowerShell.

You need to add a file to 1000 sites? Add-SPOFile
You need to clean up some dodgy Custom Action that’s breaking a site? Remove-SPOCustomAction
You need to ….? I could go on all day because PnP has 170 really useful commands!

I could wax poetic all day about the good things in PnP, but it isn’t my project. J

–Doug Ware

 

 

The InstantQuick SharePoint Provisioning Engine is Now Open Source and on GitHub

The InstantQuick SharePoint Provisioning stack is the easiest to use and most complete SharePoint provisioning library currently available. It is the core engine used in the InstantQuick line of products and can read from and provision to SharePoint 2013, SharePoint 2016, and SharePoint Online.

This repository includes the .NET class libraries we use at InstantQuick and a companion PowerShell module.

Minimal Path to Awesome

  1. Download and Install the PowerShell Module – Setup
  2. Visit the wiki
  3. Pick one of the three samples and follow the instructions

About the Project

InstantQuick SharePoint Provisioning predates Office PnPCore by a couple of years and differs in that it is designed to be a complete and turnkey provisioning engine that is easy to use with minimal setup as opposed to being an extensible demonstration project of the SharePoint Client Object Model and CSOM development patterns. It offers more features out of the box for provisioning including the ability to read and provision Web Part Pages, Wiki Pages, Publishing Pages, and 2010 style workflows against versions of SharePoint that do not support the latest SharePoint Client Object Model API’s by falling back to older API’s as needed.

If it sounds like we are bashing the PnPCore stuff, we aren’t. This project even includes some of its (properly attributed) code! If you are looking for a great library to extend, it might well be a better choice. But we think this one is likely to satisfy most scenarios with less setup and without the need to extend the base functionality (or even understand how it uses the API’s).

As with the Microsoft Patterns and Practices library, InstantQuick SharePoint Provisioning can generate templates by comparing a customized site to a base site. Unlike the PnP engine you can easily include any file in the site (including publishing pages and page layouts) without writing code or otherwise extending the library. It also has the capabilty to provision site hierarchies and to both install and/or remove multiple template manifests as a single operation.

Features

InstantQuick SharePoint Provisioning can read and recreate the following out of the box

  • Webs and subwebs
  • Fields
  • Content Types
  • Lists and Libraries with or without custom views
  • List items
  • Documents
  • Folders
  • Web Part Pages
  • Wiki Pages
  • Publishing Pages
  • Master Pages
  • Page layouts
  • Display templates
  • Composed looks and themes
  • Other arbitrary file types with or without document properties
  • Feature activation and deactivation
  • Permission levels
  • Groups
  • Role assignments (item permissions)
  • Top and left navigation
  • Document templates
  • 2010 Workflows
  • Managed metadata fields and list item values
  • Site, Web, and List custom actions
  • AppWeb navigation surfaces
  • Remote Event Receivers
  • …and more

SharePoint Sandbox Rescue Services Available!

Normally, I would not do this, but the clock is running…

If you have critical sandbox solutions that must be fixed before Microsoft pulls the plug on sandbox code  and renders them unusable, please contact me for a consultation immediately! This week we assembled a team of experts who understand sandbox solutions and how to migrate most scenarios. Naturally, our availability is finite, so please don’t wait until the last minute to reach out.

Good luck!
–Doug Ware

Six Things to Know About the Newly Announced SharePoint Framework

Today at The Future of SharePoint event in San Francisco Microsoft made several important announcements and released quite a bit of information. Without a doubt, the new SharePoint Framework was the biggest bombshell. As a longtime SharePoint MVP and founder of an ISV that sells SharePoint add-ins and tools, I was fortunate to be in Redmond early in the process and more recently to offer feedback. In fact, I and my associate, fellow MVP Dan Attis, actually got to spend a few days playing with the new bits at a recent Dev Kitchen in exchange for our feedback. Here are my top six big picture thoughts on the new stuff.

#1: You Are Not Screwed

One thing that was immediately noticeable in my recent interactions with the SharePoint team is that they are excited. They believe in this stuff and they want to share their new awesomeness with you. They think you’ll love it as they do! For many of us though, the most likely initial reaction is to be very disturbed. It’s the kind of feeling I imagine a homeowner gets when she receives the Notice of Eminent Domain for the road widening that will destroy her front yard.

So, the first thing you need to know is that the existing UI upon which your house stands on is not scheduled to be bulldozed. SharePoint 2016 is not shipping with the new experience. The features it does ship with reach the end of mainstream support in 2021 and extended support in 2026. Those dates represent the earliest possible end of support.

But what about SharePoint Online?

There as well, you can expect to be able to use the current experience for a long time to come. The hybrid story depends upon it, but more importantly Microsoft has huge customers that are in the process of moving to SharePoint Online from on-prem environments based on the current UI.

In fact, if you have significant investments in custom solutions based on the current UI, you should be feeling a sense of relief. Most such solutions have some level of dependency on UI things Microsoft has said should not be depended upon and we all live with some level of fear that we will wake up one day to find one of the dependencies changed and our solution is broken. Microsoft’s new approach makes this much less likely.

The only reason to be concerned is if you are an ASP.Net Web Forms developer who hasn’t made moves to learn modern web development – in which case it is well past time you hit the books. I promise that it is easier than what you are doing now which is why the rest of us have moved on.

#2: It Restores a Key Value Proposition of SharePoint for SharePoint as a Platform

A big reason for SharePoint’s success is that it is based on ASP.Net Web Forms. Ten years ago, a big chunk of enterprise web developers used ASP.Net as their primary tool. This meant that SharePoint development was pretty approachable to many enterprise developers. Since then though, times have changed. New developers aren’t learning ASP.Net Web Forms. What was a big strength has now become a big weakness and traditional SharePoint development skills are niche skills in today’s job market.

This is a problem for everyone in SharePoint land that needs developers including Microsoft. There are people working as developers on the SharePoint platform who were not old enough to use the kitchen stove when ASP.Net Web Forms came out!

The new SharePoint Framework means that SharePoint development is now in step with mainstream web development once again, except this time you have a lot more choices. It also matters less what choices you make because the framework offers a better way to isolate your solution while also being as deeply integrated as is required.

Furthermore, the new framework embraces the fact that you need the ability to participate in the page’s real DOM. It no longer forces the use of things like iframes and weird URLs. You don’t need to be clever or go against the grain as is often required now to build the types of customizations required by the business you are in.

#3: Open Processes Work Better

I’ve been focused on SharePoint for a decade and I’ve been an MVP for the last five years. For most of that time what Microsoft intended to deliver was completely set in stone by the time anyone outside the SharePoint team knew what was coming. As a stakeholder, the best you could do was complain loudly in hopes that the thing will be better in three years when the next version comes out. In some areas, the Office development teams have fully embraced open source software and open development. In this case they opened up on the core platform for the first time and got feedback at several points in the process. I think the result will be much closer to ‘good’ out of the gate than I had previously come to expect because this time around I’ve actually seen them change their minds based on feedback from outside their own team!

I admire the SharePoint team for how far they have come in this regard. Opening yourself up to criticism is not easy. Personally, I hate it.

I could sense the stress at the Dev Kitchen. It must have been terrifying for each of them. At dinner on the last night, after what was clearly a successful event I could sense the relief. They’d deliberately put themselves through the wringer and survived, but they all looked like they were going to fall asleep!

Make no mistake – it is still early. The first releases of this stuff are guaranteed to have holes and annoying flaws, but things should improve quickly because…

#4: The Biggest Issue with Modern SharePoint as a Platform is Being Fixed

In my opinion, the single biggest factor with the limited success of sandbox solutions and the first versions of the app/add-in model was not that each lacked or blocked functionality that was easily accessible in farm solutions. No, the biggest issue with modern SharePoint as a platform is that the SharePoint development team did not use either model themselves. They had no real skin in the game and no internal incentive to fix what was always somebody else’s problem.

The SharePoint Framework does not just align SharePoint development with modern web development. It also more closely aligns the SharePoint development team with the developers who are customizing SharePoint. Unless they make a habit of cheating, the really big flaws are going to get fixed.

#5: Microsoft Needs Your Help

All that said, there is still some cause for concern. The document library preview release left many scratching their heads. The fact that they dropped something like into first release that without even putting it on the roadmap was hard to understand. And the absence of support for fundamental features we and PnP rely upon such as script custom actions or jsLink was just dumb.

Please note that I know dumb when I see it. As a very experienced and well-respected software developer and business owner I work in dumb like other artists work in clay or oil.

As an outsider it’s fun to speculate where that sort of dumb comes from. Is there a powerful manager that hates PnP and the rest of us so much that they would withhold a couple key lynchpins to see it fail? That would make a great story, but still, it is hard to believe one person could generate that amount of dumb. It probably required a whole team!

I believe that, for a long time, the SharePoint team generally thought that the use of either of these missing features was a hack that should be discouraged because script injection was bad and therefore they were bad. Perhaps now that SharePoint is embracing script injection people still subconsciously want to kill those features but don’t realize their ‘flaws’ are now seen as virtues. This a sort of diffuse cloud of dumb that is common in groups with a long history even where all of the individuals are very smart.

Or maybe the dumb wasn’t dumb at all. Maybe it’s the people focused on building the new document library had a narrow focus that didn’t include any integration scenarios.

Whatever the reason, feedback is to dumb as sunshine is to nasty germs. Their development process is now built to generate lots of feedback before delivering and act upon it. You can help by getting involved and giving lots of feedback in the public Yammer network and on SharePoint’s User Voice page.

Speaking of User Voice and the missing document library features…

#6: It’s not Vaporware

The Dev Kitchen I attended had several accomplished SharePoint development experts, but it also met a good number of people from ISVs who didn’t have much, if any, experience working with SharePoint. I saw people working in OSX, Linux, and Windows. There were a number of scripted hands on labs, but we also had free time to implement our own solutions. Over the course of three days I saw several really impressive samples from this diverse bunch of people.

As for myself, I took a moderately complex sample that uses AngularJS and Bootstrap for pluggable components and wrapped it in the new stuff. It took very little time, and the end result worked in both the current UI and in the new UI. I should probably mention that I was pretty unlucky and was in pain from a kidney stone during much of the event! Even in my diminished and pitiful state I was able to work completely outside the script and it worked!

SharePoint Wiki Page with Web Parts Pattern for Custom UI

In my previous post I used a scoring system to come up with an answer to the question: What is the most ideal type of page to use when customizing SharePoint? Somewhat surprisingly, the answer based on my criteria is a SharePoint Wiki Page. A wiki page which has the advantage because all wiki pages are served from a shared template instead of being actual files. Creating a wiki page doesn’t create a custom ASPX page that requires maintenance. By relying on the central template, the structure and features of a wiki page stays up to date as SharePoint evolves.

In this post I will cover one of the patterns for custom UI based on wiki pages we use in our apps here at InstantQuick: Wiki Page with Web Parts. This pattern is best if we want to allow the owners of the target site to modify the solution after it is deployed. It does not require a provider host and works when an add-in is fully contained in SharePoint. You can see this design pattern in action in the IQParts – Cloud App Compatible Web Parts using AngularJS and Bootstrap sample framework.

Wiki Page with Web Parts Pattern

This pattern is the easiest to follow because you can implement it using nothing but SharePoint and a text editor like notepad. The pattern consists of a wiki page, the default page type in a Team site, and one or more Content Editor or Page Viewer Web Parts that load the custom solution. Logically, the pattern looks like this:

The pattern is simple, but one important rule is that a customization’s appearance and behavior should depend only on the scripts, style sheets, and other resources included in the customization – not on the parent document’s or its related resources. Following this rule gives your customization the best chance for a maintenance free future as the SharePoint platform evolves.

The easiest way to enforce this rule is to refine the pattern to contain the customization in an iframe.

The iframe creates a new document that allows the customization to work in isolation from the parent document. In this version of the pattern the app must be contained in an ASPX page. The default permissive file handling settings will cause the browser to download html files instead of rendering the html in a frame. The file extension prevents the download.

The container ASPX used in in the IQParts – Cloud App Compatible Web Parts using AngularJS and Bootstrap sample framework is shown below. As you can see it does not contain any actual server side code.

What is the most ideal type of page to use when customizing SharePoint?

Very few platforms offer the range of customization options that SharePoint offers. The menu is huge! How does one go about the task of choosing the most ideal way to do anything?

In this post I am going to tackle one of the most fundamental choices everyone faces – What is the best way to make a custom web page for a SharePoint customization?

For this contest I am including only options that do not require third-party solutions and that work on-premises and in SharePoint Online.

The Contestants

The nominees for the best way to make a custom SharePoint web page are:

  • Custom SharePoint ASPX Page
  • External / Provider Hosted UI
  • Publishing Page
  • SharePoint App-in Web Hosted UI
  • Traditional SharePoint Web Part Page
  • SharePoint Wiki Page

Evaluation Criteria

Not long ago I wrote a post describing 8 Characteristics of an Ideal SharePoint Customization. I will judge each of the options based on these ideals, but to be as objective as possible pretend that each option meets the first and last ideals: It meets the needs of the people who use it without limitations imposed by the platform and It is manageable and governable.

In other words, I will try to do this without introducing hypothetical requirements or assuming anything about the ability of an organization to support and maintain the solution. This will let me answer the question of the most ideal option in general.

In real life, with real requirements and real people, you should always evaluate whether each option meets the needs of the people who use it without limitations imposed by the platform and if you can manage and govern the result. Sometimes the actual requirements will determine or limit your options. For example, if you are building a site using SharePoint’s publishing features, you will use Publishing Pages.

Finally, because this is specifically about pages the ideal, Runtime or configuration faults in a customization can only impact the customization, generally doesn’t apply; we use different tools to break whole sites.

That leaves five remaining ideals we can use to weigh the options.

  1. It doesn’t interfere with the operation of the underlying platform
  2. It uses SharePoint functionality as much as possible
  3. It depends on things other than SharePoint as little as possible
  4. It cedes runtime control to SharePoint as little as possible
  5. The other things it depends on are provided via supported mechanisms other than directly editing SharePoint Master Pages or ASP.NET files

Scoring

Here is a place where my ideals could use some refining, because ‘as little as possible’ is subjective. However, I am comparing each option to each ideal and saying ‘true’ or ‘false’ without giving partial credit. The one with the most true’s wins the prize.

Summary

 

A

B

C

D

E

Custom SharePoint ASPX Page

 

X

X

   

External / Provider Hosted UI

X

   

X

X

Publishing Page

 

X

X

   

SharePoint App-in Web Hosted UI

   

X

   

Traditional SharePoint Web Part Page

 

X

X

   

SharePoint Wiki Page

X

X

X

 

X

 

Custom SharePoint ASPX Page

Custom SharePoint ASPX pages are often created by modifying a Web Part page in SharePoint Designer.

Ideal Aspects

  • It uses SharePoint functionality as much as possible
  • It depends on things other than SharePoint as little as possible

Non-ideal Aspects

  • It interferes with the operation of the underlying platform
  • It relies on SharePoint for runtime behavior
  • It is a direct edit to an ASP.NET file

The way a custom ASPX page interferes with the underlying platform is by creating a custom page that is subject to safe mode parsing and be compiled. As a unique object it will diverge from non-customized pages over time.

External / Provider Hosted UI

External / Provider Hosted UI serves the user interface from a provider outside of SharePoint. The custom UI consumes SharePoint services via one or more client API’s.

Ideal Aspects

  • It doesn’t interfere with the operation of the underlying platform
  • It cedes runtime control to SharePoint as little as possible
  • The other things it depends on are provided via supported mechanisms other than directly editing SharePoint Master Pages or ASP.NET files

Non-ideal Aspects

  • Typically recreates functionality that could be provide by SharePoint
  • It is completely dependent on the external host

Publishing Page and Traditional SharePoint Web Part Page

These types of pages are examples of Custom SharePoint ASPX Pages and are ideal and non-ideal in the same says for the same reasons. Publishing Pages typically rely on custom master pages and page layouts. Client API’s create traditional SharePoint web part pages by copying the ASPX from an out-of-box page into a new file.

SharePoint App-in Web Hosted UI

SharePoint App-in Web Hosted UI is hosted in a special web in a domain outside of the containing site’s domain.

Ideal Aspects

  • It depends on things other than SharePoint as little as possible

Non-ideal Aspects

  • It interferes with the operation of the underlying platform
  • Typically recreates functionality that could be provide by SharePoint
  • It relies on SharePoint for runtime behavior
  • It is a direct edit to an ASP.NET file

Pages in SharePoint App-in Webs are Custom SharePoint ASPX Pages with less access to SharePoint functionality than the other types of custom pages in this competition.

SharePoint Wiki Page

SharePoint Wiki Pages are superficially similar to traditional SharePoint Web Part pages with one important difference – they are not custom ASPX pages. A wiki page is served from a shared template that changes over time.

Ideal Aspects

  • It doesn’t interfere with the operation of the underlying platform
  • It uses SharePoint functionality as much as possible
  • It depends on things other than SharePoint as little as possible
  • The other things it depends on are provided via supported mechanisms other than directly editing SharePoint Master Pages or ASP.NET files

Non-ideal Aspects

  • It relies on SharePoint for runtime behavior

The Winner!

In general, a SharePoint Wiki Page is the best type of page to use when customizing SharePoint. You can see one of our preferred design patterns in action in the IQParts – Cloud App Compatible Web Parts using AngularJS and Bootstrap sample framework. I will be covering our favorite design patterns and how they are constructed in a future post.

–Doug Ware

Atlanta Cloud Saturday – September 26th, 2015

Please join us at the Microsoft Greater Southeast District office in Alpharetta, GA on September 26 for the first annual Atlanta Cloud Saturday!

The goal of this event is to give you an overview of some of the cloud technologies being used today. Topics include Amazon Web Services, Azure, Office 365, Salesforce, IBM, DevOps, and more. Check out the great list of speakers and sessions (http://atlanta.cloudsaturday.com/sessions/) and be sure to register soon (https://www.eventbrite.com/e/cloud-saturday-atlanta-2015-registration-18034390347).

I hope to see you there!