Getting started with SharePoint Development with Codex

Quite taken by Codex

My mate, and 5 x MVP, Chris Grist, doesn’t go in for SPFx development much. He’d rather spend his time in Power Platform, which is fair enough. Whenever he needed a custom web part (of any complexity), he’d usually send that work on to me. But I fear those days may be over ☹

You see, he’s been messing about with Codex which (in case you’ve been touring darkest Peru for the past year or so) is OpenAI’s advanced coding agent. The idea is that you just tell Codex what you want and watch the magic happen. It seems to be working for him and that got we wondering (and worrying) am I about to become unemployable, redundant, unnecessary – all the above?

I knew this AI stuff existed of course but have done my best to remain defiantly sceptical and block it from my mind set, as well as my tool set. Well, I can’t do that any more can I, not unless I want to pack it all in and become a crofter on a Hebridean island.

Nope, nothing for it. I need to reinvent myself again, just like I needed to when we moved away from C# server hosted solutions to wild west of JavaScript development!

Setting up an SPFx development environment

A few weeks ago, I posted a blog article on Setting up a development environment for the latest refresh of the SharePoint Framework SPFx (v1.22). It details the quite tricky and convoluted steps required to set up a development rig, before you can even cut your first code.

That got me thinking, that this might be a great first challenge I could set Codex. Maybe instead of reading my own blog post (I only write them so I can remember what to do next time) I could just tell Codex to go sort it out for me.

This is what I fed into Codex:

Text displayed on a Windows 11 virtual machine explaining the task of configuring a development environment for SPFx solutions for SharePoint, highlighting that VS Code is installed but other prerequisites like Node JS and the SPFx library are not.

And how did it do? Surprisingly well actually. It kept asking for permission to do things (install Node, Heft etc.) but that’s to be expected. By the end, Codex spat out this:

Configuration details for SPFx development environment including installed versions of Node.js, npm, Git, Yeoman, and global SPFx tooling.

The only step I needed to provide some extra guidance for was to install and trust the Dev certificate but the rest of it was pretty much plain sailing and for sure a lot faster, as I didn’t need to go hunting for anything.

By means of a smoke test, I provisioned standard React web part and then things got hairy for a while. It seems that the development tenancy I was using is not compatible with version 1.23 of the SPFx (what the ****!) but when I downsized to v1.22 (as suggested by Codex) everything went according to plan and my red-headed hairy Norwegian and the bespectacled lady with the hair needle showed up as expected.

A congratulatory message for Colin Gardner indicating the app is running locally as a SharePoint web part, with an overview of the SharePoint Framework (SPFx) and links for further development resources.

That incompatibility issue was nothing to do with Codex and in fact; after checking my configuration, it was Codex that recommended that I should revert to v1.22 and after I did that – everything was good.

And that’s as far as I want to go with this post. Next time, I promise I’ll share my experiences of using Codex to help me build something useful.

Should I be worried!

The jury is still out. I’ll let you know how I get on with helping me to something that’s production ready. If it lives up to expectations, then I envisage that it will be like having a highly skilled super-efficient development team at my disposal, day and night.

However, I don’t see myself as a ‘just’ a developer. I see myself more of an ideas man, a solution delivery expert or solution architect (take you pick). And can Codex (or any AI for that matter) replace that part of what I do? I don’t think so, not yet anyway.

What I am hoping is that tools like Codex or Claude will make my development cycles much quicker, meaning I can spend less time debugging and on tinkering with the fiddly stuff and more time on being creative. I have no shortage of ideas, but what I am short on is time to build, test, document and market them.

I tell you what does worry me though and that is when I come up with a good product idea, someone else is just going to swoop in rip it off. Traditionally, I’ve been protected from this, because the barrier to reverse engineering or rebuilding a solution has been sufficiently high as to keep marauders at bay.

But the way this is headed, I might come up with something cool, innovative and truly useful and as soon as it is discovered, someone else pulls it apart and gets their AI tools to rebuild their own version in an afternoon, effectively stealing my IP. And, because it only took him a day to do it, they can undercut me and steal my market as well as my ideas.

But aren’t there laws about IP theft, I hear you cry? We’ll I am not so naïve to think that the law will help. Whose law are we talking about in any case? Digital assets pay no attention to geographical borders, and I don’t have the means to litigate, and this is dodgy ground in any case. I mean if I wanted to build a new Word Processor, I’m sure that nobody could stop me on the grounds that they own the IP for Word Processing.

Hey, maybe that’s what I should do. Use Codex to build my own version of PowerPoint, Word and Excel and sell them for a $1 per seat per month – now that’s an idea!

The Air Traffic Controllers Tale

In a previous life, I was an officer in the British Army and some 20 years ago now, found myself sitting to next to kindly and elderly (or at least he seemed so at the time) American gentleman, on a flight out of Kabul. We got to talking and I naturally enquired as to his line of business, and it turns out he was an Air Traffic Controller.

When I delicately suggested that ‘wasn’t that a younger man’s game’, and he agreed but then explained than he, and his brethren, are a dying breed (literally I thought at the time) of ATCs that still know how safely land aircraft without radar. It seems that the Taliban had taken to blowing up radar installations around Kabul airport and the skills on which this gentleman was weaned were now deemed unnecessary to pass on to the next generation – why would we ever need to learn how to land planes without radar?

I can’t help but think that as we transition into a new era where we expect AI to build our software, but without really understanding how they do so, we might just be giving something up. Who needs to learn arithmetic or spellings when we have calculators and autocorrect?

2 thoughts on “Getting started with SharePoint Development with Codex”

  1. We’ve been having a great deal of success with Codex, Claude 4.7/4.8 and 5.0 (but banned now) to build SPFx. I have a small demo scheduled with this week’s PnP SharePoint call to talk about Vibe SharePoint. It’d be a bit late in our timezone but hopefully you can watch it next day.

    Good to see you. — John

  2. Hi John, thanks for reaching out and great to hear from you. I’ve come to the conclusion that I need to embrace this stuff and it’s no surprise to me that you’re 18 months ahead of the rest of us! I look forward to reviewing your PnP session.

    Cheers
    Colin

Leave a Reply

Scroll to Top

Discover more from Innovations in SharePoint

Subscribe now to keep reading and get access to the full archive.

Continue reading