Are you an expert in SharePoint? Looking out for a new job switch?

Don’t worry, we’ve got the perfect solution for your job interview preparation.

A SharePoint Framework Developer is someone who uses .NET technology to construct SharePoint (SPFX) server portals. He is responsible for developing and maintaining the site, as well as ensuring that the existing portals are maintained on a daily basis. For development, Visual Studio is used. To get the position, you’ll need to know how to use Sharepoint,.NET, C#, and Java Script.

To assess a SharePoint developer this post guides you to the essential skills to look in for SharePoint developers, the Sharepoint framework interview questions, and how you can evaluate the candidates for their skills.

Apart from that, you can also check out our online assessment software that provides a variety of quality tests that you can use.

Below are the SharePoint online developer interview questions and answers which makes you comfortable to face the interviews:

Interview Question of Advanced SharePoint SPFx
  • What is WebPack? …
  • What is PowerShell.? …
  • What is bundling and Minification? …
  • How to optimize the SPFx WebPart? …
  • What is the difference between the local workbench and live workbench?
  • What is the default port number used by the local workbench in the SPFx?

SPFx Tutorial Part 3: Create, Overview of Solution Structure, Test, Debug & Deploy SPFx Webpart

Interview Question of Advanced SharePoint SPFx

Q1. What Are The New Delegate Controls In Sharepoint?

In Sharepoint, three New Delegate Controls have been Introduced for the purpose of displaying the new Top Suite bar (with links SkyDrive, NewsFeed, Sync, follow).

These Controls are :

  • SuiteBarBrandingDelegate delegate Control
  • SuiteLinksDelegate delegate Control
  • PromotedActions Delegate Control

Q2. What Are The Changes In Csom And Rest Based Apis?

Microsoft has improved both Client Side Object Model (CSOM) and Representational State Transfer (REST) based APIs by adding much-needed support for the Search, User Profiles, Taxonomies, and Publishing Object Model.Client.svc service is extended with REST capabilities and accepts HTTP GET, PUT, POST requests.

Q3. How Does An App For Sharepoint Requests Permissions To Access Sharepoint Resources?

An app for SharePoint requests the permissions that it needs during installation from the user who is installing it and then the developer of an app must request, through the app manifest file, the permissions an app needs.

Q4. What Is The New Spsecurityeventreceiver?

Sharepoint Introduces a Cloud App Model that enables you to Create apps. Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

Q5. What Are The Differences Between The Two Base Classes And What Are The Inherit Benefits Of Using One Over Another?

The difference is Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:

  • Cross page connections
  • Connections between Web Parts that are outside of a Web Part zone
  • Client-side connections (Web Part Page Services Component)
  • Data caching infrastructure

NET 2.0 WebParts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to using ClassResources for the deployment of said types.

Q6What Is The Gac?

The GAC stands for the global assembly cache. It is the machine-wide code cache that will give custom binaries place into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow the development code to do more than it was intended to do.

Q7. What Is Strong Naming (signing) A Web Part Assembly File Mean?

Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred to throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be used to register the component in various other places on the server.

Q8. What Are Safe Controls, And What Type Of Information, Is Placed In That Element In A Sharepoint Web.config File?

When you deploy a WebPart to SharePoint, you must first make it a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those will not be loaded and will throw an error.

In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the type name, and the safe declaration (whether it is safe or not). There are other optional elements.

Q9. What Is The Createchildcontrols() Method? How Can You Use It To Do Something Simple Like Displaying A Label Control?

The CreateChildControls method in WebParts is used to notify the WebPart that there are children controls that should be output for rendering. Basically, it will add any child ASP.NET controls that are called instantiating each control with its relevant properties set, wire any relevant event handlers to the control, etc.

Then the adding the method of control class will add the control to the controls collection. In the relevant WebPart render method, the EnsureChildControls method can be called (or set to false if no child controls should be called) to ensure that the CreateChildControls method is run. When using CreateChildControls it implies that your WebPart contains a composition of child controls.

In order to create something like a label control in Create, you would create a new label control using the new keyword, set the various properties of the control like Visible=True and ForeColor = Color.Red, and then use Controls.Add(myLabelControl) to add the control to the controls collection. Then you can declare EnsureChildControls in the Render method of the WebPart.

Q10. What Does The Rendercontents Method Do In An Asp.net 2.0 Web part?

The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since WebParts will output to an HTML stream. RenderContents is used to tell how the controls that are going to be displayed in the WebPart should be rendered on the page.

Q11. What Is The Webpartmanager Sealed Class? What Is Its Purpose?

The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsible for the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is known as the central class of the Web Part Control Set.

Q12. What Is A Spsite And Spweb Object, And What Is The Difference Between Each Of The Objects?

The SPSite object represents a collection of sites (site collection [a top-level site and all its subsites]). The SPWeb object represents an instance SharePoint Web, and the SPWeb object contains things like the actual content. An SPSite object contains the various subsites and the information regarding them.

Q13. How Would You Go About Getting A Reference To A Site?

C#
< view plain text >
SPSite = new  SPSite(“http:/server”);
SPWeb = SPSite.OpenWeb();

Q14. What Does A Spwebapplication Object Represent?

The SPWebApplication objects represent a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high-level operations, such as getting all the features of an entire Web Application instance or doing high-level creation operations like creating new Web Applications through code.

Q15. Would You Use Spwebapplication To Get Information Like The Smtp Address Of The Sharepoint Site?

Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplication collection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regarding the mail service such as the SMTP address.

Q16. How Do You Connect (reference) To A Sharepoint List, And How Do You Insert A New List Item?

C#

< view plain text >

using(SPSite mySite = new SPSite(“yourserver”))

{

using(SPWeb myWeb = mySite.OpenWeb())

{

SPList interview List = myWeb.Lists[“list insert”];

SPListItem newItem = interview List.Items.Add();

newItem[“interview”] = “interview”;

newItem.Update();

}

}

Q17. How Would You Loop Using Split Through All Sharepoint List Items, Assuming You Know The Name (in A String Value) Of The List You Want To Iterate Through, And Already Have All The Site Code Written?

C#
< view plain text >
SPList interviewList = myWeb.Lists[“listtoiterate”];
foreach (SPListItem interview in interviewList)
{
// Do Something
}

Q18. How Do You Return Sharepoint List Items Using Sharepoint Web Services?

In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node.

It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.

Q19. When Retrieving List Items Using Sharepoint Web Services, How Do You Specify Explicit Credentials To Be Passed To Access The List Items?

In order to specify explicit credentials with a Web Service, you generally instantiate the web service and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.

Q20. What Is Caml, And Why Would You Use It?

CAML stands for Collaborative Application Markup Language. CAML is an XML-based language that provides data constructs that build up the SharePoint fields, view, and is used for table definition during site provisioning.
CAML is responsible for rending data and the resulting HTML that is output to the user in SharePoint. CAML can be used for a variety of circumstances, overall is used to query, build and customize SharePoint-based sites.
A general use would be building a CAML query in a SharePoint WebPart in order to retrieve values from a SharePoint list.

Q21. What Is Impersonation, And When Would You Use Impersonation?

Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, wouldn’t be able to access or execute something.

Q22. What Is The IDesign Times Html Provider Interface, And When Can You Use It In Webparts?

The IDesign Times Html Provider interface uses the function GetDesignTimeHtml() which can contain your relevant render methods. It was helpful to use in 2003 since it allowed your WebPart to have a preview while a page was edited in FrontPage with the Webpart on it because the GetDesignTimeHtml() method contains the HTML for the designer to render.

Q23. What Are Webpart Properties, And What Are Some Of The Attributes You See When Declaring Webpart Properties In Code?

WebPart properties are just like ASP.NET control properties, they are used to interact with and specify attributes that should be applied to a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable. Although most of these properties come from the System.Web.UI.WebControls.WebParts class, ones like Category come out of System.ComponentModel namespace.

Q24. Why Are Properties Important In Webpart Development, And How Have You Exploited Them In Past Development Projects? What Must Each Custom Property Have?

Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or write any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.

Each custom property that you have must have the appropriate get and set accessor methods.

Q25. What Are Classresources? How Do You Reference And Deploy Resources With An Asp.net 2.0 Webpart?ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wp resources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.

Q26. What Is A Sharepoint Solution File? How Does It Differ From Webpart.cab Files In Legacy Development? What Does It Contain?
A SharePoint solution file is essentially a .cabinet file with all a developer’s custom components suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution: allows deployment to all WFE’s in a farm is highly manageable from the interface allowing deployment, retraction, and versioning Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.

Q27. What Is A .ddf File And What Does It Have To Do With Sharepoint Solution Creation?

A .ddf file is a data directive file and is used when building the SharePoint solution bundle specifying the source files and their destination locations. The important thing for someone to understand is that the .ddf file will be passed as a parameter to the MAKECAB utility to orchestrate the construction of the SharePoint solution file.

Q28. What File Does A Sharepoint Solution Package Use To Orchestrate (describe) Its Packaged Contents?

The solution Manifest.XML file.

Q29. What Deployment Mechanism Can You Use To Instigate Code Access Security Attributes For Your Webparts?

SharePoint solution files can add in order to handle code access security deployment issues. This is done in the element in the SharePoint solution manifest.XML, which makes it easier to get assemblies the appropriate permissions in order to operate in the bin directory of the web application.

Q30. What Is A Sharepoint Feature? What Files Are Used To Define A Feature?

A SharePoint Feature is a functional component that can be activated and deactivated at various scopes throughout SharePoint instances, such as at the farm, site collection, web, etc.

Features have their own receiver architecture, which allows you to trap events such as when a feature is installing, uninstalling, activated, or deactivated. They are helpful because they allow ease of upgrades and versioning.

The two files that are used to define a feature are the feature.xml and manifest files. The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.

Top 3 SPFx Interview Questions

What are the recommended development languages for building SPFx web parts?

Typescript should be used as the language of choice for building SPFx web parts. As far as development frameworks are concerned, React.js is best suited for the development of SPFx web parts as there are pre-build templates available as well as various controls like the Office Fabric UI React components for developers to start using.

How do I communicate with the SharePoint in SPFx web parts?

If you use the Yeoman templates, there is a context object already set up for you which allows you to start using it right away and make the REST calls to SharePoint to perform basic SharePoint operations.
The limitations of these calls are the same as that provided by SharePoint hosted add-ins. Any operation that needs to be executed beyond these can be done using Provider Hosted Add-in based web services.

What is the use of Office Fabric UI?

The Office Fabrice UI library provides a rich set of components that can be used in SPFx web parts. A complete list can be found here. Some of the important ones are People Picker and Dialogs.

Can I use Angular with SPFx?

Angular can be utilized through SPFx web parts although angular templates are not yet available for SPFx and thus setting up angular for use using SPFx takes are little bit more effort.

How can two web parts communicate with each other in SPFx?

SPFx is eventually supposed to introduce the concept of part-to-part communication which is not yet available. For now, you can use other JavaScript component communication techniques like callback functions, event bubbling or the ones used with React such as the Flux architecture.

You may like our other articles as well

Disclaimer: We did not own these questions, we also copied it from internet.

In the next article we will share more of Bill’s and Vesa’s answers, this time related to developer tooling that supports building SharePoint Framework solutions. Meanwhile, if you have any more questions related to SharePoint Framework capabilities please don’t hesitate to ask using the comments and we will try to get you an answer.

Recently we had the pleasure of hosting two webinars introducing the SharePoint Framework – a new model for building SharePoint customizations. Bill Baer and Vesa Juvonen from the Microsoft SharePoint Product Group presented the vision behind the SharePoint Framework and how it will help organizations build modern SharePoint solutions.

With SPFx now considered one of the most popular extensibility points across Microsoft 365, and SPFx being the only way to extend the modern platform, SPFx Pre-built applications are now available in Microsoft AppSource. The Rencore Code App Analyzer is one such free application publicly available for admins and platform owners to identify and understand application architecture.

During the webinars you asked Bill and Vesa over 200 questions! While they couldn’t answer all of them during the webinar, we promised you to follow up on them. Following is the first set of questions related to the SharePoint Framework and Bill’s and Vesa’s answers. In this articles series we will share more questions and answers on the topics:

Waldek is a Cloud Developer Advocate at Microsoft focusing on Microsoft 365. In this role, he helps developers build applications on top of Microsoft 365. Hes also a part of Microsoft 365 Patterns and Practices where he builds developer guidance and tooling for extending Microsoft 365 together with the community. Before joining Microsoft, Waldek was heading the Product Department at Rencore reinforces our product development by adding loads of business experience. For sharing his experience through his blog, speaking, and social media, Waldek was a 12-time Microsoft MVP.

FAQ

Why do we need SPFx?

Runs in the context of current user. Gives controls to access the lifecycle of the SharePoint Framework webpart (component) (Init, render, load, serialize, deserialize, configuration changes and many more) No dependency on underlying Framework. You can use any framework like React, Angular, Knockout and more.

What is SPFx extension?

The SPFx is the recommended SharePoint customization and extensibility model for developers. Due to tight integration between SharePoint Online, Microsoft Teams, and Microsoft Viva Connections, developers can also use SPFx to customize and extend all of these products.

What is SPFx solution?

SPFx Extensions are available in all Microsoft 365 subscriptions for production usage. SPFx Extensions enable you to extend the SharePoint user experience within modern pages and document libraries, while using the familiar SPFx tools and libraries for client-side development.

Related Posts

Leave a Reply

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