Script Editor Webpart (SEWP) now Available for the SharePoint Framework #SPFx – Sort of

During the March 14th, 2017 SharePoint PnP Monthly Community Call, Mikael Svenson introduced a SharePoint Framework (#SPFx) webpart he recently created. Essentially, the SPFx webpart provides an immediate replacement of the current tool many of us have built a love-hate relationship with, the Script Editor Webpart (SEWP).

The March 2017 PnP release includes Mikael’s new webpart, one he is calling a “Script editor web part for modern pages built in React“. He created a wrapper within a SPFx webpart using React as the rendering engine to include/trigger our own custom JavaScript that can be embedded in the webpart, unique to each webpart usage.

How to Get Started

To learn more, check out the March 2017 Community call recording, or see the sample page directly at GitHub.

A joyous day or a moment of despair?

That is the question many are asking, and it spawned a good thread that I suggest you read. Pat Miller wrote a summary of his thoughts on an SEWP for the framework and even addressed why Microsoft didn’t include this already within the framework itself. My primary takeaway is that Microsoft does not want to condone the inclusion of custom JavaScript at the author level. That should be left to the developers where a consistent editing experience, with rails (ah, Microsoft, and their rails), may be maintained.

I get it. I can’t say I disagree, but unfortunately I also see why a SPFx webpart such as Mikael’s will be used by a great many SharePoint projects. I say “unfortunate” as I believe that with the power and customization ability the framework provides, any JS needed should be embedded by the developer directly in the code. I am not going to say I will never use a framework ready SEWP, nor do I admit that I wasn’t already tinkering with the idea of creating a similar webpart. But I would ask that in general, consider such a webpart in the new Framework world as one of your last options. It should not be your go-to Swiss army knife.

My Recommendations

As my buddy Stefan Bauer commented on Pat’s post, it is time to let the SEWP go. I would go further by comparing the SEWP with our dependence on the InfoPath. New processes will take its place and over time older “hacks” need to be moved out of our toolbox. Mikael’s webpart is going to be a crutch for many transitioning to the framework. I get it, but let’s learn and use the new technologies, and you will find you won’t need shims.

What are your thoughts? Have you already downloaded the webpart and pushed it to production? Or will you stay away from such a tool like the plague? Let me know.

Speak Your Mind

*


3 × three =