SlideShare uma empresa Scribd logo
1 de 33
Exploring SharePoint with F# Talbott Crowell (MVP) @Talbott SharePoint Saturday New York City July 30, 2011
Learn something new (exercise for the brain) Trend in functional programming Java -> Clojure, Scala Erlang LINQ added to VB and C# Microsoft’s official (and only) functional programming language Why F#
Functional programming has been around a long time Not new Long history Functional programming is safe A concern as we head toward manycore and cloud computing Why another language?
1930’s: lambda calculus (roots) 1956: IPL (Information Processing Language) “the first functional language 1958: 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 Haskell 1996: OCaml (Objective Caml) Functional programming has been around a long time
Functional language developed by Microsoft Research By Don Syme and his team, who productized Generics Based on OCaml (influenced by C# and Haskell) History 2002: F# language design started 2005 January: F# 1.0.1 releases to public Not a product.  Integration with VS2003 Works in .NET 1.0 through .NET 2.0 beta, Mono 2005 November: F# 1.1.5 with VS 2005 RTM support 2009 October: VS2010 Beta 2, CTP for VS2008 & Non-Windows users 2010: F# is “productized” and baked into VS 2010 What is F#
Interactive Scripting  Uses REPL (Read Evaluate Print Loop) Good for prototyping Succinct = Less code Type Inference Strongly typed, strict Automatic generalization (generics for free) Few type annotations 1st class functions (currying, lazy evaluations) Pattern matching Key Characteristics of F#
Functional first Mutable keyword Functions are first class values Blend of functional and imperative Object oriented capabilities Built on .NET Framework Practical Leverage existing code What I like about F#
What is manycore? Lots of processors on one chip Tens or hundreds Intel – Future (Task parallelism) NVIDIA GPU – Today (Data parallelism) 500+ cores on chip Graphics, gaming, 3D rendering Use CUDA for financial or research computing Program in C or C++
The Power Wall: CPU Clock Speed Manycore -> Multicore -> Single core -> From Katherine Yelick’s “Multicore: Fallout of a Hardware Revolution”
Road to manycore 1970 – 2005 Single core on the “desktop” and laptop 2006 – 2011 Single core on the smartphone/tablet Multi core on the “desktop” Multi core in the cloud 2012 – 2020 Multi core on the smartphone/tablet 2021 Manycore probably will be common on many devices and computers
Multicore for Smartphones/Tablets Android 2.2 already supports multicore NVIDIA dual core test with one core shut off 1.5 to 1.6x faster with two cores http://bit.ly/nvidiadualcore NVIDIA quad core on its way Smartphones by holiday season 2011 Faster than 2 GHz notebook Core 2 Duo (T7200) http://bit.ly/eWMOsu Qualcomm quad core SnapDragon Devices expected in 2013 Intel announcing entry into Smartphone market
Declarative programming style	 Easier to introduce parallelism into existing code Immutability by default Can’t introduce race conditions Easier to write lock-free code Functional Programming
Type inference Expressions F# Basics let x = 5 let y = 5.0  let files = Directory.GetFiles(@"C:magesriginal") let x = 5 * 5 let y = 5.0 / 3.0 let width = image.Width / 8
Function Anonymous functions F# Functions let sqr x = x * x sqr 5 (fun x -> x * x) 5
The |> Combinator “Pipe Forward”  Example F# Combinators  x |> f          is the same as        f x   let sqr x = x * x sqr 5   5 |> sqr
The <| Combinator “Pipe Backward”  Example F# Combinators  f <| x          is the same as        f x   let sqr x = x * x sqr 5 sqr <| 3 + 2       not same as    sqr 3 + 2
Similar to operator overloading  Example Symbolic Functions  let (operatorName) left right = <function>   open System.Text.RegularExpressions  let (===) str regex =  Regex.Match(str, regex).Success
Client Object Model
Adding References
For more info on Client Object Model See “Using the SharePoint Foundation 2010 Managed Client Object Model” http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx
Load References FSX Script Open namespace Client Object Model Assemblies #r @"..eferenceAssembliesicrosoft.SharePoint.Client.dll"            #r @"..eferenceAssembliesicrosoft.SharePoint.Client.Runtime.dll" open Microsoft.SharePoint.Client
Create SharePoint Client Context Pass Credentials Client Context and Credentials let ctx = new ClientContext("http://fsug.org") ctx.Credentials <-  new NetworkCredential( 	user, password, domain)
Helper function to Load and Query Retrieve Site Collection Load and Query Context let 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 Site let site = ctx.Site  load ctx site  let web = site.RootWeb  load ctx web let title = web.Title
Use for loop to iterate through lists Iterate through Lists  load ctxweb.Lists  for list in web.Lists do     print <| "List Title: " + list.Title
Query for list items using CAML Use for loop to iterate through list items Iterate through List Items let 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 lists Iterate through Lists  load ctxweb.Lists  for list in web.Lists do     print <| "List Title: " + list.Title
Demo
Future of F# Solution for the Data Deluge Type Providers Video by Keith Battocchi
Questions?
Thank You References: http://TryFsharp.org Play with F# on browser Tutorial Load and save files http://fsharp.net More information
My Info Talbott Crowell F# MVP http://fsug.org New England F# User Group http://twitter.com/talbott  @talbott @BASPUG Boston Area SharePoint User Group http://ThirdM.com Third Millennium, Inc.  Chief Architect

Mais conteúdo relacionado

Mais procurados

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 2014Phillip 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 CENTREjatin batra
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ programmatiur rahman
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiastsJack 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_netNico Ludwig
 
JS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES XJS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES XJSFestUA
 
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 CENTREjatin batra
 
C++ questions and answers
C++ questions and answersC++ questions and answers
C++ questions and answersDeepak Singh
 

Mais procurados (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++
 
c# usage,applications and advantages
c# usage,applications and advantages c# usage,applications and advantages
c# usage,applications and advantages
 
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
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
C vs c++
C vs c++C vs c++
C vs c++
 
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
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
 
F# for functional enthusiasts
F# for functional enthusiastsF# for functional enthusiasts
F# for functional enthusiasts
 
(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
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
JS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES XJS Fest 2018. Виталий Ратушный. ES X
JS Fest 2018. Виталий Ратушный. ES X
 
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...
 
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
 
C++ questions and answers
C++ questions and answersC++ questions and answers
C++ questions and answers
 
What is c++ programming
What is c++ programmingWhat is c++ programming
What is c++ programming
 
Session Four C#
Session Four C# Session Four C#
Session Four C#
 

Semelhante a Exploring SharePoint with F#

Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Pythongturnquist
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesEelco 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 DevelopersDave Bost
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009nkaluva
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojureAbbas Raza
 
.NET and C# introduction
.NET and C# introduction.NET and C# introduction
.NET and C# introductionPeter 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 - 2008Guillaume Laforge
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreEsha 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 Day2Daniel Egan
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep JoshiSpiffy
 
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 FrameworkAjay K
 
Microsoft Silverlight
Microsoft SilverlightMicrosoft Silverlight
Microsoft Silverlightguest3a8196
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkBob 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 2007Guillaume 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 AirflowKaxil Naik
 

Semelhante a Exploring SharePoint with F# (20)

Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
 
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
 
Toub parallelism tour_oct2009
Toub parallelism tour_oct2009Toub parallelism tour_oct2009
Toub parallelism tour_oct2009
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
 
.NET and C# introduction
.NET and C# introduction.NET and C# introduction
.NET and C# introduction
 
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#
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
 
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...
 
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
 
Flink internals web
Flink internals web Flink internals web
Flink internals web
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
 
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)
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
 
Microsoft Silverlight
Microsoft SilverlightMicrosoft Silverlight
Microsoft Silverlight
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
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...
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
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
 

Mais de Talbott Crowell

Top 3 Mistakes when Building
Top 3 Mistakes when BuildingTop 3 Mistakes when Building
Top 3 Mistakes when BuildingTalbott 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 applicationsTalbott 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 365Talbott Crowell
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePointTalbott 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 appTalbott 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 appTalbott Crowell
 
PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012Talbott Crowell
 
PowerShell and SharePoint
PowerShell and SharePointPowerShell and SharePoint
PowerShell and SharePointTalbott Crowell
 
Automating PowerShell with SharePoint
Automating PowerShell with SharePointAutomating PowerShell with SharePoint
Automating PowerShell with SharePointTalbott Crowell
 
SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010Talbott 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 SharePointTalbott Crowell
 
Architecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureArchitecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureTalbott Crowell
 

Mais de Talbott Crowell (18)

Top 7 mistakes
Top 7 mistakesTop 7 mistakes
Top 7 mistakes
 
Top 3 Mistakes when Building
Top 3 Mistakes when BuildingTop 3 Mistakes when Building
Top 3 Mistakes when Building
 
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
 
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
 
Custom Development for SharePoint
Custom Development for SharePointCustom Development for SharePoint
Custom Development for SharePoint
 
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?
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
 
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
 
Introduction to F# 3.0
Introduction to F# 3.0Introduction to F# 3.0
Introduction to F# 3.0
 
PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012PowerShell and SharePoint @spsnyc July 2012
PowerShell and SharePoint @spsnyc July 2012
 
PowerShell and SharePoint
PowerShell and SharePointPowerShell and SharePoint
PowerShell and SharePoint
 
Welcome to windows 8
Welcome to windows 8Welcome to windows 8
Welcome to windows 8
 
Automating PowerShell with SharePoint
Automating PowerShell with SharePointAutomating PowerShell with SharePoint
Automating PowerShell with SharePoint
 
F# And Silverlight
F# And SilverlightF# And Silverlight
F# And Silverlight
 
SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010SharePoint Saturday Boston 2010
SharePoint Saturday Boston 2010
 
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
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
 
Architecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureArchitecting Solutions for the Manycore Future
Architecting Solutions for the Manycore Future
 

Último

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Exploring SharePoint with F#

  • 1. Exploring SharePoint with F# Talbott Crowell (MVP) @Talbott SharePoint Saturday New York City July 30, 2011
  • 2. Learn something new (exercise for the brain) Trend in functional programming Java -> Clojure, Scala Erlang LINQ added to VB and C# Microsoft’s official (and only) functional programming language Why F#
  • 3. Functional programming has been around a long time Not new Long history Functional programming is safe A concern as we head toward manycore and cloud computing Why another language?
  • 4. 1930’s: lambda calculus (roots) 1956: IPL (Information Processing Language) “the first functional language 1958: 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 Haskell 1996: OCaml (Objective Caml) Functional programming has been around a long time
  • 5. Functional language developed by Microsoft Research By Don Syme and his team, who productized Generics Based on OCaml (influenced by C# and Haskell) History 2002: F# language design started 2005 January: F# 1.0.1 releases to public Not a product. Integration with VS2003 Works in .NET 1.0 through .NET 2.0 beta, Mono 2005 November: F# 1.1.5 with VS 2005 RTM support 2009 October: VS2010 Beta 2, CTP for VS2008 & Non-Windows users 2010: F# is “productized” and baked into VS 2010 What is F#
  • 6. Interactive Scripting Uses REPL (Read Evaluate Print Loop) Good for prototyping Succinct = Less code Type Inference Strongly typed, strict Automatic generalization (generics for free) Few type annotations 1st class functions (currying, lazy evaluations) Pattern matching Key Characteristics of F#
  • 7. Functional first Mutable keyword Functions are first class values Blend of functional and imperative Object oriented capabilities Built on .NET Framework Practical Leverage existing code What I like about F#
  • 8. What is manycore? Lots of processors on one chip Tens or hundreds Intel – Future (Task parallelism) NVIDIA GPU – Today (Data parallelism) 500+ cores on chip Graphics, gaming, 3D rendering Use CUDA for financial or research computing Program in C or C++
  • 9. The Power Wall: CPU Clock Speed Manycore -> Multicore -> Single core -> From Katherine Yelick’s “Multicore: Fallout of a Hardware Revolution”
  • 10. Road to manycore 1970 – 2005 Single core on the “desktop” and laptop 2006 – 2011 Single core on the smartphone/tablet Multi core on the “desktop” Multi core in the cloud 2012 – 2020 Multi core on the smartphone/tablet 2021 Manycore probably will be common on many devices and computers
  • 11. Multicore for Smartphones/Tablets Android 2.2 already supports multicore NVIDIA dual core test with one core shut off 1.5 to 1.6x faster with two cores http://bit.ly/nvidiadualcore NVIDIA quad core on its way Smartphones by holiday season 2011 Faster than 2 GHz notebook Core 2 Duo (T7200) http://bit.ly/eWMOsu Qualcomm quad core SnapDragon Devices expected in 2013 Intel announcing entry into Smartphone market
  • 12. Declarative programming style Easier to introduce parallelism into existing code Immutability by default Can’t introduce race conditions Easier to write lock-free code Functional Programming
  • 13. Type inference Expressions F# Basics let x = 5 let y = 5.0 let files = Directory.GetFiles(@"C:magesriginal") let x = 5 * 5 let y = 5.0 / 3.0 let width = image.Width / 8
  • 14. Function Anonymous functions F# Functions let sqr x = x * x sqr 5 (fun x -> x * x) 5
  • 15. The |> Combinator “Pipe Forward” Example F# Combinators x |> f is the same as f x let sqr x = x * x sqr 5 5 |> sqr
  • 16. The <| Combinator “Pipe Backward” Example F# Combinators f <| x is the same as f x let sqr x = x * x sqr 5 sqr <| 3 + 2 not same as sqr 3 + 2
  • 17. Similar to operator overloading Example Symbolic Functions let (operatorName) left right = <function> open System.Text.RegularExpressions let (===) str regex = Regex.Match(str, regex).Success
  • 19.
  • 21. For more info on Client Object Model See “Using the SharePoint Foundation 2010 Managed Client Object Model” http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx
  • 22. Load References FSX Script Open namespace Client Object Model Assemblies #r @"..eferenceAssembliesicrosoft.SharePoint.Client.dll" #r @"..eferenceAssembliesicrosoft.SharePoint.Client.Runtime.dll" open Microsoft.SharePoint.Client
  • 23. Create SharePoint Client Context Pass Credentials Client Context and Credentials let ctx = new ClientContext("http://fsug.org") ctx.Credentials <- new NetworkCredential( user, password, domain)
  • 24. Helper function to Load and Query Retrieve Site Collection Load and Query Context let 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 Site let site = ctx.Site load ctx site let web = site.RootWeb load ctx web let title = web.Title
  • 26. Use for loop to iterate through lists Iterate through Lists load ctxweb.Lists for list in web.Lists do print <| "List Title: " + list.Title
  • 27. Query for list items using CAML Use for loop to iterate through list items Iterate through List Items let 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 lists Iterate 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 Deluge Type Providers Video by Keith Battocchi
  • 32. Thank You References: http://TryFsharp.org Play with F# on browser Tutorial Load and save files http://fsharp.net More information
  • 33. My Info Talbott Crowell F# MVP http://fsug.org New England F# User Group http://twitter.com/talbott @talbott @BASPUG Boston Area SharePoint User Group http://ThirdM.com Third Millennium, Inc. Chief Architect