Category Archives: InstantQuick

SharePoint Online App Infrastructure Outage – Not Yet Resolved

Update (Sept 15, 9:02 AM ET): The issue is still on going and intermittent with lots of mentions on various social networks. The problem described on the Office 365 service status page still doesn’t mention the general issues with provider hosted apps but only focuses on workflows which it claims are in recovery. In related news, Azure appears to be having widespread outages today as well.

Update (Sept 14, 5:02 PM ET): The issue appears to be resolved at this time. If you are still having trouble, please leave a comment.

Update (Sept 14, 12:36 PM ET): A few others have reached out to me on twitter reporting similar problems with their apps and tenants. In another environment we’ve seen JavaScript CSOM fail for a site collection administrator performing basic operations with access denied and similar operations fail in SharePoint Designer with 403 Permission Denied. Whatever is causing this seems to be a systemic issue in the SharePoint Online auth layer. Additionally, the Office 365 Service Status Page now says:

SP77334 - SharePoint Features - Service degradation

Service degradation - Sep 14, 2016 11:23 AM

Current Status: We're investigating system logs to determine the source of the issue.

User Impact: Users may be unable to execute SharePoint 2013 workflows. Additionally, users may be unable to view SharePoint 2010 workflows.

Scope of Impact: A few customers have reported this issue, and our analysis indicates that this issue may potentially affect any of your users attempting to execute or view SharePoint workflows.

Start Time: Monday, September 12, 2016, at 12:56 PM UTC

Next Update by: Wednesday, September 14, 2016, at 5:30 PM UTC

I’ll bet you a dollar that what they see in the system logs indicates some sort of auth failure! 😉 Today might be a good day to do work that doesn’t require SharePoint Online. Original: There seems to be a major problem with SharePoint Online today that we first observed yesterday evening. I’m seeing it here and a few customers have reported it already although the Office 365 service status dashboard currently shows no issues at the time of this writing. When you try launch Instant Consulting Practice or Instant Legal Practice you may see the following error. Note that this is our error screen, other apps will behave differently, but all apps on our tenants are currently affected.
Basically, what that means is that SharePoint is sending an empty request when you try to launch the app instead of including the values an app needs to connect to SharePoint. If you are affected by this, please open a support ticket with Microsoft. –Doug Ware

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

 

 

IQParts Design – Isolating AngularJS and Bootstrap

In the previous post I introduced AngularJS 1.4 and Bootstrap 3.3 Web Parts. You can get it using the Free SharePoint Add-Ins page in IQApp Central. This post is about how it all works.

Web Parts and Isolation

My goal was to make the solution as ideal as possible based on the 8 Characteristics of an Ideal SharePoint Customization. To state that a bit more succinctly, the customizations should be isolated but make good use of SharePoint without requiring custom master pages or ASP.Net page customizations. To meet this goals first requires a good container. Users need to be able to add the parts to pages and configure them in the browser. It makes sense therefore to start with one of the stock Web Parts. There are three possible candidates: the Page Viewer Web Part (PVWP), the Content Editor Web Part (CEWP), and the Script Editor Web part. The samples have examples using the PVWP and CEWP.

In either case we want to contain the custom functionality inside an iframe element for each part. The main difference between the two parts is that the CEWP requires an extra piece. The PVWP is therefore a bit easier. In terms of end user experience we weren’t able to tell a difference, but we included both part containers because theoretically the CEWP version is more flexible – you can customize the extra HTML file and the iframe.

Seriously? An iframe?

In the context of SharePoint 2013 the humble iframe has gotten a bad reputation because it is the basis of the App Part. The problem is that the App Part design requires the contents of the iframe to be in a different domain. This is done to prevent cross-site exploits and it works because by default a frame from an origin other than the parent page’s domain is isolated and can’t read the parent page or even the parent page’s URL. Many of the frustrations developers have with the app model stem from this. It makes everything far more complicated.

In this case we are using an iframe simply to load a page from the same site where the pages which contain the Web Parts are loaded. Because the parent Wiki or Web Part page is served from the same domain as the part container, the part can work with the parent window to resize itself, detect that the page is in edit mode, and read the parent’s URL and query string. It can also, if necessary, communicate with other IQParts on the same page. At the same time the frame gives us isolation so that Bootstrap and AngularJS can’t break anything outside the iframe.

SPABody.aspx

The iframe loads a file named SPABody.aspx which is the actual container for the app’s functionality. It loads the SharePoint object model, AngularJS, Bootstrap, and Angular-UI. Other dependencies are injected at runtime based on each app’s specific configuration.

Of special interest is this line:

<div
ng-include=”RootTemplate + ‘?m=’ + Modified”></div>

It uses Angular’s ng-include directive to load a partial html template based on the value of RootTemplate which is set during initialization.

Configurations.js and IQPart.js

SPABody.aspx directly contains two custom script files. The first, configurations.js, is generated on the fly when users configure the parts on a page. Configurations.js is an optimization to prevent the need to round trip to the SharePoint server for configuration data – more on this later. The second script, iqpart.js, implements the rest if the wrapper’s functionality.

IQPart.js is fairly long and so I am not including its source here. You can get it by installing the sample.

How the AngularJS Apps Work

Everything starts when a user adds the container Web Part to a page.

The Web Part points to SPABody.aspx which loads iqpart.js.

When iqpart.js loads, it looks for a configuration for the part. If it doesn’t find one it sets RootTemplate to default.html which is a partial located in the same folder as SPABody.aspx. If the page is in design mode, the part looks like this…

Otherwise it looks like this…

The selection dropdown displays all of the available apps. These are loaded by iterating the folders in /IQAppCore/SPAs.

If you select Create new AngularJS app… the part presents a form allowing you to name the app and give it a description.

Once you select Create New App, iqpart.js creates a new folder, in this case /IQPart/SPAs/My New Demo App, and copies the starter template files into the new folder. The default files are:

  • App.html – The RootTemplate of the new app
  • App.js – The AngularJS module and controller for the new app
  • App.css – The app’s custom styles
  • Config.html – The app’s configuration page
  • defaultConfig.js – The app’s default settings

The generated file looks like this:

//This is the default configuration for this app part
var p = window.iqPart; if (!!p && !!p.SetNewConfiguration) { 
    p.SetNewConfiguration( 
        {        
            //Add your custom properties here
            "SelectedDemo": "timer", 
            //Or overide defaults
            "Name": "My New Demo App", 
            "Description": "A nice description",
            "RootTemplate": "app.html",
            "Scripts": [ 
                "app.js" 
            ],
            "Styles": [
                "app.css"
            ],
            "Modules": [
                "iqAppPartModule"
            ]
        });
}

Based on the configuration, iqpart.js will load additional scripts and styles, and you can override the default module name. If you have installed the sample, compare the defaultConfig.js files for the six included samples.

The default Config.html looks like this…

You can add your own configuration values by altering this form. In this case the only setting is the demo mode and it is set to display a greeting. The other option is to display a timer. The html template is app.html and the script is app.js.

The greeting demo illustrates the use of SharePoint JSOM and makes use of a service wrapper that makes it easy to use JSOM with AngularJS.

Getting Started with AngularJS Samples

Three of the included samples come from the homepage of http://angularjs.org. They are Getting Started, Add Some Control, and Create Components. Each has a video!

Join us on Slack

Want to talk about this sample and the rest of the IQApp Central awesomeness? If you register, we will invite you to join us on our Slack network.

–Doug Ware

8 Characteristics of an Ideal SharePoint Customization

I’ve been working with SharePoint for the last eight years. In that time I’ve built many SharePoint solutions using nearly every available approach. Eight years is a long time. It’s long enough to give, hear, and read a ton of ‘best practices’ advice. It’s long enough to learn from the lifetime of too many design choices to count.

This post is my attempt to enumerate the qualities of an ideal SharePoint customization based on what I’ve learned. Keep in mind that these are ideals and the real world involves trade-offs. What do you think?

  1. It meets the needs of the people who use it without limitations imposed by the platform
  2. It doesn’t interfere with the operation of the underlying platform
  3. It uses SharePoint functionality as much as possible
  4. It depends on things other than SharePoint as little as possible
  5. It cedes runtime control to SharePoint as little as possible
  6. The other things it depends on are provided only by using supported mechanisms other than directly editing SharePoint Master Page or ASP.NET files
  7. Runtime or configuration faults in a customization can only impact the customization
  8. It is manageable and governable

Ideal #1: It meets the needs of the people who use it without limitations imposed by the platform

This is the most important thing. Does it do what people need it to do? If someone asks if the system can be made to do something is the answer ‘yes, it will cost x‘ or ‘we can’t do that because…’? Is it available when they need it?

Sometimes what people need will be the underlying factor that drives decisions that result in successful but far from ideal customizations.

Ideal #2: It doesn’t interfere with the operation of the underlying platform

SharePoint is built to be a shared resource. It’s in the name. Customizations should be polite and let the shared services do their work unhindered by external customizations. Customizations that integrate directly with runtime processes have the potential to cause general denial of service conditions for an entire SharePoint property. Customizations that directly integrate with the platform might not cause issues in the present, but are later discovered to be significant obstacles to moving or upgrading a farm or site.

Ideal #3: It uses SharePoint functionality as much as possible

This may seem to go without saying, but often people recreate the wheel. Creating custom functions for out of the box features directly affects a system’s ROI by increasing the investment required and potentially its ongoing cost. SharePoint is a rich resource. Ideal customizations marshal the available resources to full effect.

Ideal #4: It depends on things other than SharePoint as little as possible

Sometimes people try to fit a square peg into a round hole. The more a customization requires things other than SharePoint the more likely a customization is a square peg. Of course it is often necessary in the real world to integrate with other systems and it is even more common to use third party components. Just the same, a customization that meets Ideal #1 by using nothing but out of the box functionality is, by definition, an ideal SharePoint customization.

Ideal #5: It cedes runtime control to SharePoint as little as possible

While an ideal customization makes deft use of SharePoint’s functionality it should do so in a way that works independently of SharePoint. For example a customization that fully controls an area of a page is better than one that consists of many hooks into SharePoint by depending on particulars of the HTML generated by SharePoint. The former can function as an atomic unit, the later can break any time the details of the page deviate from the original. It is better to provide an entire form than to hook into a button’s click event based on the ID of the element or a class name on the day the customizer did View Source on a page.

Ideal #6: The other things it depends on are provided via supported mechanisms other than directly editing SharePoint Master Pages or ASP.NET files

Meeting Ideal #1 may require you to directly edit SharePoint master pages or ASP.NET files. Doing so has a cost and it potentially requires ongoing maintenance. At times it might violate Ideal #2 if the customization lacks as of yet un-invented elements that later will come to be expected. As it stands, SharePoint provides a large number of supported integration options out of the box including Web Parts, custom actions, and a wide variety of API’s. Be aware that some supported mechanisms are counter to Ideal #5.

Ideal #7: Runtime or configuration faults in a customization can only impact the customization

This one is simple. If your app breaks for a user does it break SharePoint? Breaking SharePoint includes denial of service conditions at the server as well as client side problems that prevent pages from rendering or operating as intended. It is possible to meet Ideal #2 but not this ideal. For example, introducing a syntax error into JavaScript in the body of the default master page will not interfere in any way with the underlying platform but will still break a site.

Ideal #8: It is manageable and governable

Once created or deployed, an ideal customization is manageable and governable. It offers appropriate configuration surfaces and respects SharePoint’s policies, throttles, and security. It isn’t obscure, but rather easily discoverable. It is possible for it to be known and accounted for to the degree that is required. One example of a customization that is not ideal in this regard is a user custom action created by hand. At present out of the box there is no way other than interrogating the SharePoint object model via one of many APIs to determine a user custom action is present or modify the user custom actions associated with given object. Conversely, a customization that includes the same user custom action can be ideal if it includes the same custom action as long as the customization provides appropriate management features such as the ability to remove the action if the customization is removed or disabled.

Why is this important?

We have more options available for creating SharePoint customizations today than we’ve ever had before. We need a framework to help evaluate these approaches to make good design choices. Over time I will be writing about our designs here at InstantQuick. IQApp Central supports a number of different design approaches. I designed it to be respectful of people’s decisions by playing well with SharePoint. Still, there are some designs I encourage that I’d like to teach you about. When I say that something is better I’d like to do so in the context of concrete criteria. That way, when someone disagrees it is easier to engage in productive dialog!

–Doug Ware

A Tool that Answers the SharePoint Development and Provisioning Riddle

Solving the SharePoint App/Add-in Problem

Today I’m excited to be on the Office 365 Developer Podcast with Jeremy Thake to talk about the release of IQApp Central beta!

IQApp Central is the product of a multi-year effort to build a platform that makes creating, deploying, and managing SharePoint customizations easier. The goal is ambitious – to change the way people build SharePoint farm solutions, apps, and add-ins by offering better tools than they have ever along with a process that works the same on premises as it does in SharePoint Online. IQApp Central codifies everything I and others learned doing and teaching others about SharePoint for the last 8 years and what we at InstantQuick learned developing, maintaining, and operating our popular Instant Consulting Practice and Instant Legal Practice add-ins in the Office 365 Store.

Core to IQApp Central is the IQApp Editor, a set of tools that let you use SharePoint to create reusable solutions and components that are easy to deploy and track. IQApp Editor is backed up by an advanced provisioning platform that provides visibility into what packages are in use, where they are used, and how they are licensed.

Think I must be exaggerating? You can try IQApp Central for free, or watch the getting started videos. There are 6 and it takes less than 45 minutes to watch them all.

I Love My Surface 3 Pro

I’ve had a couple reminders recently that I’ve been neglecting the blog. The first was when I got an email asking if we are still in business and the second was when it took me 30 minutes to remember the username and password to edit some broken links I discovered in one of my older articles. Sorry about that, all the time has been going to make Instant Practice Manager better. We’ve got some great new features coming soon!

Today the family and I are packed into the van heading to see family for a long weekend. My wife Kim is driving and I am taking the chance to try my new Surface 3 Pro out from the road and do a little (way overdue) blogging.

Last year I did a similar exercise with my very large and heavy Lenovo W520. On that trip I used a laptop desk. The black thing under the keyboard in the photo above is a sleeve. It isn’t rigid, I just didn’t want to put it on the floor. So, I really am using it as a laptop and I find it to be perfectly comfortable.

This is my third day with the device. I was convinced to take the leap after reading this post by Corey Roth. It’s a great post and I won’t recycle it here, but I will add a few things.

Annoyances

Let me start by saying this is a great device. I’ve spent a couple of long working sessions writing code and I’ve gone to a couple meetings where I used OneNote and the stylus. I love this thing and I wholeheartedly recommend it. I don’t change hardware very often and I did a good bit of shopping and tire kicking before I made a purchase. Compared to the alternatives this device is a solid value. It isn’t cheap, but neither is it extravagant.

All that said, my first couple of days haven’t been completely issue free. The first challenge I had was when I used the traditional Remote Desktop app to connect to my W520 which runs Windows 7. For RDP into Windows 7 and 2008 there is no scaling and so I was presented with a 2160×1440 desktop on a the Surface Pro’s 12 inch screen. To my middle aged eyes it was completely unreadable. The new Windows 8 RDP app wasn’t any better and I thought, ‘this is a really nice device that I am taking back to the store.’ Fortunately my third try, Remote Desktop Connection Manager, http://www.microsoft.com/en-us/download/details.aspx?id=21101, works just fine and I still own the device.

The second issue was that the device would not reliably wake from sleep mode. If you da a search you will find that this is an issue that has plagued Surface users since v1 and that Microsoft has done a really poor job communicating with users. There is a full 26 page thread on the MSDN forums lasting over a year with some very disillusioned folks and not a Microsoftie to be found. Fortunately there is Twitter and Marc D Anderson let me know there is a firmware update. For some reason it didn’t show up in Windows Update for me and I had to download and install it manually. So far, so good and my sleep mode issues are solved.

Astonishment

The thing that impressed me most was how well the whole MS ecosystem is coming together and how well the integration works. I signed into the device the first time using my Microsoft account and was shocked at how well it pulled in everything with almost no effort on my part. It took me less than an hour to get Visual Studio and Office 2013 up and running and I didn’t have to blow a day setting up my environment. This is my first new machine since I really made the move to OneDrive and Office 365 and I just hadn’t noticed how seamless the integration really is.

I give the Surface Pro 3 two snaps and a circle.

One Month since Release – Observations, Lessons Learned, and Future Plans

The Numbers

The apps have now been available in the marketplace for a month. According to the seller dashboard there have been 139 downloads!

We’re pretty happy about that. Thus far the weekly rate is consistent for purely organic marketplace traffic with no marketing. I don’t plan to keep boring you with these numbers, but I’ll let you know when we reach milestones such as 1000 downloads.

The stats we are most concerned with at this point relate to usage after the install. Downloads that don’t result in usage usually mean that we failed in some way.

We hope to improve on these numbers as time goes on, but clearly people are giving the apps a chance and a significant percentage actually use them!

Observations

#1 The marketplace is too obscure

I did a few meetings this month for savvy technology people and a couple for normal folks where I talked them through the installation of an app. Two of these people were SharePoint experts who use Office 365 on a regular basis. None of them had ever added an app from the store and all of them needed more instruction than ‘go to the store and add Instant Consulting Practice’. This was why I wrote the post ‘How to Install and Uninstall Apps from the SharePoint Store on Office 365‘; people, including some experts, really don’t know this basic information.

#2 Most of the apps in the marketplace are seldom downloaded

The SharePoint Store opened August 6, 2012. To date there are 240 apps in the marketplace and if you sort all apps by newest as of this writing Instant Consulting Practice and Instant Legal Practice are the 15th and 18th newest apps, respectively. If you then sort the apps by most downloaded, Instant Consulting Practice and Instant Legal Practice are the 128th and 185th most downloaded. So, in a little over 7.5% of the marketplace’s total existence the main app is almost in the top 50% most downloaded. It will be interesting to see the rate at which we climb the charts as time goes on, but…

That means that 47% of the apps in the SharePoint marketplace have less than 107 downloads and 33% have less than 32 downloads!

I will let you make your own opinions as to the reasons for this, but Microsoft has some serious work to do and they can’t be happy with where things stand presently.

#3 The marketplace is viable for businesses based on quality solutions

I have spoken to real businesses each week since the release and downloads are converting into actual customers buying services. I am increasingly comfortable that this business will be self-sustaining and sooner than I expected. In fact I have had to turn away opportunities we are not yet prepared to capitalize at this point in the process of building the business.

Lessons Learned

#1 Ask for the permissions you think you will need upfront, not just the ones you currently require

I talked about this in the previous post. The next update will include both instructions for people who have not updated their app as well as the fixes that take advantage of the app only identity to handle scenarios that are breaking for users with only contribute permissions.

#2 Be prepared to answer questions about the future

The current versions are free, but of course we have a plan to make money. This plan is based on a side-install of a host web version for a fee, an app web version that uses the soon to be available recurring fees in the marketplace, add-ons such as QuickBooks integration, and services. However, I had not settled on details like availability dates and exact prices. However, every single prospect that has contacted us asks these questions near the beginning of the conversation. ‘Uhhhhm… we are still working that out,’ is not a good answer.

#3 Permissions will be the source of most errors, check them when the app launches

Honestly, I’m a bit embarrassed that the first version didn’t do this because I know from all the farm solutions I’ve built that unexpected permissions are a very common source of errors. The reason for this fault is that we decided to allow a free multiuser version at the very last minute. Otherwise the user would have enough permission to do everything if they were able to install it.

Future Plans

#1 Preflight check on app launch

We will soon push an update that checks permissions when a user launches the app and, most importantly, shows a page that explains problem configurations and provides instructions on how to fix them.

#2 Tutorials and help

We are working on a complete set of tutorials to help people get up to speed quickly and leverage the full set of features. This is a key element of converting people who download the apps into customers.

#3 Standard version upgrade

This is a side installed version that deploys on a normal SharePoint site instead of an isolated app web. This adds a host of features including SkyDrive Pro, Outlook integration, and mail-merge. It will cost money and it will be required to install add-ons such as the QuickBooks integration. We will release more information about this in the coming weeks.

#4 QuickBooks integration

We’ve always planned for this which is good because everyone asks about it.

#5 Email management

This is further down the road, but we recognize that this is required by most legal practices.

InstantQuick Technical and Office 365 App Marketplace Week 2 Diary

I’m a couple days late getting this post up, but the analytics in this post cover the same range of days as last week’s entry.

App Updates

This past week we pushed two sets of updates for Instant Legal Practice and Instant Consulting Practice.

The Updates

The first on the 17th fixed a number of issues and made some improvements in the time billing system. I use the apps to run my consulting business and based on a few things I noticed creating invoices for the first half of the month there are some more tweeks to come. These fixes were delivered by our application services.

The second set of updates changed the app packages to request additional permissions, the first was Read on the site collection. This was required to fix an issue that prevented the creation of content types in app webs installed in subsites. It turns out that this is necessary because the parent content types are part of the site collection’s root web. I will write about the provisioning of content types in an upcoming post.

The other update added a request for app only permissions that will allow impersonation when persisting settings to fix an error when users who are a not site owners attempt to update settings or generate invoices.

The changes for additional permissions required a resubmission via the seller dashboard. We submitted both apps on Friday 9/13 and received approval on Monday for one app and on Tuesday for the other. We watched and the new versions appeared in the marketplace late on Tuesday, but it wasn’t until Thursday that the apps prompted us on our test site that an update was available.

New users will get the new version but old users will not receive the update until they accept the update via the link shown in the screenshot above. How long will it be until we can implement the change affecting users with member access? We will need to implement additional code on our end to check a user’s version and prompt them to apply the update! Even then they could ignore the update so we will need code to accommodate that situation as well.

Lessons Learned

The primary takeaway is that you should always ask for the highest permission set you think your app will ever need. Getting an update to all of your users later on will be complicated and time intensive. The amount of time required for any update and the fact that such updates to the app package are always optional requiring user consent is another reason we do not like SharePoint hosted apps in the marketplace and prefer our hybrid model or pure provider hosted apps.

Stats, Analysis, and Disappointment in Google

Downloads per day were similar in weeks one and two. We still have not begun any advertising or promotion and we figure it is still too early to expect much word-of-mouth. Therefore this is organic traffic coming from views in the Office 365 marketplace. If the trend continued with no advertising or promotion we would have 1000 installs in a little under six months.

Of course not everyone who installs one of the apps uses it after checking it out. The usage pattern from the first two weeks breaks down as follows:

A little over half never used the app after the first download, but as I wrote last week, half of these people hit a bug that prevented the installation from completing. Over half of the people who managed to complete the install came back another day and there are now real people using the apps to run their small practices!

Trouble with Google Analytics

The InstantQuick site is new and has migrated content from the now retired Elumenotion.com site. I was very concerned when I decided to make the change that Google and Bing would punish the move and we’d lose traffic from search. We use Google analytics on this site as we did on the old site, but this site uses the newest tracking script where the old site used the script from 2007 when that site launched. Looking at the analytics data it appears that the drop in traffic was much worse than expected, but it turns out that there is good evidence that the numbers Google is providing aren’t anything close to accurate!

Earlier this week I wrote a technical post titled Design Tips for SharePoint 2013 Apps on Tablets and Subnotebooks. This site uses Feedburner to syndicate content via RSS and the RSS feed is in turn used by a few content aggregators. Among them is a site I recommend, Planet SharePoint. According to this single aggregator 143 people followed their link to my content in the first day it was available.

Feedburner’s statistics have been unreliable for a long time and they have become even less reliable lately oscillating wildly from day to day so I don’t put much stock in their reporting. But their stats say there were 48 clicks on that article in the feed and that only 10 of them were from Planet SharePoint.

Google Analytics tells me that the page was viewed 13 times.

I’ve done a few other things to confirm this using other pages, but it looks like my Google Analytics numbers are off by over a factor of 10!

Although I am much more interested in the usage patterns of the apps I will need to get to the bottom of this Google problem soon or find a new way to measure traffic on this site!

Design Tips for SharePoint 2013 Apps on Tablets and Subnotebooks

If you’ve ever thought about doing a startup you are probably familiar with the idea of the minimal viable product. For Instant Legal Practice and Instant Consulting Practice we decided that this meant focusing on a great experience within Office 365 and Microsoft Office and on some sophisticated backend designs that make it possible for us to be nimble and continuously improve the products. What we want to know is if there is a viable business in Office 365 apps and if our ability to continuously update the products will give us a strong competitive advantage.

Knowing our goals we decided early on that we were not going to invest heavily in different form factors beyond the desktop but that it would be good if we could make the products usable on tablets. Both products are tested and work on IPad 2 (and later), Nexus 7, Galaxy Tab, and Windows Surface. On the IPad they work in Safari. On the Android tablets they work in Firefox and Dolphin, but surprisingly not Chrome for Android which is a shockingly bad browser.

Tip 1: Responsive Design

If you are working on a publishing site or you intend to make big changes to the look and feel, a responsive design is your best bet. Here are a couple of links to get you started: Pro SharePoint 2013 Branding and Responsive Web Development and http://responsivesharepoint.codeplex.com/.

This was not a viable option for us because we don’t use a custom master page as a principle for compatibility with other apps and because our apps depend on list views and the ribbon for much of the user interface. It is probably something that could be made to work for us, but I think it would be a major effort and it is pretty far down the roadmap.

Tip 2: Keep required width to a minimum

This one is pretty obvious. On these devices the base resolutions vary in landscape mode, but most are 980 pixels wide. There are meta tags, CSS, and JavaScript techniques that allow some control over the viewport and zoom behaviors, but as I said we want to keep our initial investment to a minimum and so we focused on making sure the columns in our tabular layouts look good in no matter the width of the browser.

Tip 3: Use CSS effectively

The detail pages for different entities like clients and matters consist of a table at the top and often a set of tabs at the bottom that show related data.

The number of columns in the header varies by entity and also based on the data. In the case of the Clients view the Phone Numbers, Address, and Notes columns are hidden if there is no data.

The tables present challenges because the browser width varies and the width required to display specific data inside the tables also varies. However, using the base of 980 pixels wide gives us a lower bound and we set the min-width of the main content area to 900px and the width of the table to 97%. Finally, in the subordinate elements the vertical alignment is top, there is explicit padding, and the word-break is normal. All, in all, pretty basic stuff.

Tip 4: Leverage the ‘Focus on Content’ Button

The Focus on Content button is located in the upper-right hand corner of the page.

By default, when you click it, it hides all of the chrome including the menus and focuses on the content.

Not focused on content

Focused on content

This could be a great feature, but it was apparently designed by the same folks who figured app webs don’t need menus! It would be better if you didn’t have to continuously touch the button to navigate between pages.

The other day I wrote about Custom Navigation in App Webs. In that post I showed how we use JavaScript to supply menus in the apps. The same script has a monkey-patch to intercept the Focus on Content button and ensure that the primary navigation remains visible.

This is the normal view on an IPad2:

Not focused on content

It is usable if you scroll, but it works much better if you focus on content:

Focused on content

The script is fairly simple.
var oSetFullScreenMode; //Stores the original function in the SharePoint libraries

//If the function exists assign it to the variable for the original function
if (typeof (SetFullScreenMode) !== 'undefined') {
   oSetFullScreenMode = SetFullScreenMode;
}

//Replace the function with a new function
SetFullScreenMode = function (fEnableFullScreenMode) {
   //If the user is enabling full screen mode

   if (fEnableFullScreenMode) {
      //Add some margin to the top of the content area
      $('#contentBox').attr('style', 'margin-top: 20px;');

      //And put the menu into the content area as its first element
      $('#contentRow').prepend(nav);
   }
   else {
      //Otherwise remove the margin and the menu
      $('#contentBox').attr('style', 'margin-left: 220px;');
      $('#contentRow').find('#DeltaTopNavigation').remove();
   }
   //And then run the original function so SharePoint can take care of the rest
   if (oSetFullScreenMode !== undefined) {
      oSetFullScreenMode(fEnableFullScreenMode);
   }
};

//When the page loads, check to see if it is already in fullscreen mode based on the pressence of the ms-fullscreenmode
//if the page is not a dialog add the marging and insert the menu
var bodyElement = document.body;
if (bodyElement != null) {
   if ($(bodyElement).hasClass('ms-fullscreenmode') && !window.location.search.match("[?&]IsDlg=1")) {
      $('#contentBox').attr('style', 'margin-top: 20px;');
      $('#contentRow').prepend(nav);
   }
}

 

Tip 5: Don’t put options in the quick launch that aren’t available elsewhere

The presumption is that if you are using a tablet you will stay focused on content. On our billing pages, the Generate Invoices link is only on the quick launch and therefore obscured to tablet users. We will move it in an upcoming update.

Tip 6: Turn off Minimal Download Strategy

This is not a concern if you are in an app web, but in host web scenarios, this feature created the most compatibility issues in the browsers we tested. Fortunately it is easy to detect and disable minimal download strategy with CSOM.
clientContext.Load(clientContext.Web.Features);
clientContext.ExecuteQuery();
var mds = clientContext.Web.Features.GetById(new Guid("87294C72-F260-42f3-A41B-981A2FFCE37A"));
if (mds != null)
{
   clientContext.Web.Features.Remove(new Guid("87294C72-F260-42f3-A41B-981A2FFCE37A"), true);
        clientContext.ExecuteQuery();
}

Tip 7: Size dialogs dynamically on open

The above tips dealt with width, but you also need to worry about height if you are using the dialog framework. When you show the dialog set the options based on the page’s natural height.
var options = {
   url: lps.WebUrl + '/FormsAndDialogs/Matter/NewMatter.aspx',
   title: 'New Matter',
   allowMaximize: false,
   showClose: true,
   height: 576,
};
SP.UI.ModalDialog.showModalDialog(options);

Then resize it by calling the following function from the page contained in the dialog.
function resizeDialogWorkspace() {
   //If the dialog is taller than the window make it shorter than the window
   if (window.innerHeight < jQuery('#s4-workspace').height()) {
      jQuery('#s4-workspace').height(window.innerHeight - 6);
   }
}

This is what the dialog looks like on a Nexus 7.

InstantQuick Technical and Office 365 App Marketplace Week 1 Diary

Last week we submitted free versions of Instant Consulting Practice and Instant Legal Practice to the marketplace as a soft launch with no advertising other than this blog. For the next few weeks we will continue to give the basic apps away while we shake out the problems found by real users. This post is about what we learned technically and our experience with the marketplace.

Office 365 App Marketplace Stats

At the moment the listings are for English US which limits our target market a bit. The apps are new they aren’t on the first page of the store and so we had pretty low expectations for the first week. We were pleasantly surprised. According to the seller dashboard we had a total of 42 installations and 1341 browser hits and a review.

As expected, the Instant Consulting Practice had more downloads, but we were contacted by three organizations this week and two of them were small law firms. It seems our market research was valid and there are enough people looking at the store that we are getting views in spite of not being on the front page.

Usage Notes

Most of the functionality of these apps is implemented on our servers. Since we generally don’t know who are customers are and don’t store any personally identifiable information, it is important that we have some decent analytics to understand usage and identify problems.

Of the organizations that tried the app, 20% used it more than once and most of them have used the app they downloaded several times. We figure that we have around a dozen active users after one week.

Unfortunately, 20% of the organizations that tried to install the apps did something we didn’t test for and their installations failed! Most of those who experienced the error did not try again.

Technical Notes

There was an issue loading a javascript file and fixed the second day the apps were live. There was another issue that affected the viewing of individual invoices and we fixed it on day 5. We were able to push these fixes with little delay because of the way our systems are built.

Unfortunately, the big bug that affected the ~20% of installations that failed occurs when you attempt to install the app on a subsite instead of the root site of a site collection. Fixing this requires more permission than the original app packages have, but we identified the problem and implemented a fix. Because this affects the apps permissions we must repeat the app validation process with Microsoft to update the apps and prevent the problem from recurring in the future.

All in all, a great first week!