JOIN OVER 3,000

Subscribers who get fresh content to help their business weekly...

Categories
Categories

What is SharePoint Framework(SPFx)

SharePoint framework is the most recent way of creating awesome client side webparts and extensions using open JavaScript framework or using normal JavaScript. This new model provides full development support for client side development, easy integration with SharePoint data and open source tools. With the ability of SharePoint framework, you will be able to use modern web technologies and tools for the development of full mobile responsive apps which is able to deploy to SharePoint very easily. Currently this version is available for SharePoint online and soon it will be also available for on-premises.

Features of SharePoint Framework

  • The webpart created by SPFx does not have any iframes in it, this will overcome the disadvantage of SharePoint apps having iframe.
  • The developer can choose his own development frameworks like React, Knockout, Handlebars, Angular and more.
  • This enables the developer to access the life cycle.
  • The tools are based on common open source client development tools such as npm, TypeScript, Yeoman, webpack, and gulp.
  • The performance is better and reliable.
  • This will run in the context of the current user.
  • The administrator have the ability to deploy the SPFx apps to different site collections in a single click.
  • There is no need to trust it even if it is deployed like SharePoint app.
  • SPFx webparts are compatible in both classic and modern pages.
  • SPFX webpart have very advanced property panel customization.

SharePoint Framework allow the developer to write codes in type script and they can utilize object-oriented programming techniques in writing their codes.

Why SharePoint Framework is important

SharePoint is available for end users as online and on-premises. While SharePoint is being used as an intranet portal by most companies, some companies still adopt it for their external websites too. In these cases users need additional webparts and customization which is not available by default in SharePoint. Since that customization capability was lacking, users were now customizing SharePoint with the help of different programming models using managed codes like C# and client side scripting like JavaScript, JQuery etc. Server side programming using managed code is acceptable in on-premises but this is not easy to maintain in online since multiple tenants are running side by side. So Microsoft completely removed the use of managed code in SharePoint online 2016 and they provided SharePoint app model and JavaScript injection for customizing SharePoint with both of them having their respective advantages and disadvantages.

Custom JavaScript code in script editor webpart or content editor is one of the widely used webpart in SharePoint online since it is very easy to create.

The disadvantage of this is that there is no option for developers to create additional property for these webparts, the script editor webpart is not easy to package and reuse, it is in a different page. A user with design permission can change the webpart code by editing the page and these webparts are not marked as safe for scripting. Hence, these webparts will be prevent running in the sites created from self service with no script feature enabled.

SharePoint app model have lots of advantages, the apps created using SharePoint app model will be fully isolated from the SharePoint web, so there is less chance of breaking the functionality due to the use of malfunctioning code and this will still be useful for creating advanced functional apps.

But the disadvantage of sharepoint apps is, they create an iframe to render the web app, this is not good for mobile compatible pages. The add-ins added in the on-premises pages with basic windows authentication will give continuous login prompts, and this can be fixed only in the same network using credential management feature of internet explorer or group policy management tools. But users who access the site outside the network will get the login prompt.

Conclusion

Most of the disadvantage of the old SharePoint development model can be avoided by the new development model using SharePoint framework. The development of new framework webpart can be handled using the Yeoman generator and Visual Studio code. This will make the development a lot easier and more productive.

Leave a Reply

Your email address will not be published. Required fields are marked *