Date post: | 15-Jan-2015 |
Category: |
Technology |
Upload: | derek-gusoff |
View: | 275 times |
Download: | 4 times |
Local Touch – Global Reach
www.us.sogeti.com
Stretching the Box
Getting the most out of the SharePoint user interface - without custom code
by Derek Gusoffsenior consultant, Sogeti USA
2www.us.sogeti.com
Local Touch – Global Reach
Your presenter
Derek Gusoff
Senior Consultant, Sogeti USA
http://derekgusoff.wordpress.com
@dgusoff
3www.us.sogeti.com
Local Touch – Global Reach
How I came to write this talk
• SharePoint experience at large big-three automaker
• Huge SharePoint environment
• Custom Code not generally allowed on the farm
• Forced by circumstance to develop complex solutions in a no-code environment
• Discovered the hard way what is and isn’t possible
4www.us.sogeti.com
Local Touch – Global Reach
Expectation setting
• I am a developer at heart, and this talk was conceived with a developer audience in mind
• I will NOT show gobs of code – I’d like you to stay awake!
• High-level concepts and introduce technologies – implementation is up to you and your organization.
• If you’re interested in implementation details, come see me.
5www.us.sogeti.com
Local Touch – Global Reach
Meet Bob, the accidental SharePoint Developer
6www.us.sogeti.com
Local Touch – Global Reach
DEMO 1
Bob’s custom code solution
7www.us.sogeti.com
Local Touch – Global Reach
Problems with Bob’s solution
• Custom code destabilizes a farm
• Custom code causes challenges for upgrade/patch/migration efforts
• Custom code is time-consuming to develop
• Custom code gets really complex, really fast
• Custom code is almost never as functional as OOB components
• Solution upgrades are a hassle
8www.us.sogeti.com
Local Touch – Global Reach
When is custom code unavoidable?
• Timer Jobs or other farm-level components
• Complex or proprietary business logic
• Integration with External Systems
• State Machine workflows
• Interaction with Service Applications
• Managed Metadata
• Search
• Business Connectivity Services
9www.us.sogeti.com
Local Touch – Global Reach
SharePoint’s default user interface…
Is powerful…
• Can easily add/edit/delete/view list items and document metadata
• Supports all built-in data types
• Provides rich functionality
…yet lacks some key functionality
• No support for hierarchical data
• No context between entities
• Lookups
…but contains “hooks” which we can leverage to build customized interfaces
10www.us.sogeti.com
Local Touch – Global Reach
The value proposition
By leveraging standard SharePoint components (the stuff in the box) we can create solutions that enhance the user experience and implement the unique requirements of our organization.
The stuff in the box:
– SharePoint List Views
– XSLT List Views
– Standard SharePoint New/Edit/Display forms
– The Ribbon
– The Edit Control Block (ECB)
– JavaScript
11www.us.sogeti.com
Local Touch – Global Reach
A few words about JavaScript
In a SharePoint Farm context, “code” refers to Custom .NET assemblies deployed to the server.
From a SharePoint perspective, JavaScript is just a file in a document library.
The code executes in a browser, not on the server.
JavaScript is the future of the web, and of SharePoint.
12www.us.sogeti.com
Local Touch – Global Reach
The Key Players
• List View web parts
• Data View web parts
• Standard SharePoint Forms
• The Ribbon
• The Edit Control Block (ECB)
• XSLT
• Site Pages
• OOB Web Services
• JavaScript
• CSOM
• jQuery
• JSLink (2013 only)
13www.us.sogeti.com
Local Touch – Global Reach
Demo 2 – a simple master-detail scenario
Ingredients:
• Edit Control Block
• The Ribbon
• Parameterized XSLT List View Web Part
• A Custom Site Page
• JavaScript/jQuery
Demo 2.1: The OOB way
Demo 2.2: …with a little customization applied
14www.us.sogeti.com
Local Touch – Global Reach
A few words about packaging and deployment
• The Easy Way
• Implement solutions entirely in SharePoint Designer.
• Advantages: Can get a solution up and running very quickly
• Disadvantages: Not repeatable or maintainable
• The Right Way
• Build a solution package (sandbox or Farm)
• Advantages: Deployable to dev/test/production environments,
Repeatable and maintainable
Can leverage source control
• Disadvantages: Requires Visual Studio and a developer
15www.us.sogeti.com
Local Touch – Global Reach
Demo 3 – a more complex master-detail
Ingredients:
• OOB SharePoint Form
• Custom Site Page
• HTML
• JavaScript CSOM
16www.us.sogeti.com
Local Touch – Global Reach
Demo 4 – tips and tricks for SharePoint Forms
• Faking a calculated field on a new or edit form
• Show/Hide fields and render as read-only
17www.us.sogeti.com
Local Touch – Global Reach
Demo 5 – an Enhanced Lookup experience
The problem: Users need to perform filtering on lookup fields and show related fields other than title. Also, provide a type-ahead interface.
Implemented with 100% JavaScript
The idea is the hardest part
18www.us.sogeti.com
Local Touch – Global Reach
Demo 6 – showing workflow detail inline with the form
• Common complaint: I have to go to a different place to see workflow data.
• We can solve this with some creative DOM manipulation by screen scraping the workflow tasks page
19www.us.sogeti.com
Local Touch – Global Reach
Putting it all together: Demo 7
Document Dashboard
• View document metadata
• Download/View document
• View related defect data
• View append only comments inline
• View workflow history
• View version history
• …all in one view????
• NO CUSTOM CODE
20www.us.sogeti.com
Local Touch – Global Reach
Summary
Custom server-side code comes at a price in terms of administration, development, and user experience.
When developing solutions for SharePoint, custom code should be the LAST option, considered after all other possibilities have been exhausted.
SharePoint provides a wide array of options for building custom tailored solutions that don’t impact the farm.
Rule of thumb: If you can dream it (and you can access the data), then you can do it!
Local Touch – Global Reach
www.us.sogeti.com
Thank you