Difference between PnP Core SDK and PnP Framework
Asked Answered
O

1

8

Today I read an article about the two PnP libraries "PnP Core SDK" and "PnP Framework".

PnP Core SDK seems to be a framework that is totally abstracting CSOM, Graph or REST Apis of SharePoint/Teams.
So I can just use the Pnp-Context and dont have to care anymore if Graph or CSOM is actually used in the background.
This makes sense to me.

But PnP Framework is also a new library and it provides still access to the actual CSOM context.
This confuses me, because I dont know how to behave now as a developer.

Should I use only the PnP Core SDK? And the PnP Framework only if I need the site provisioning engine?

Or can I use PnP Framework also for typical operations like "Creating sites", "Updating list items" etc.?

The article states the following differences between both libraries:

You might be wondering what the difference is between PnP Framework and PnP Core SDK. The PnP Core SDK is used by the PnP Framework and it’s been implemented with a mindset that is independent of CSOM of SharePoint. More and more new functionalities introduced in SPO are not necessarily available through CSOM; this was the impetus for Microsoft 365 PnP introducing a new SDK, which is under the cover of both PnP Framework and PnP PowerShell for some functionalities.

Yeah - but why do I still need Pnp Framework? This only explains what PnP SDK is...

Later he goes on:

After reading this content, you might ask yourself: “What should I use and when?”

If you are a SharePoint developer, used to working with CSOM, or if you have an already existing project built on top of PnP Sites Core and CSOM, you should rely on PnP Framework and start building modern solutions leveraging the rich set of extensions and utilities provided by the new PnP Framework library.

If you are a .NET developer, willing to create a new modern solution for SPO, start working with PnP Core SDK and enjoy consuming the Microsoft Graph and the SPO REST APIs with a high-level abstraction layer.

I am a SharePoint developer and also a .NET 5 developer. But this still does not answer my question.

When should I use PnP Framework? When the SDK?

For normal site, team, list, item operations etc. I could use the SDK and for the provisioning engine the Framework?
But is this correct?

Openandshut answered 22/2, 2022 at 14:15 Comment(0)
R
8

Should I use only the PnP Core SDK? And the PnP Framework only if I need the site provisioning engine? Or can I use PnP Framework also for typical operations like "Creating sites", "Updating list items" etc.?

You could probably just use PnP Core SDK, it depends, of course, on your needs BUT also for the missing parts you can still use PnP Core SDK since they have made it possible that for those parts you can just use the REST APIs through PnP Core.

I have been using PnP Core SDK in multiple integrations between our product and SharePoint. We have used it for e.g. creating sites, folders, folder access management groups/users, updating and creating list items etc.

As they mention here they are working on a transition which means PnP Core will be only SDK in the future and they are gathering all in it.

This library is the long term evolution of PnP Framework, we'll enable a phased transition from PnP Framework to PnP Core SDK without impacting PnP Framework users.

Unfortunately I don't have any information about the status of the "Provisioning Engine" but as they (again) mentioning here the transition will be done also for that.

As this transition will take quite some time and effort, we plan to gradually move things over from PnP Framework to the PnP Core SDK. Going forward PnP Framework features will move to the PnP Core SDK in a phased approach.

During those projects that I have been working with PnP Core SDK has really surprised me since it already provides tons of functionalities which makes it really powerful. Its a huge SDK and people who are working with it has done a great job (although the documentation needs a little more work, but its still better than many others on the market).

I hope this clarifies stuff a little for you.

Radioelement answered 13/4, 2022 at 14:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.