SlideShare a Scribd company logo
Exploring SharePoint with F#Talbott Crowell (MVP)@TalbottSharePoint Saturday New York CityJuly 30, 2011
Learn something new (exercise for the brain)Trend in functional programmingJava -> Clojure, ScalaErlangLINQ added to VB and C#Microsoft’s official (and only) functional programming languageWhy F#
Functional programming has been around a long timeNot newLong historyFunctional programming is safeA concern as we head toward manycore and cloud computingWhy another language?
1930’s: lambda calculus (roots)1956: IPL (Information Processing Language) “the first functional language1958: LISP “a functional flavored language”1962: APL (A Programming Language)1973: ML (Meta Language)1983: SML (Standard ML)1987: Caml (Categorical Abstract Machine Language ) and Haskell1996: OCaml (Objective Caml)Functional programming has been around a long time
Functional language developed by Microsoft ResearchBy Don Syme and his team, who productized GenericsBased on OCaml (influenced by C# and Haskell)History2002: F# language design started2005 January: F# 1.0.1 releases to publicNot a product.  Integration with VS2003Works in .NET 1.0 through .NET 2.0 beta, Mono2005 November: F# 1.1.5 with VS 2005 RTM support2009 October: VS2010 Beta 2, CTP for VS2008 & Non-Windows users2010: F# is “productized” and baked into VS 2010What is F#
Interactive Scripting Uses REPL (Read Evaluate Print Loop)Good for prototypingSuccinct = Less codeType InferenceStrongly typed, strictAutomatic generalization (generics for free)Few type annotations1st class functions (currying, lazy evaluations)Pattern matchingKey Characteristics of F#
Functional firstMutable keywordFunctions are first class valuesBlend of functional and imperativeObject oriented capabilitiesBuilt on .NET FrameworkPracticalLeverage existing codeWhat I like about F#
What is manycore?Lots of processors on one chipTens or hundredsIntel – Future (Task parallelism)NVIDIA GPU – Today (Data parallelism)500+ cores on chipGraphics, gaming, 3D renderingUse CUDA for financial or research computingProgram in C or C++
The Power Wall: CPU Clock SpeedManycore->Multicore->Single core->From Katherine Yelick’s “Multicore: Fallout of a Hardware Revolution”
Road to manycore1970 – 2005Single core on the “desktop” and laptop2006 – 2011Single core on the smartphone/tabletMulti core on the “desktop”Multi core in the cloud2012 – 2020Multi core on the smartphone/tablet2021Manycore probably will be common on many devices and computers
Multicore for Smartphones/TabletsAndroid 2.2 already supports multicoreNVIDIA dual core test with one core shut off1.5 to 1.6x faster with two coreshttp://bit.ly/nvidiadualcoreNVIDIA quad core on its waySmartphones by holiday season 2011Faster than 2 GHz notebook Core 2 Duo (T7200)http://bit.ly/eWMOsuQualcomm quad core SnapDragonDevices expected in 2013Intel announcing entry into Smartphone market
Declarative programming style	Easier to introduce parallelism into existing codeImmutability by defaultCan’t introduce race conditionsEasier to write lock-free codeFunctional Programming
Type inferenceExpressionsF# Basicslet x = 5let y = 5.0 let files = Directory.GetFiles(@"C:\images\original")let x = 5 * 5let y = 5.0 / 3.0let width = image.Width / 8
FunctionAnonymous functionsF# Functionslet sqr x = x * xsqr 5(fun x -> x * x) 5
The |> Combinator “Pipe Forward” ExampleF# Combinators x |> f          is the same as        f x  let sqr x = x * xsqr 5  5 |> sqr
The <| Combinator “Pipe Backward” ExampleF# Combinators f <| x          is the same as        f x  let sqr x = x * xsqr 5sqr <| 3 + 2       not same as    sqr 3 + 2
Similar to operator overloading ExampleSymbolic Functions let (operatorName) left right = <function>  open System.Text.RegularExpressions let (===) str regex = Regex.Match(str, regex).Success
Client Object Model
Exploring SharePoint with F#
Adding References
For more info on Client Object ModelSee “Using the SharePoint Foundation 2010 Managed Client Object Model”http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx
Load References FSX ScriptOpen namespaceClient Object Model Assemblies#r @"..\ReferenceAssemblies\Microsoft.SharePoint.Client.dll"           #r @"..\ReferenceAssemblies\Microsoft.SharePoint.Client.Runtime.dll"open Microsoft.SharePoint.Client
Create SharePoint Client ContextPass CredentialsClient Context and Credentialslet ctx = new ClientContext("http://fsug.org")ctx.Credentials <- new NetworkCredential(	user, password, domain)
Helper function to Load and QueryRetrieve Site CollectionLoad and Query Contextlet load(ctx:ClientContext)(item:'a) =   ctx.Load(item)ctx.ExecuteQuery() let site = ctx.Site load ctx site
Site Collection (Site) and Site (Web)Site Collection and Sitelet site = ctx.Site load ctx site let web = site.RootWeb load ctx weblet title = web.Title
Use for loop to iterate through listsIterate through Lists load ctxweb.Lists for list in web.Lists do    print <| "List Title: " + list.Title
Query for list items using CAMLUse for loop to iterate through list itemsIterate through List Itemslet fsugMeetings = web.Lists.GetByTitle("FSUG Meetings")let query = new CamlQuery()query.ViewXml <- "<View><Query><OrderBy>...let listItems = fsugMeetings.GetItems(query)ctx.Load(fsugMeetings);ctx.Load(listItems);ctx.ExecuteQuery();for meeting in listItems do    print <| "Meeting: " + meeting.["Title"].ToString()
Use for loop to iterate through listsIterate through Lists load ctxweb.Lists for list in web.Lists do    print <| "List Title: " + list.Title
Demo
Future of F#Solution for the Data DelugeType ProvidersVideo by Keith Battocchi
Questions?
Thank YouReferences:http://TryFsharp.orgPlay with F# on browserTutorialLoad and save fileshttp://fsharp.netMore information
My InfoTalbott CrowellF# MVPhttp://fsug.orgNew England F# User Grouphttp://twitter.com/talbott  @talbott@BASPUGBoston Area SharePoint User Grouphttp://ThirdM.comThird Millennium, Inc.  Chief Architect
Ad

More Related Content

What's hot (18)

Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
Vaibhav Khanna
 
c# usage,applications and advantages
c# usage,applications and advantages c# usage,applications and advantages
c# usage,applications and advantages
mohamed drahem
 
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
Phillip Trelford
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
sudipv
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
shuklagirish
 
C vs c++
C vs c++C vs c++
C vs c++
Gaurav Badhan
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
jatin batra
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
starlit electronics
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
matiur rahman
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiasts
Jack Fox
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
Nico Ludwig
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
Indira Gnadhi National Open University (IGNOU)
 
JS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES XJS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES X
JSFestUA
 
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
corehard_by
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
C++ questions and answers
C++ questions and answersC++ questions and answers
C++ questions and answers
Deepak Singh
 
What is c++ programming
What is c++ programmingWhat is c++ programming
What is c++ programming
PSK Technolgies Pvt. Ltd. IT Company Nagpur
 
Session Four C#
Session Four C# Session Four C#
Session Four C#
Mustafa Saeed
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
Vaibhav Khanna
 
c# usage,applications and advantages
c# usage,applications and advantages c# usage,applications and advantages
c# usage,applications and advantages
mohamed drahem
 
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014F# Eye 4 the C# Guy -  DDD Cambridge Nights 2014
F# Eye 4 the C# Guy - DDD Cambridge Nights 2014
Phillip Trelford
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
sudipv
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
jatin batra
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
matiur rahman
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiasts
Jack Fox
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
Nico Ludwig
 
JS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES XJS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES X
JSFestUA
 
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
Object-Oriented Programming in Modern C++. Borislav Stanimirov. CoreHard Spri...
corehard_by
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
C++ questions and answers
C++ questions and answersC++ questions and answers
C++ questions and answers
Deepak Singh
 

Similar to Exploring SharePoint with F# (20)

Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
gturnquist
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
Eelco Visser
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Dave Bost
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
nkaluva
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
Abbas Raza
 
.NET and C# introduction
.NET and C# introduction.NET and C# introduction
.NET and C# introduction
Peter Gfader
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
Tomas Petricek
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
Esha Yadav
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan
 
Flink internals web
Flink internals web Flink internals web
Flink internals web
Kostas Tzoumas
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
Spiffy
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)
Netcetera
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
Ajay K
 
Microsoft Silverlight
Microsoft SilverlightMicrosoft Silverlight
Microsoft Silverlight
guest3a8196
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
InfluxData
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
Guillaume Laforge
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
Kaxil Naik
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
gturnquist
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
Eelco Visser
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Dave Bost
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
nkaluva
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
Abbas Raza
 
.NET and C# introduction
.NET and C# introduction.NET and C# introduction
.NET and C# introduction
Peter Gfader
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
Tomas Petricek
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
Esha Yadav
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan Msdn Tech Days Oc Day2
Daniel Egan
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
Spiffy
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)
Netcetera
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
Ajay K
 
Microsoft Silverlight
Microsoft SilverlightMicrosoft Silverlight
Microsoft Silverlight
guest3a8196
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
InfluxData
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
Guillaume Laforge
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
Kaxil Naik
 
Ad

More from Talbott Crowell (18)

Top 7 mistakes
Top 7 mistakesTop 7 mistakes
Top 7 mistakes
Talbott Crowell
 
Top 3 Mistakes when Building
Top 3 Mistakes when BuildingTop 3 Mistakes when Building
Top 3 Mistakes when Building
Talbott Crowell
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
Talbott Crowell
 
Road to the Cloud - Extending your reach with SharePoint and Office 365
Road to the Cloud - Extending your reach with SharePoint and Office 365Road to the Cloud - Extending your reach with SharePoint and Office 365
Road to the Cloud - Extending your reach with SharePoint and Office 365
Talbott Crowell
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
Talbott Crowell
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
Talbott Crowell
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
Talbott Crowell
 
Developing a provider hosted share point app
Developing a provider hosted share point appDeveloping a provider hosted share point app
Developing a provider hosted share point app
Talbott Crowell
 
Introduction to F# 3.0
Introduction to F# 3.0Introduction to F# 3.0
Introduction to F# 3.0
Talbott Crowell
 
PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012
Talbott Crowell
 
PowerShell and SharePoint
PowerShell and SharePointPowerShell and SharePoint
PowerShell and SharePoint
Talbott Crowell
 
Welcome to windows 8
Welcome to windows 8Welcome to windows 8
Welcome to windows 8
Talbott Crowell
 
Automating PowerShell with SharePoint
Automating PowerShell with SharePointAutomating PowerShell with SharePoint
Automating PowerShell with SharePoint
Talbott Crowell
 
F# And Silverlight
F# And SilverlightF# And Silverlight
F# And Silverlight
Talbott Crowell
 
SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010
Talbott Crowell
 
Automating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePointAutomating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePoint
Talbott Crowell
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
Talbott Crowell
 
Architecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureArchitecting Solutions for the Manycore Future
Architecting Solutions for the Manycore Future
Talbott Crowell
 
Top 3 Mistakes when Building
Top 3 Mistakes when BuildingTop 3 Mistakes when Building
Top 3 Mistakes when Building
Talbott Crowell
 
Building high performance and scalable share point applications
Building high performance and scalable share point applicationsBuilding high performance and scalable share point applications
Building high performance and scalable share point applications
Talbott Crowell
 
Road to the Cloud - Extending your reach with SharePoint and Office 365
Road to the Cloud - Extending your reach with SharePoint and Office 365Road to the Cloud - Extending your reach with SharePoint and Office 365
Road to the Cloud - Extending your reach with SharePoint and Office 365
Talbott Crowell
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
Talbott Crowell
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
Talbott Crowell
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
Talbott Crowell
 
Developing a provider hosted share point app
Developing a provider hosted share point appDeveloping a provider hosted share point app
Developing a provider hosted share point app
Talbott Crowell
 
PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012
Talbott Crowell
 
PowerShell and SharePoint
PowerShell and SharePointPowerShell and SharePoint
PowerShell and SharePoint
Talbott Crowell
 
Automating PowerShell with SharePoint
Automating PowerShell with SharePointAutomating PowerShell with SharePoint
Automating PowerShell with SharePoint
Talbott Crowell
 
SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010
Talbott Crowell
 
Automating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePointAutomating SQL Server Database Creation for SharePoint
Automating SQL Server Database Creation for SharePoint
Talbott Crowell
 
Architecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureArchitecting Solutions for the Manycore Future
Architecting Solutions for the Manycore Future
Talbott Crowell
 
Ad

Recently uploaded (20)

Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 

Exploring SharePoint with F#

  • 1. Exploring SharePoint with F#Talbott Crowell (MVP)@TalbottSharePoint Saturday New York CityJuly 30, 2011
  • 2. Learn something new (exercise for the brain)Trend in functional programmingJava -> Clojure, ScalaErlangLINQ added to VB and C#Microsoft’s official (and only) functional programming languageWhy F#
  • 3. Functional programming has been around a long timeNot newLong historyFunctional programming is safeA concern as we head toward manycore and cloud computingWhy another language?
  • 4. 1930’s: lambda calculus (roots)1956: IPL (Information Processing Language) “the first functional language1958: LISP “a functional flavored language”1962: APL (A Programming Language)1973: ML (Meta Language)1983: SML (Standard ML)1987: Caml (Categorical Abstract Machine Language ) and Haskell1996: OCaml (Objective Caml)Functional programming has been around a long time
  • 5. Functional language developed by Microsoft ResearchBy Don Syme and his team, who productized GenericsBased on OCaml (influenced by C# and Haskell)History2002: F# language design started2005 January: F# 1.0.1 releases to publicNot a product. Integration with VS2003Works in .NET 1.0 through .NET 2.0 beta, Mono2005 November: F# 1.1.5 with VS 2005 RTM support2009 October: VS2010 Beta 2, CTP for VS2008 & Non-Windows users2010: F# is “productized” and baked into VS 2010What is F#
  • 6. Interactive Scripting Uses REPL (Read Evaluate Print Loop)Good for prototypingSuccinct = Less codeType InferenceStrongly typed, strictAutomatic generalization (generics for free)Few type annotations1st class functions (currying, lazy evaluations)Pattern matchingKey Characteristics of F#
  • 7. Functional firstMutable keywordFunctions are first class valuesBlend of functional and imperativeObject oriented capabilitiesBuilt on .NET FrameworkPracticalLeverage existing codeWhat I like about F#
  • 8. What is manycore?Lots of processors on one chipTens or hundredsIntel – Future (Task parallelism)NVIDIA GPU – Today (Data parallelism)500+ cores on chipGraphics, gaming, 3D renderingUse CUDA for financial or research computingProgram in C or C++
  • 9. The Power Wall: CPU Clock SpeedManycore->Multicore->Single core->From Katherine Yelick’s “Multicore: Fallout of a Hardware Revolution”
  • 10. Road to manycore1970 – 2005Single core on the “desktop” and laptop2006 – 2011Single core on the smartphone/tabletMulti core on the “desktop”Multi core in the cloud2012 – 2020Multi core on the smartphone/tablet2021Manycore probably will be common on many devices and computers
  • 11. Multicore for Smartphones/TabletsAndroid 2.2 already supports multicoreNVIDIA dual core test with one core shut off1.5 to 1.6x faster with two coreshttp://bit.ly/nvidiadualcoreNVIDIA quad core on its waySmartphones by holiday season 2011Faster than 2 GHz notebook Core 2 Duo (T7200)http://bit.ly/eWMOsuQualcomm quad core SnapDragonDevices expected in 2013Intel announcing entry into Smartphone market
  • 12. Declarative programming style Easier to introduce parallelism into existing codeImmutability by defaultCan’t introduce race conditionsEasier to write lock-free codeFunctional Programming
  • 13. Type inferenceExpressionsF# Basicslet x = 5let y = 5.0 let files = Directory.GetFiles(@"C:\images\original")let x = 5 * 5let y = 5.0 / 3.0let width = image.Width / 8
  • 14. FunctionAnonymous functionsF# Functionslet sqr x = x * xsqr 5(fun x -> x * x) 5
  • 15. The |> Combinator “Pipe Forward” ExampleF# Combinators x |> f is the same as f x let sqr x = x * xsqr 5 5 |> sqr
  • 16. The <| Combinator “Pipe Backward” ExampleF# Combinators f <| x is the same as f x let sqr x = x * xsqr 5sqr <| 3 + 2 not same as sqr 3 + 2
  • 17. Similar to operator overloading ExampleSymbolic Functions let (operatorName) left right = <function> open System.Text.RegularExpressions let (===) str regex = Regex.Match(str, regex).Success
  • 21. For more info on Client Object ModelSee “Using the SharePoint Foundation 2010 Managed Client Object Model”http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx
  • 22. Load References FSX ScriptOpen namespaceClient Object Model Assemblies#r @"..\ReferenceAssemblies\Microsoft.SharePoint.Client.dll" #r @"..\ReferenceAssemblies\Microsoft.SharePoint.Client.Runtime.dll"open Microsoft.SharePoint.Client
  • 23. Create SharePoint Client ContextPass CredentialsClient Context and Credentialslet ctx = new ClientContext("http://fsug.org")ctx.Credentials <- new NetworkCredential( user, password, domain)
  • 24. Helper function to Load and QueryRetrieve Site CollectionLoad and Query Contextlet load(ctx:ClientContext)(item:'a) = ctx.Load(item)ctx.ExecuteQuery() let site = ctx.Site load ctx site
  • 25. Site Collection (Site) and Site (Web)Site Collection and Sitelet site = ctx.Site load ctx site let web = site.RootWeb load ctx weblet title = web.Title
  • 26. Use for loop to iterate through listsIterate through Lists load ctxweb.Lists for list in web.Lists do print <| "List Title: " + list.Title
  • 27. Query for list items using CAMLUse for loop to iterate through list itemsIterate through List Itemslet fsugMeetings = web.Lists.GetByTitle("FSUG Meetings")let query = new CamlQuery()query.ViewXml <- "<View><Query><OrderBy>...let listItems = fsugMeetings.GetItems(query)ctx.Load(fsugMeetings);ctx.Load(listItems);ctx.ExecuteQuery();for meeting in listItems do print <| "Meeting: " + meeting.["Title"].ToString()
  • 28. Use for loop to iterate through listsIterate through Lists load ctxweb.Lists for list in web.Lists do print <| "List Title: " + list.Title
  • 29. Demo
  • 30. Future of F#Solution for the Data DelugeType ProvidersVideo by Keith Battocchi
  • 32. Thank YouReferences:http://TryFsharp.orgPlay with F# on browserTutorialLoad and save fileshttp://fsharp.netMore information
  • 33. My InfoTalbott CrowellF# MVPhttp://fsug.orgNew England F# User Grouphttp://twitter.com/talbott @talbott@BASPUGBoston Area SharePoint User Grouphttp://ThirdM.comThird Millennium, Inc. Chief Architect