nsc 2013 06-17 - random rants on 2013
DESCRIPTION
Highs, lows & random rants on SharePoint 2013 - Experiences from implementing a governance and quality management in SharePoint 2013. Presented at Norwegian SharePoint Community June 17th, 2013.TRANSCRIPT
Highs, lows & random rants on SharePoint 2013
IMPLEMENTING A GOVERNANCE AND QUALITY MANAGEMENT IN SHAREPOINT 2013
NORWEGIAN SHAREPOINT COMMUNITY – 2013-06-17
Brought to you by
Mikael@MIKAELSVENSON
TECHMIKAEL.BLOGSPOT.COM
Harald@CMDRTCHORT
WWW.FIANBAKKEN.COM
Processes and DiagramsAKA THE IMPORT
File share, I loveth thee!• Data stored in external system
• Exported as static HTML files to remote server, along with Diagrams (images)• Exposing metadata as <META>
• Clickable <img> tags (image maps).
• Synced (RoboCopy) to server from static html files on a file share
• Imported to SharePoint and transformed • Custom import job
• Publishing pages
Publishing Page Library
Document Library
SPSite
GIMS Frontend
Pages GIMS Docs
Integration Architecture Legend
Timer Job
SharePoint 2013
Taxonomy(Managed Metadata)
QLM Generated HTML PagesQLM
Qualiware Importer Timer Job
Taxonomy(Managed Metadata)
DiagramLibrary
Flow, or pull as we call it
Scrape, scrape, baby• Processes and parses a set of files
• Generic processing and parsing• Reading <META> template
• Determines what SPContentType the type and constructs typed objects. • Specific parsing for certain objects
• E.g. Selecting a WorkflowDiagramProcessor
• Uses reflection
• Parses meta data values• Maps META headers to properties by convention
• Specific mapping
• Cleans HTML• Remove javascript
• Remove onclicks, table headers++
Object model cat walk
• POCO’s
• Puzzle Framework
• SharePointations• Annotations
• Auto-generate stuff
Workflows & Workflow Manager
AKA THE DONKEY
Where is it?Sites based on a blank template does not work out of the box – Won’t let you create 2013 based workflows.
Enable-SPFeature -Identity WorkflowServiceStore –Url $yourUrl
Why don’t you love me?At random times, workflows are getting cancelled
Details: System.ApplicationException: HTTP 401…
• User Profile Synchronization has to be started
• User Profile must exist for the user kicking of the workflow
You can’t handle the truth!Workflow is suspended
Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null
• Typically sending an e-mail fails as the user does not have e-mail address
• User is not synched to SiteUserInfoList with e-mail address
I don’t want to be approved!• You want custom task outcomes
• No matter what the user picks as a result, the default outcome is returned in the workflow, meaning option one - Approve.
You want an upgrade? – We’re all about SPD• Remember to hit Publish before exporting
• Add a comment at the top for versioning
• Each export gives a new solution id, so no real version upgrade
• Deactivate the old feature, activate the new feature
2013 Workflow’s – Yes, we do love you!• Overall, much better design experience compared to 2010
• It is v1, we know it will be killer in v3, just don’t tell the customer
• Nintex anyone?
Office Web AppsAKA THE COMPANION (WAC)
• Customer: We want CHARTS!
• Mikael: I’m NOT coding charts in ASP.NET!
• Mikael: How about the Excel Viewer Web Part?
• Customer: No, we only have Standard License.
• Mikael: CRAP!
• WAC: Hey, I can help
• Mikael: Of course! Because WAC in read-only mode is FREE, and http://<ServerName>/_vti_bin/ExcelRest.aspx works just fine for any SharePoint version (nothing needs to be enabled but WAC)
• Mikael: I’ll just whip up a custom web part for it!
Coming to a Codeplex site near you!
Click jacking anyone?• SharePoint 2013 by default prevents pages from being click-jacked/
iframed
• SharePoint 2013 by default does not encourage you to use different domains for parts of your solution• http://intranet.contoso.com
• http://collaboration.contoso.com
• http://my.contoso.com
• http://qms.contoso.com
• http://search.contoso.com
Who iframedRoger Rabbit?Search previews did!
<webpartpages:allowframing runat="server" />
SocialAKA THE FORGETFUL
Users want to bookmark• Feeds forgets when server runs out of memory – Veolocity Cache
hooray!• ..or when Velocity cache is reset
• Let’s follow the pages!
• Works just fine.. except…
• Our pages are on the format of E99829BB-70F3-4D72-980A-E06D01FC1C83.aspx
• Feeds does not store the Title, but the Name field!• JSOM to the rescue
• No default good grouping of what you have followed except sites/documents/people/tags
JSOM is da shiznit!• Rapid development and fun!
• At least three SP .js API’s who implement following• Official API (sp.userprofiles.js)
• Page/list wrapper (followingcommon.js)
• Search wrapper (searchUI.js)
• OOB SharePoint does not check follow status on item load
SearchAKA MR KNOW IT ALL
Users want to see the world...• A «360» view
• Automatically imported items (Processes)
• Documents• Managed metadata
• Improvements (Relates to a process)
• Filter on «common» domain specific terms• Business area or Region
The three leveled monster - Managed properties• Site level, Site Collection level, SSA level
• Auto-generated properties• Crawled
• Comes in «2»• E.g. ows_q_DATE_ReportedDate, ows_ReportedDate
• Managed• Always text!
• Don’t map to non-text columns
• Avoid auto-generation/mapping
• Script search setup• Neat cmdlets
• *-SPEnterpriseSearchMetadataCrawledProperty , *-SPEnterpriseSearchServiceApplication
Result sources• Limit search to specific content
• Subset
• Content types +
• Easy administration from GUI
• Query transforms
• Preview
Result types and display templates• Powerful feature
• Easy to get started
• Remember to press the button
Search result: Separatedifferent «artifacts»
Query rules and more• The fun begins…
• Many ways to reach the goal
• Many errors in search along the way..
• 1 query rule to «rule them all»• Promoted result blocks for each rs
• No good
• Global result source• Distinct query rules
• One promoted block in each
Some quirks... • Refiner on ContentType
• Application/xhtml [some newlines] MyContentType• Not user friendly
• Use the builtin magic Managed property• SPContentType
• Displaying a «User» field • Shows the Claims identifier
• |Harald Fianbakken|8238229110120ACCE19192911;i0#;fianbakken\harald.fianbakken|[email protected]|
• Fix by Javascript
• Check mapping order • ows_Created_0x0020_by, Internal:105, Internal:3
…and we have more quirks…• Managed properties not fetched
• Even when specified
• SPContentType is not returned in display template• !retrievable
• Query rules not triggered• But triggered when using the «preview».
• Result sources throwing exception, when used• But working in preview
Lessons learnt... • Avoid «complex» query rules
• 1 query rule per «result type»
• Create search schema on SSA• If possible
• RAM• Strange behaviors
• Crashes/query processing
• When in doubt; Reboot
Managed metadataAKA THE ORACLE
More than just tagging documents..Term based navigation
Custom properties on terms
Endless possibilities• Requirement:
• «Our users need different forms for the Business area when submitting an item. The BA’s have different fields required (and option) for when submitting an item, and different requirements when editing the item».
• Solution:• Use term store
• Add some custom coding
• Custom coding • Dynamic populated dropdown lists and checkbox lists for the same SPField
• Add configurable options (properties) for each field• Allowing a site collection admin (or term storeadmin) to customize the form
• Enforce «required» or hide fields in the different display modes.
• Automatically fill out values in form based on choices• E.g. Selecting a «Improvement area» from a dropdown, sets another field by looking up the selected
value custom property
• Possible to port parts of code to delegate control.
Example – Dynamic term driven form
Annie - The orphaned site-collection group• Removing a site collection yields a orphaned group
• Not visible from GUI
• Interfers
• Accessable through Powershell• Remove the old termstore
HTML, CSS, BOOTSTRAP, Script
AKA MR PERFECT
Get the right markup, get the markup right• Twitter Bootstrap for SharePoint -
http://bootstrapsharepoint.codeplex.com/
• Designers want to do HTML5/CSS3
• Customers want IE8
• Do NOT under-estimate the time needed to make your design fit in IE8 with SharePoint overrides.
Mega menu script– out with the oldSP.SOD.executeFunc('sp.core.js', 'SP.UI.AspMenu', function() { // Mega Menu // Kill off SP's default menu hover script SP.UI.AspMenu.prototype.showSubMenu = function () { };});
Mega menu CSS$(".pageNav").affix({ offset: { top: "270px" } });
$(".pageNav ul li").click(function () { $(".pageNav li.active").removeClass("active"); $(this).addClass("active"); });
$(".root li.static.dynamic-children").hover(function () { var browserWidth = $("#s4-bodyContainer").width(); var menuoffset = parseInt((browserWidth - 1200) / 2); browserWidth -= menuoffset * 2; $(this).find('>a').addClass('hover'); $(this).find('>ul.dynamic').css({ zindex: "200", width: browserWidth + "px", paddingRight: menuoffset + "px", paddingLeft: menuoffset + "px", left: "-" + menuoffset + "px" }).show();
}, function () { $(this).find('>ul.dynamic').css("zindex", "100").hide(); $(this).find('>a').removeClass('hover'); });
$(".root.ms-core-listMenu-root .static ul.dynamic li.dynamic ul.dynamic li.dynamic-children").hover(function () { $(this).find(">ul.dynamic").show(); }, function () { $(this).find(">ul.dynamic").hide(); });
Wrap-up• Import data from file share to publishing pages
• Workflows 2013 style
• Office Web Apps (WAC) for charts
• Social following
• Search
• Managed meta data
• UI customizations
Resources• http://www.fianbakken.com/
• http://nuget.org/packages/Fianbakken.SharePointations/
• http://techmikael.blogspot.com/
• http://anujabhojani.blogspot.in/
Questions?