News scavenger a SharePoint and Apps Story
-
Upload
innotech -
Category
Technology
-
view
67 -
download
0
Transcript of News scavenger a SharePoint and Apps Story
A SHAREPOINT AND APPS STORY
CONTENTS
Section 1 - News Scavenger
The concepts
Section 2 - Advanced Powershell Scripting
Invoke-WebRequest
Section 3 – Windows Phone
8.0 – Authenticator
Store Fail
8.1 was it 9.0?
Windows Phone 8.1 and Desktop
Store Success
Section 4 – The cross platform story
Decision time
Language Usage
C# & XML vs HTML 5 & JS
SP Integration Mechanism
CSOM VS REST
Creation Platform
Native?
XAMARin?
Cordova?
VS Cordova?
Section 5 – Development Operations
Reporting Dashboard
Trivia Module
PRESENTATION SCOPE
• To show the journey from It Pro to IT Dev
• To outline the idea and concept of News Scavenger and where SharePoint fits in
• To show the roadmap and decision points that were taken during the process and
explain them in detail
• To show the process and turmoil of publishing live applications that work with
SharePoint on all the different platforms
• To discuss the outline for our cross platform story
• To introduce a meaningful usage scenario for VS Cordova with regards to
SharePoint integration with Android and IOS apps
• To SHOW HOW TO USE POWERSHELL FOR REAL TIME DEV OPS
• To show a new take on accessability
WHOAMI
• Heath Groves Mbcs. MCM (r12)/MCSM/12 year MCT etc.
• Father of 2 (Jericho and Eden)
• Focused primarily on SharePoint since 2006
• Worked all of that time as a Vendor/Contractor
• Worked as a Contractor for Microsoft From June 2011 Supporting D and
MT up until April 2015 (4 YEARS)
• MS Gold Partner since 2008
• Ex- Military (REME – Instrument Tech 8 Years)
• Full contact kickboXER
• Strong desire to move towards dev from being a total IT Pro
EVERYTHING WE ARE ABOUT TO
DEMONSTRATE AND DISCUSS DID NOT EXIST IN
SEPT 2014
THIS PRESENTATION, ALL DEMO CONTENT AND DEMO
SCRIPTS CAN BE ACCESSED HERE:
HTTP://WWW.NEWSSCAVENGER.COM/SITES/RESTTEST
NEWS SCAVENGER
• The apps we are discussing ARE in all THE app STORES RIGHT NOW
• To download and follow along go Your store and search News Scavenger
(Boxing, Rally and Microsoft)
• Alternatively visit https://www.newsscavenger.com
• click on the icon for your device
FROM ACORNS DO GROW…
A bit of general Discussion
Our future will consist of looking at
a pane of glass …
…certainly for this generation at least…
Understanding, and merging these experiences Will
be key to the future of the tech industry
This is why everyone is hitting the space
Hard, trying to conquer the cross platform story –
SharePoint is no different
And can have a unique place in this world
FROM ACORNS DO GROW…
Large Social Housing survey (40k people)
68% said they went online
82% of them said they used Apps
91% of tenants said they used Facebook
Who’s elderly family members are on facebook?
What factors made it get so big?
Accessibility for the masses is everything…
Creating the best app in world is only relevant
For those smart enough to use it
NEWS SCAVENGER: THE CONCEPT
• Huge boxing fan
• Sick and tired of going to multiple sites for all my information
• Don’t want to spend time setting up RSS readers across all my devices
• Don’t want to log on to twitter every 5 minutes
• Don’t want to log on to Facebook every 5 minutes
• Don’t‘ want to log on to Instagram every 5 minutes
• Don’t want to wait for search engines to crawl content
• Don’t want my content ordered by any form of algorithm or promotion
• Don’t want to see promoted content
• want to look at the world of boxing across every medium in real time
… When I want to look at Boxing News I want ALL my content in 1 place… at a glance… to help
me keep one step ahead
IF ONLY…
If only a powerful, web based tool existed that could be used to store
centralised information
…if only it had its own secure, authentication mechanism
…That could be used to service multiple light weight calls…
…that could potentially scale at a collection levels into the millions
…A bit like a central POINT for SHAREING…
HOW IT WORKS
ADVANCED POWERSHELL
SCRIPTING
• Powershell V3 introduced invoke-webrequest
• Possibly the single biggest advancement towards automation this decade
• Can retrieve all elements of all webpages and manipulate as you see fit
• Combine this with the object model and you can create extremely
powerful outputs
• Cookies? -usebasicparsing
ADVANCED POWERSHELL
SCRIPTING
• We use the concept of a ‘BOT’ for the scavenging process
Used to perform automated tasks in the farm
We call the scripts to scavenge Patterns
It is not a fire and forget process
We check consistently to make sure the content is being parsed correctly
Profanity filterer – Never Realised Shiitake was a mushroom!!!
Bots run the timer service only – no other Sharepoint services
Reboot every 24 hours
Clears out an nasty memory leaks
Confirms cache is refreshed
Ensured all services are up
unclean way of doing things – but does get rid of potential heartache
WINDOWS PHONE 8.0
The current IT Pro Conundrum :
the market is steadily being pushed towards apps
• Sharepoint, phone, tablet… towards the universal APP message
• Sooner or later your going to have to start developing
• As an IT PRO – where do you start?
Windows phone with integration to SharePoint is the perfect starting point
for any SharePoint IT Pro
• c# and xaml
RECOMMENDED READING
• Recommended reading
AUTHENTICATOR
The single hardest
portion of
phone > SharePoint
integration is
Authentication
clientauthenticationmode
FBA = .FormsAuthetication
claims = .default
O365 = .Microsoftonline
THOUGHTS AND IMPRESSIONS
Some thoughts impressions and observations when developing on
windows phone with SharePoint
• Mvvm,vvm,mm,mmmsmmmmfmm,d,mms <<<<<< errrrr…
• Choose what is right for your application – not because this weeks
sweetheart thinks it’s the way forward
• Best practice is just that – its not perfect practice, mistakes will
always be made – as long as you take the safest possible route you
should be fine
STORE FAIL!!!
• After 8 weeks of hard slog we were ready for submission
• All the guides alluded to project > store > build…
• This was greyed out…. ???
STORE FAIL!!!
• The reality of development right now in the Microsoft space is that you
are in a state of flux between multiple platforms, policies and procedures:
• VS 2012, lots of image work, wrong package - 8.0 only
• Store only accepts windows 8.1 packages for both desktop and phone
• To create the required package for upload the best and easiest way is to
create a universal app project…
• Universal APPs also work on Windows 10
• Once windows 10 is main stream all these issues will go away
UNIVERSAL APP PROJECT –
THE BAD
• When converting from 8.0 to 8.1 we noticed that approximately 40% of the
code base had changed
• Massive amounts of rework
• The DLLs for key things (windows phone toolkit by telerik) where not
compatible with 8.1
• The only dlls that would work were SharePoint mobile OOTB dlls
• This destroyed our authentication mechanism!
• Had to Change from FBA to network
• Created our own encryption mechanism to retrieve creds for use in the app
UNIVERSAL APP PROJECT –
THE GOOD
• The code we wrote for phone, now worked on desktops as well !
• Although this was a major upheaval – in the end it ensured that we
re-wrote the whole application with out reliance on DLLS from third
parties
• This also helped us embrace the universal app mantra
STORE SUCCESS!!!
• Once the packages were built we could upload really quickly
• Image work and descriptions completed at this point
• Phone and desktop are done separately (2 different apps)
• Validation took less than 1 hour for each
• Appeared in search results in 24 hours
• Totally searchable across the globe within 48 hours
STORE SUBMISSIONAt present both phone and
desktop have different
stores
This has been promised to
be unified in Windows 10 –
but until then…
CROSS PLATFORM STORY
App was live in windows store for phone and desktop
SharePoint Backend infrastructure stable
Scavenging process refined
Next….
How do we get this working on other, non-ms devices?
Dogs and cats!!!
CROSS PLATFORM DECISION
FRAMEWORK
There are three main areas that need to be addressed up front before your
cross platform development can begin:
Programming language
SharePoint integration Mechanism
Programming platform
Making the right decision for all three of these questions is vital for your
project and can have catastrophic consequences if the wrong decisions are
made
PROGRAMMING LANGUAGE
SHAREPOINT INTEGRATION
SHAREPOINT INTEGRATION
The biggest decision sway of the whole project:
When you are providing
rapid real time updates
1/3rd
reduction in traffic
size matters…
…it really matters!
PROGRAMMING PLATFORM
Developing cross platform you have MANY options – we looked at
these most common options:
• Native
• Xamarin
• Cordova
• Visual Studio Cordova
NATIVE
Android studio
Reduce the layer of complexity
Use native xaml
No third party involvement
Large ramp up per platform
investment for android
investment for apple
investment for Samsung
Need an apple mac!
XAMARIN
3rd
party tool
Runs dlls in its own runtime
Maps to the native device api’s
Licensed per platform
Integrates with visual studio
Adds a layer of complexity
Can run c# on other platforms
Good discount using MSDN
Subscription
If I had large amounts of custom c# this is the route I would choose
CORDOVA
Cordova is a command line tool made by apache
Creates projects for all the device platforms
Found that we were spending time learning cordova…
…not actually creating the app…
I would use this option if I was a native android or ios programmer,
then wanted to reduce re-work
VISUAL STUDIO CORDOVA
Visual Studios implementation of cordova
VERy, VERY similar to universal APPS
Some online training resources - but they are poor
Can use html 5, javascript and REST in a visual studio shell and run it
on android
Many android emulators
Compiles for IOS – but need an apple mac to deploy and test (mac in
cloud works fine $4 subscription)
AND THE WINNERS ARE…
Programming Language
Sharepoint integration
Platform
THE REST 1 PAGER…
Most interwebz articles start with “REST is simply…” or “REST is easily
the..”
Well… if you don’t know the principles rest is NOT easy!
…in fact it can be downright obtuse at times…
I’ve put together a 1 page guide to creating a rest page using our sample
environment. This way you can create your own SharePoint asp.net page
that pulls rest. Once you have it working you can tweak for your own needs
as you see fit
REST 1 PAGER
Full working demo can viewed here:
http://www.newsscavenger.com/sites/RestTest
THE VS CORDOVA 1 PAGER…
Setting up and implementing VS corodva from scratch can be time
consuming
The training materials on the interwebz are very basic, fragmented
and quite frankly not very good…
This 1 pager shows you how to
install and configure visual studio for cordova
Create a multiple platform Project
Populate that project with the rest 1 pager
Deploy that application to an android/ios/windows emulator or device
WELL DONE
If you follow the two 1 pagers you will have just:
• Installed your cross platform programming solution
• Integrated it with SharePoint
• Created an application that uses SharePoint across:
• Windows phone 8.1
• Windows desktop 8.1
• Windows 10
• Android (phone and tablet)
• IOS
REPORTING DASHBOARD
We all love reporting right? Imagine the cross platform data we can get from this!!!
Enter the fray Development Operations:
REPORTING DASHBOARD
Each scavenger has its own site
All articles are parsed into one list
In the APP when ever a link is pressed we also do an inert “get” to a reporting page
on the Scavenger site
This allows us to not only track all the usual data, but also allows us to track the
data by usage
We store each report on total number of downloads individually
REPORTING DASHBOARD
On a nightly basis we set a daily task (23:59) – this does the following
Copies the log files from the web front ends to the BOT
Uses Log parser to gain all relevant information
Hits per day Total
Hits per day by source
Uploads that data to the reporting list on the scavenger site
Use the SP2010 (yes it still works) chart part to connect to that list
Display web parts however you wish on the page of your choice
Benefits
All heavy lifting done by the bot
As its based on the logs can report on anything really
As its in powershell can combine with other PS modules
Hyper-v
Local machine (think disk monitoring)
Not reliant on timer jobs
Very easy to get to grips with
REPORTING DASHBOARD
PATTERN
Ensure that you replace the site,
statistics list and the local location to
store the files
You must have logparser.exe present in
your local folder being used to compete
the reporting
Text version can be found here:
http://www.newsscavenger.com/sites/RestTest/Shared%20Documen
ts/ReportingDashboardDemo.txt
LAST BUT NOT LEAST A WORD
ON ACCESSIBILITY…
We are continually told that the future of the internet is visual this, visual that, visual the other….
(Delve, office graph, Datazen etc..)
Maybe it is…
But what if they are mistaken…
What is the future of the web was audio…
When you drive down the road on your normal commute – how many web sites can you read?
… how many websites could you listen to?
… the use of audio accessibility should be for everyone
… if only a scavenger app existed on all devices, that made all content totally audio compliant… if
only….
FINALLY…
If I had to sum up the last 9 months the one word I would use is…
CHAOS!
THANK YOU
I’d like to take this opportunity to thank you all for listening to my
dullest tones
If you have any questions please don’t hesitate to contact me +44
7506 578092