Empowering Businesswith
Hybrid Code/No-Code SolutionsBob GermanSharePoint Practice DirectorBlueMetal Architects
@Bob1German
About the Speaker
Bob GermanSharePoint Practice Director and Principal Architect at BlueMetal Architects
Developer and architect on the SharePoint platform since it was called “Site Server 3.0”
Co-author of SharePoint 2010 Development with Silverlight for Addison-Wesley
http://blogs.msdn.com/BobGerman
BlueMetal Architects We are experts at building solutions that exactly meet
the needs of our customers by apply the right people, processes and platforms.
Our focus is on modernizing applications through expertise in Creative, Social, Development and Data.
We have offices in Boston, New York, and Chicago.
@Bob1German
SharePoint People
Business Users
Business Technical
Power Users / Analysts
Business Technical
Developers
Business Technical
@Bob1German
Empowering the Power Users
How can we develop SharePoint solutions which empower business users to:
Maintain and update the solution Change the solution to accommodate new business needs Innovate
Des
ign
for E
mpo
wer
men
t
@Bob1German
Degrees of Freedom
Robo
ts P
ast a
nd P
rese
nt
@Bob1German
Agenda
Forms WorkflowWeb Parts
How can we add degrees of freedomto these solutions?
@Bob1German
A Question of Agility
Business Agility Business processes Products and services Scale Markets
Organizational Agility Can other orgs use something similar? How would a reorg affect the solution?
Technical Agility How will this work in the next version of SharePoint? How will this work in the next generation of client technology?
Low-hanging Fruit Sometimes it’s just as easy to build something flexible…
@Bob1German
Web Parts
Web Parts empower business users to build their own pages and mash-ups but…
Sometimes there isn’t a web part to do something For more degrees of freedom:
Find ways to make the web part general Allow for flexible editing Build a connectable web part that can be configured in a flexible way
Approach 2007 2010 2013 Beyond
Configurable Web Part
Yes Yes Yes Almost Certainly
Connected Web Part
Yes Yes Yes Probably
@Bob1German
Client wanted a web part that shows users the weatherforecast for their location based on user profile
Client liked Accuweather widget but it isn’t integratedwith SharePoint
Wanted the user’s zip code to drive the display
Scenario 1 – Weather Web Partdemo
@Bob1German
Client wanted a user directory web part to put on adepartmental web page
Scenario 2 – User Directorydemo
@Bob1German
Client wanted a collaborative “dashboard” showingall aspects of a property undermanagement
Scenario 3 – Collaborative Dashboarddemo
@Bob1German
Best Practices
1. Allow editing of HTML and other visual settings2. Think of similar / related use cases3. For complex configurations, consider using the web
part itself as an editing surface4. Consider breaking up special-purpose web parts
into connected general-purpose web parts5. Consider developing on the client side!
It’s the wave of the future – one of the primary methods for building SharePoint 2013 apps
It can lead to very responsive user experiencesWeb
Par
ts
@Bob1German
InfoPath Form
InfoPath forms empower business users to create and manage the forms but…
Sometimes you hit a brick wall when InfoPath can’t do something
For more degrees of freedom: Create a sandboxed InfoPath solution – users can still edit and update the form Create a web service that InfoPath can call
Approach 2007 2010 2013 Beyond
Sandboxed InfoPath Solution
No Yes Yes Maybe
Admin Approved InfoPath Solution
Yes Yes Yes Maybe
Custom Web Service
Yes Yes Yes Probably
@Bob1German
Scenario 1 – Look up Group Members
Complex approval process Approvers are selected from
Active Directory groups in the form InfoPath does not have a way
to enumerate an AD group
SOLUTION: Custom Web Service Set up as a secondary data source in InfoPath Configure using InfoPath Rules Form can still be edited by power users; web service is reusable in other forms
@Bob1German
Scenario 2 – Repeating Field
Repeating field in InfoPath – need to use it in a workflow
OOB options are – first, last, comma-separated We needed maximum function
SOLUTION: Sandboxed Form Code Could have used a custom workflow action to extract, but wanted to
adapt the form as well Users can still edit other form detail; no need for admin to install in
Central Admin
@Bob1German
Scenario 3 – Wildcard Lookup
Form for use in a marketing request Needed to allow users to select documents based on
awildcard, such as M*.pptx
No support from IT – deploying a web service not possible
SOLUTION: Sandboxed Form Code Uses SharePoint object model to query the document library Business users can edit and install the solution
@Bob1German
FormsSandboxed InfoPath Form
demo@Bob1German
Decision Matrix
Desired Characteristic Sandboxed Code
Web Service Farm Code
Business User Installable
Business Users can Edit the Form
Reusable in multiple forms
Can access data beyond site collection
Most likely to be reusable beyond SharePoint 2013
Exte
ndin
g In
foPa
th
@Bob1German
Workflows
Business users can edit workflows as needs change over time, but…
Sometimes you hit a brick wall when the built-in or SharePoint Designer workflows don’t do something
For more degrees of freedom: Create a custom action for SharePoint Designer Create an event receiver that acts on an “Approval”
Approach 2007 2010 2013 BeyondCustom Workflow Action (Sandboxed)
No Yes Yes Maybe
Custom Workflow Action (Farm)
Yes Yes Yes Maybe
Approval Event Handler
Yes Yes Yes Probably
@Bob1German
Scenario 1 – Custom Form Processing
Workflow needs to strip attachments out of a form
SOLUTION: Custom Workflow Action – Sandboxed Solution Reusable anywhere All other logic can be handled in SharePoint Designer
@Bob1German
Scenario 2 – Update LOB System
Workflow needs to update a line of business system following an approval
Authorized users should be able to reconfigure the approval process
Unauthorized users should not be able to bypass the approval
SOLUTION: Event Handler as a Farm Solution Use OOB Approval form – site collection admins can reconfigure easily Event handler checks to ensure it’s running on the correct form and
library
@Bob1German
Scenario 3 – Site Provisioning
Users fill in a form and to get a SharePoint site Uses specific site templates based on user input Custom approval logic for deciding if the site should
be created
SOLUTION: Custom Workflow Action – Sandboxed Solution Whole workflow, approval, template selection set up in SharePoint
Designer Flexible action creates the site
@Bob1German
WorkflowsSandboxed Workflow Steps
demo@Bob1German
Best Practices
1. In general, custom actions for SharePoint Designer (or a 3rd party workflow) is most flexible
2. To allow use of OOB Approval workflow without SharePoint Designer, add an event handler that checks for item approved
3. For farm-level solutions, deploy to the bin in selected web apps (to avoid use elsewhere on the farm)
4. Build business rule checks into sensitive workflow actions
5. Return error flag and message to allow the workflow to handle exceptionsEx
tend
ing
Wor
kflow
s
@Bob1German
Summary
Always consider degrees of freedom beforestarting a development project- What parts of the business process are likely to change?- What skills to users have?- What permissions do users have?
Choose your technologies wisely- To future-proof your solution, pretend you’re running in Office
365- Sandboxed solutions will probably go away- Farm solutions might or might not be restricted in the future
Business Power Users are the SharePoint Heroes!
@Bob1German
Resources
Remember – bit.ly links are case sensitive!Connecting Web Parts (end user) http://bit.ly/SPT-ConnectWP-UserConnectable Web Parts (developer) http://bit.ly/SPT-ConnectWP-Dev Client Side Connection Sample http://bit.ly/SPT-Book (Chapter 7)Sample InfoPath Solutions with Sandboxed Code
http://bit.ly/SPT-InfoPathSamples
Debug InfoPath Forms with Sandboxed Code
http://bit.ly/SPT-InfoPathDebug
Create custom workflow actions (sandboxed)
http://bit.ly/SPT-WorkflowSandboxed
Create custom workflow actions (farm)
http://bit.ly/SPT-WorkflowFarm
@Bob1German
Thank You!
@Bob1German