Developing applications in
SharePoint 2013: forget the past?

Serge Luca
Who Am I ?

Serge Luca
SharePoint Business Unit
Manager @ICT7
SharePoint MVP
Co-author of 2 incoming books on
SharePoint 2013
sergeluca@hotmail.com
Related sessions




“Deep Dive
SharePoint 2013:   “Deep Dive          “Deep Dive
SharePoint App     SharePoint 2013:    SharePoint 2013:
development        Accessing           SharePoint App
Fundamentals “     SharePoint data “   Security”
What’s new for developers in SP 2013
Agenda
Apps for   Apps for
SharePoint Office     JS Link   WCM   Workflows




Conclusions
Apps for SharePoint
Problems with custom code


                                    (Very) expensive upgrades to
  Stability                         new versions of SharePoint


  Code runs with the                Do you really believe that
  identity/permissions of a         sandboxed solution cannot
  specific user                     perform attacks ?

  The upgrade feature story is
  not clear for many dev (feature
  versioning or assembly
  versioning…)
Upgrading to a new version of
SharePoint ?
SharePoint App Model :
past, present, future…
Apps Architecture

                         Provider-Hosted App
                                                                          SharePoint      Your Hosted
                                                                             Web
Cloud-based Apps         “Bring your own server hosting infrastructure”                      Site
Get remote events from
SharePoint
Use CSOM/REST +
OAuth to work with SP
                         Autohosted App                                                    Windows
                                                                          SharePoint
                                                                                            Azure
                                                                             Web
                         Windows Azure + SQL Azure                                         Websites
                         provisioned invisibly as apps are
                         installed

                         SharePoint-Hosted App                                   Parent
                                                                                  Web
                         Provision an isolated sub web on a parent                        App Web
                         web
                            • Reuse web elements                                           (from
                               (lists, files, out-of-box web parts)                        WSP)
                            • No server code allowed; use client
                               JavaScript for logic, UX
Apps lifecycle
                                                             Catalogs Mngt
                                                             Licences Mngt
                                                             Tenants Mngt
                                                              Perms Mngt
                                                                                                                   Provider
                                                             Monitor Apps
                                                                                                                  hosted App         External Web
                                                                                                                                       Site (IIS ?)
                                 Apps Service
                                 Application
                                                                                          SP hosted App
                                                    Authorized App
                                                      Delegation
                    *.app download




 Public app store

       Cloud                                                                                                                             Azure Web
                                                                                                                                            Site
                                                                                                                   Auto hosted App



                                     Internal App
      *.app                           Promotion                      App Developer Site                   Web App #1

   File System                                               SharePoint Farm                                                                     Cloud
Apps : UI experience

                       Full page
                       Fully Immersive
                       (Mandatory)


                       App Parts
                       “Web Parts”
                       (Optional)


                       UI command extensions
                       (Optional)
Communication between
SharePoint and Apps
                                          OAuth

                             Client Object Model (CSOM)/REST          Pages (Clouded H App)
             Lists /
             Libs /
             Webs      JavaScript Client Object Model (JSCOM) /REST
                                                                      Pages (SP Hosted App)



             Lists /                                                    Web Services
                                 Remote Event Receiver
              Libs


  Host web                                                        App web
What’s covered in the new
CSOM/REST APIs?
SharePoint 2013 Remote API


                    _api is new alias for _vti_bin/client.svc

   Server
   Client   REST                             CSOM
            OData
            JSON
                          JavaScript       Silverlight          .Net CLR
                            Library          Library             Library



                             Custom Client Code
REST or CSOM ?


REST is not just for CRUD
operations anymore
                                I use REST for
                                cross platform
                                code              By default I
Beware:                         (IOS/Androïd,…)   stick to CSOM

NO BCS           NO managed
manipulation     metadata
with REST        manipulation
What you won’t be able to do with apps :


                                         Custom action
                                         groups &
                           Custom        custom
         Timer jobs        definitions   hidings




         User              Delegate
         controls(.ascx)   Controls
Apps for Office
New architecture, web based




                    HTML5,              Small footprint :
                    JavaScript, CSS3,   run in the          in a secure app
Apps for office :   XML, and REST       browser (even in    runtime
javascript api      APIs                Rich Client)        environement
Office App     Office Web App

Task Pane     Excel          Excel
              Word
              Project



Content App   Excel          Excel


Mail App      Outlook        Outlook
What is Napa ?



  Great way to
  start builing
  SharePoint &     No need to       All you need is
  Office apps in   install Visual   an Office 365
  the web          Studio           Account
JavaScript everywhere
(not just apps)
SharePoint Designer



2010                                            2013
                               Data View Web
                               Part was based                   JS Link replaces
Could display   Designing      on XSLT ->       No Designer    the Data View
SharePoint      Master Pages   code too         (except for     Web Part (kind
Pages           was possible   complicated      Workflows)      of)
Can also be used in Custom fields :
Web Content Management
Majors WCM Improvements in SP2013
Designing Master Pages




Problems in previous versions of SharePoint

                      Pure Designers
Master pages work     (people) don’t want to   The Design
very well, but much   mess up with             MANAGER is your
too complex           SharePoint !             new friend 
Workflows
SharePoint 2013                   Workflow Manager




           SharePoint 2010                    SharePoint 2013
              workflows                          workflows




 Windows Server      SQL Server   Windows Server      SQL Server
SharePoint 2013 and Workflow Service

                                                                                                                       Access Control
                                                                     SharePoint
                                                      Events   Content    People   Sharing     2010 WF
                           SharePoint Designer 2013
      Visual Studio 2012




                                                                                                                           OAuth

                                                                         _API (REST OM)                                                  Workflow
                                                                                                                                         Manager
                                                                 Workflow Services Manager

                                                                  Instances         Interop




                                                                                                     Workflow Client
                                                                                                                                        Service Bus
                                                                 Deployment        Messaging


                                                                WF Service Application Proxy
Workflow topology

                SP Farm 1


                            Workflow Client


                                                         Workflow Cluster




                SP Farm 2



                                              •   Each SP farm targets a different Workflow Manager scope
                            Workflow Client
SharePoint Designer Workflows :
new features
Conclusions
Key Takeaways
         Create
                        Apps cannot     Focus on the
      Apps, includin
                       do everything      client api
      g Office Apps


                                           WCM
         Javascript is everywhere
                                       Improvements



            New workflow platform : SPD is king
Thank You !

     http://sergeluca.wordpress.com/
     sergeluca@hotmail.com

Deep Dive SharePoint 2013: Developing applications in SharePoint 2013: forget the past?

  • 2.
    Developing applications in SharePoint2013: forget the past? Serge Luca
  • 3.
    Who Am I? Serge Luca SharePoint Business Unit Manager @ICT7 SharePoint MVP Co-author of 2 incoming books on SharePoint 2013 sergeluca@hotmail.com
  • 4.
    Related sessions “Deep Dive SharePoint2013: “Deep Dive “Deep Dive SharePoint App SharePoint 2013: SharePoint 2013: development Accessing SharePoint App Fundamentals “ SharePoint data “ Security”
  • 5.
    What’s new fordevelopers in SP 2013
  • 7.
    Agenda Apps for Apps for SharePoint Office JS Link WCM Workflows Conclusions
  • 8.
  • 9.
    Problems with customcode (Very) expensive upgrades to Stability new versions of SharePoint Code runs with the Do you really believe that identity/permissions of a sandboxed solution cannot specific user perform attacks ? The upgrade feature story is not clear for many dev (feature versioning or assembly versioning…)
  • 10.
    Upgrading to anew version of SharePoint ?
  • 11.
    SharePoint App Model: past, present, future…
  • 12.
    Apps Architecture Provider-Hosted App SharePoint Your Hosted Web Cloud-based Apps “Bring your own server hosting infrastructure” Site Get remote events from SharePoint Use CSOM/REST + OAuth to work with SP Autohosted App Windows SharePoint Azure Web Windows Azure + SQL Azure Websites provisioned invisibly as apps are installed SharePoint-Hosted App Parent Web Provision an isolated sub web on a parent App Web web • Reuse web elements (from (lists, files, out-of-box web parts) WSP) • No server code allowed; use client JavaScript for logic, UX
  • 13.
    Apps lifecycle Catalogs Mngt Licences Mngt Tenants Mngt Perms Mngt Provider Monitor Apps hosted App External Web Site (IIS ?) Apps Service Application SP hosted App Authorized App Delegation *.app download Public app store Cloud Azure Web Site Auto hosted App Internal App *.app Promotion App Developer Site Web App #1 File System SharePoint Farm Cloud
  • 14.
    Apps : UIexperience Full page Fully Immersive (Mandatory) App Parts “Web Parts” (Optional) UI command extensions (Optional)
  • 15.
    Communication between SharePoint andApps OAuth Client Object Model (CSOM)/REST Pages (Clouded H App) Lists / Libs / Webs JavaScript Client Object Model (JSCOM) /REST Pages (SP Hosted App) Lists / Web Services Remote Event Receiver Libs Host web App web
  • 20.
    What’s covered inthe new CSOM/REST APIs?
  • 21.
    SharePoint 2013 RemoteAPI _api is new alias for _vti_bin/client.svc Server Client REST CSOM OData JSON JavaScript Silverlight .Net CLR Library Library Library Custom Client Code
  • 22.
    REST or CSOM? REST is not just for CRUD operations anymore I use REST for cross platform code By default I Beware: (IOS/Androïd,…) stick to CSOM NO BCS NO managed manipulation metadata with REST manipulation
  • 23.
    What you won’tbe able to do with apps : Custom action groups & Custom custom Timer jobs definitions hidings User Delegate controls(.ascx) Controls
  • 24.
  • 25.
    New architecture, webbased HTML5, Small footprint : JavaScript, CSS3, run in the in a secure app Apps for office : XML, and REST browser (even in runtime javascript api APIs Rich Client) environement
  • 27.
    Office App Office Web App Task Pane Excel Excel Word Project Content App Excel Excel Mail App Outlook Outlook
  • 29.
    What is Napa? Great way to start builing SharePoint & No need to All you need is Office apps in install Visual an Office 365 the web Studio Account
  • 31.
  • 32.
    SharePoint Designer 2010 2013 Data View Web Part was based JS Link replaces Could display Designing on XSLT -> No Designer  the Data View SharePoint Master Pages code too (except for Web Part (kind Pages was possible complicated Workflows) of)
  • 34.
    Can also beused in Custom fields :
  • 35.
  • 36.
  • 37.
    Designing Master Pages Problemsin previous versions of SharePoint Pure Designers Master pages work (people) don’t want to The Design very well, but much mess up with MANAGER is your too complex SharePoint ! new friend 
  • 41.
  • 42.
    SharePoint 2013 Workflow Manager SharePoint 2010 SharePoint 2013 workflows workflows Windows Server SQL Server Windows Server SQL Server
  • 43.
    SharePoint 2013 andWorkflow Service Access Control SharePoint Events Content People Sharing 2010 WF SharePoint Designer 2013 Visual Studio 2012 OAuth _API (REST OM) Workflow Manager Workflow Services Manager Instances Interop Workflow Client Service Bus Deployment Messaging WF Service Application Proxy
  • 44.
    Workflow topology SP Farm 1 Workflow Client Workflow Cluster SP Farm 2 • Each SP farm targets a different Workflow Manager scope Workflow Client
  • 45.
  • 49.
  • 50.
    Key Takeaways Create Apps cannot Focus on the Apps, includin do everything client api g Office Apps WCM Javascript is everywhere Improvements New workflow platform : SPD is king
  • 52.
    Thank You ! http://sergeluca.wordpress.com/ sergeluca@hotmail.com

Editor's Notes

  • #2 Hello, welcome to this presentation on SharePoint 2013 presentation for developers; I hope that you enjoyed the TechDays so far.This presentation is the second presentation of SharePoint 2013; in the previous presentation danholmes ;In my presentation I will show you (with a lot of demos) what the most important topics that have been improved in SP2013 in the development point of view.
  • #3 It is important to keep in mind that my presentation will be followed by 3 other presentation from LievenIliano There will be of course some overlaps, but Lieven will get deeper into some topics I’ve covered
  • #4 The are plenty of new or improvedfeatures in SP2013 for devs : a new app model (->yesyoushouldalmostforgeteverything), a new featurecalled Client siderendering, wherejavascriptplays an important role, creating master pages nowiseasierwith a new toolcalled Design Manager, the client api has been improved and extended (both the CSOM and the REST), the sreversideobject model has also been improved, wecan have remotereceievers (eventhandlers), where web service willbeinvokedwhen a eventistriggered,Dsiplaytemplates, Jslink, a new workflow pltaformwhere SPD isking, youcancreate real & robustappswith Access 2013 and a new featurecalled Minimal downloadstartegythatimproves the user experience by downloadingonlywhat’snecessary on the SP page.
  • #6 In SP2007 code (like web part) ran on the server; if the code wasbadlywritten the farmwas in danger; moving to anotherfarmwasverydangerousbecauseevery customisation has to betested.In SharePoint 2010 MS introduces SP in the cloud (aka SharePoint Online) as part of O365 and also the Client object model (CSOM and REST); to be able to run the customisation in the cloud (and in the cloud the farmwasshared), the code had to run in a veryprotectedenvironementcalled the sandbox : in the sandbox the functuonalitieswheremuch to limited and moreover the code ranwith the user permission (elevatedprivilegewas impossible).In SP2013 a new model call « App » isprovided, where no SP server side code runs in SP anymore; Client side code isused all the time; if server sideisusedit mus run in another (non SP) server like an asp.net server, php server etc…More details in Lieven session
  • #7 2 types of apps = SharePoint hostedapps : when the appsisinstalled in a SP web site a child site iscreated in SP just for the app; the appcan do whatevereitwants in hisinternal web site. Onlyjavascriptwillbeused; code caninteractwithsp by using CSOM or REST SP api.Cloud basedapp : code runs in another server2 variants :Provider hostedapp : youbringyourown application serverAutohosted : the server side code (including asp.net page thatwillbeloaded in SP Iframe) isprovided in Azure and isautomaticallycreatedbehind the curtain.More details in Lieven session
  • #8 Apps mean « Store »There are 2 stores A public store : « marketplace »A corporate store: « appcatalo »A new service application thatwill manage the licences, the app monitoring, the permissionsMore details in Lieven session
  • #9 Whatdoes an app looks like ?
  • #11 Start Sharepoint ManagerGo to ict7\\contosoDemonstrate the partner web site show the corporate news appCreate an appfrom scratch & describeit, deployitmanually to the appcatalog (show the appcatalog)Show appwebswith SharePoint ManagerDeploy to catalog, explaincatalogIllustratecorporate news code
  • #12 Create an Hello world app ->azure http://msdn.microsoft.com/en-us/library/fp179886.aspxIllustrate Access Service appExplaintokens p116 Contexttoken, Refreshtoken, Access Token, Authorizationtoken ?
  • #13 Create a basic accessapp, on premise & O365
  • #16 Wecancreateapps for SP, but wecanalsocreateapps for Office; thereis a new framework
  • #17 Create a basic accessapp, on premise & O365
  • #19 Microsoft has tremedouslyimprorved the workflow platform in SharePoint 2013.There are actually 2 workflow platforms : the old one (the one present in SP2010) isstillthere and allowyou to runyourold workflow if youwant.And you have the new one; thismeansthatwecan have 2 catgories of workflows in SP2013 : SP2010 workflows and SP2013 workflows. A wSP2013 workflow canstart a SP2010 workflow.
  • #20 Let’s focus on the new platform : itiscalled Workflow Manager and isactually the workflow platformusedcreated for Azure, soitisveryscalable and robust.This platformrun on Premise, or if you running workflows in O365 your workflow willrun in on a platform on premise.As you notice, itis not part of SharePoint anymoren and the service bus manages the communication between the workflow manager and the sharepointfarm. There is a client side component call Workflow service manager.
  • #21 The new platformallows new scalable topologies liketis one wherewe have several SharePoint famrs sharing a workflow farm in cluster.