Latest Posts

SharePoint Programming

There are many ways to do coding and make custom applications in SharePoint. We will look widely used of them.

CSOM

  • The SharePoint .Net client-side object model (CSOM) provides access to the SharePoint object model from code that is running locally or on a different server than SharePoint.
  • You can use the SharePoint client object model (CSOM) to retrieve, update, and manage data in SharePoint
  • We have written some examples in CSOM, you can access them to have a better idea of implementation

JSOM

  • JavaScript Object Model (JSOM) is a great value addition for SharePoint development. The articles teach how you can use JSOM script in your application from Clint Browser itself.
  • You can use the ECMA Script Client Object Model (JSOM) to retrieve, update, and manage data in SharePoint.
  • With help of the Content Editor Web Part (CEWP) or Script Editor Web Part (SEWP), you can put the script on the page and interact with SharePoint.
  • You can refer to some ready-to-use JSOM examples for your application.

REST-API

  • Basic CRUD (Create, Read, Update and Delete) operations can be performed on various SharePoint objects using the Representational State Transfer (REST) interface provided by SharePoint. The REST interface exposes almost all functionalities provided by the other Client APIs.
  • REST API does not require any dll or JS library, as it is based on OData protocol, we can use REST API directly to interact with SharePoint.
  • You just need to use the appropriate endpoint URL and you can access/update SharePoint objects like Web, List, List Items, Groups, etc...
  • Please refer to REST API examples here.

Server Object Model

  • The Server Object Model is the most powerful amongst all. You can create custom solutions as per your requirement. The biggest drawback is that you cannot create a solution with the Server object model in SharePoint Online.
  • When you create a solution in the server object model, you need to package it as Farm Solution and deploy it in the SharePoint Central Administration site, which can be done only by your Farm Administrator.
  • As we need to deploy this on Farm-level there is a big risk of impacting other sites on the same farm and other components as well and because of that SECURITY RISK is there in the server object model.

PnP PowerShell

  • SharePoint contains a library of PnP (Patterns and Practices) PowerShell commands that can be used to perform complex operations on SharePoint objects.
  • These commands use CSOM internally and can be used in SharePoint on-premises as well as in SharePoint Online.
  • One of the advantages PnP PowerShell has that it reduces the code complexity to a good extent.
  • These operations can be executed from any windows machine that has Windows PowerShell 3.0.
  • Some PnP Powershell examples that you can refer

Sandbox Solution

  • Code-based Sandbox solutions are officially deprecated from SharePoint Online in 2014. Microsoft introduced Sandbox solution in SharePoint 2010 and now as code-based Sandbox is deprecated, Microsoft is emphasizing other options like SharePoint Hosted Add-in, Provider Hosted Add-In, Remote Event Receivers to use as alternatives.
  • We have briefly covered Sandbox Solution. You can take a look at the article to get the whole idea about it.

App (Add-in) Model

  • Microsoft SharePoint introduced the App model in 2013. Because of the App Model, we can now create custom solutions without the need to deploy them on the SharePoint server. SharePoint App is an individual piece of functionality.
  • SharePoint App (Add-In) doesn’t have any code that runs on the SharePoint server. All the custom code runs either in the cloud server or on the client machine other than the SharePoint server.
  • There are three ways we can host/deploy the Apps (Add-Ins)

SharePoint-Hosted app

  • The app is deployed to SharePoint Online only. It is very easy to deploy, and no extra server is needed. It provides built-in authentication.
  • The limitation with this is you can only work with client-side code as no server-side code is allowed in the SharePoint Hosted Add-In.

Provider-Hosted app

  • The app is deployed to an On-Premise server other than the SharePoint server. We can use server-side code in the Provider-Hosted app.
  • It needs OAuth integration when you are working with SharePoint data.

Azure provider-hosted app

  • We can use server-side code in this too and the server-side code is deployed on an Azure server instead of an On-premise client machine.
  • Customers can use Azure Infrastructure and platform services including Connectivity, Caching, Access control service (ACS).

SharePoint Framework – SPFx

  • Using SharePoint Framework (SPFx) we can easily work with SharePoint objects; data and we get full SharePoint development support. SPFx is available in SharePoint Online, SharePoint 2016 (Feature Pack 2), SharePoint 2019. We can create an SPFx solution and deploy it on the SharePoint page, but the good part is that it runs in the context of the current user and there are no iFrames for customization, scripts are directly embedded in the page.
  • The controls in SPFx are rendered on page DOM and are responsive.
  • SPFx also allows the developer to access the SharePoint page life cycle in the coding like render, load, etc...
  • You can use any JavaScript framework you like, and it is not bound to any particular one, like JQuery, REACT, Angular.
  • SPFx web part can be added in Classic as well as Modern SharePoint.
  • Setup your environment for SPFx development and after that start creating your first SPFx webpart

Power platform

  • Below mentioned three technologies are collectively called Power Platforms. The platform can be used with many technologies and NOT JUST WITH SHAREPOINT. But in the future, Power Platform is going to be the key technology to work with SharePoint.
  • PowerApps

    • Power Apps is a platform used for rapid application development. Even if you are not a Pro developer, you can use Power Apps and create your own application that can run on Mobile as well as on any browser on the desktop.
    • Some Power Apps tutorials

    Power BI

    • Power BI is a business analytics tool that can be used to present the data in an interactive visualization.
    • Power BI helps organizations to create their own dashboards, charts, and reports using which it becomes very easy to understand the company data and process.

    Power Automate

    • Microsoft flow is a service developed by Microsoft that can be used to create Automated Flows between the applications that you use. Microsoft flow supports more than 100 such applications.
    • Some Power Automate tutorials

We value your Feedback:

Page URL:

Name:

 

Email:

 
 

Suggestion:

 

SharePoint Programming
© 2024 Code SharePoint