Introducing TypeScript to our front end stack

I haven’t used TypeScript yet but I’d like to learn it so I wouldn’t mind seeing it in Silverstripe CMS.

I haven’t really been a fan of the gradual phasing in of React in the CMS though. It sounded good on paper, but now the docs are kind of fragmented (or missing) and things that used to work everywhere only work in some places. Here’s an example - developers expect File::getCMSFields() to get the CMS Fields (because it used to and the API still says it will), but actually a Factory is used for that now.

Another example - custom yml translations work for some modules, but for others you need to hack in some javascript.

Having the old and new co-exist makes it really hard to comprehend how things work in Silverstripe. Naturally that makes it hard to document as well. It also means that you often have to learn SilverStripe conventions and techniques a couple of times over - once for the old parts of the CMS and again for the new part. It feels like the barrier to entry to being a SilverStripe hacker keeps getting higher and I can imagine new users could get confused and overwhelmed pretty quickly with this melting pot of old and new tech and contradictory documentation.

Sorry, I know this is a rant and is going way off-topic. But personally I’d rather new conventions like this were introduced only in major versions and applied throughout the codebase, so there’s only one (right) way of doing things. I want new versions of SilverStripe to be as transparent and appealing to new developers as it was to me 10 years ago. I think for the project to thrive long term, making it an easy (read: consistent) framework to pick up for new users is more valuable than providing an easy upgrade path or regularly shipping new features in minor versions.

Surprised myself a bit with those answers. I think that having these dual systems in place has made me stop using either of them. I don’t want to do things the old way because I know it will be replaced at some point, and I don’t want to learn the new way yet because I can’t use it everywhere and it’s still marked as an experimental API.

4 Likes