This is NOT the video/blog-post I wanted to make.
I’m building a SaaS app using C++ partially because it’s my preferred language, but also to see what it’s actually like. So many people say it’s a bad idea, and I wanted to put it to the test.
Of course I want to make a video saying that they’re wrong. C++ is great for SaaS, and every C++ developer should be doing it. But, that would be bad advice. For most SaaS startups, choosing C++ would be a poor business decision.
I’m still going to build my SaaS with C++. But, after doing this for a while I think it’s time to get real about what the risks and trade-offs are.
Using C++ for SaaS Looked Good, Until…
So, what changed my mind? Initially using C++ was looking good. Writing HTTP request handlers and doing database lookups felt easy, thanks to the Drogon web framework. I’ve used a few other frameworks, and it felt on-par in terms of ease.
There are two areas where C++ is lacking. First, it lacks the large ecosystem for web development that languages like Javascript and Go have. With Javascript you’ve got NodeJS, and even full boilerplates/templates such as ShipFa.st, which allow you to really kick-start your project. I’m solving this by writing my own web app foundation in C++
The second area is that no online service provides ready-made integrations for C++. And you’ll likely need at least a few of them.
Its these integrations that really change the equation. So far I’ve written three. Integrating with Postmark for email was easy. Getting WhatsApp authentication messages up and running was a bit of a pain.
Then there’s the most critical one of them all: payment processing. I needed Stripe integration. They have SDKs for multiple languages. There are even a whole collection of community maintained SDKS. Just not for C++.
Actually, there is now, because I wrote it. It’s called StripeKit C++, and all up it took less than a week to make.
Less than a week sounds good right? Everything I’ve said sounds pretty positive? What’s the problem.
Well, one week is still one week spent; on just one integration. And, now I’m the maintainer of an open-source Stripe integration.
How many more integrations will the app need? How many more extra weeks will I be working to fill in the gaps? And I’m doing this part time. In fact, that “less than a week” to build StripeKit C++ was spread over two brutal months, because life got crazy.
The cost-benefit equation has shifted…
You see, the one benefit key that C++ potentially provides is high performance. But when you’re building a startup, your biggest problem usually isn’t whether your application can handle a million users. It’s if you can even get 10 paying users. Does anyone even need what you’re building
So, you should be optimizing for learning, and you do that by building and launching fast.
Sure, as a C++ developer you would need to learn a new language and framework. But, if you’re already a competent programmer, then that shouldn’t be too hard. Weigh that against having to write and maintain all the boilerplate code and integrations yourself.
If all you need is Stripe, email, and maybe one other integration, then maybe C++ is still worth considering. The case for using C++ would be even stronger if you already have customers lined up who have pre-paid, and there was some other advantage to using C++.
For most SaaS startups, though, it just doesn’t make sense. Especially with AI coding assistants.
Why I’m Still Using C++ For SaaS/WebDev
Why am I still going to continue building my SaaS in C++ after saying all this? Because, I’ve already written a lot of the SaaS foundation code. I’ve paid the C++ SaaS tax already. I have a foundation that I can build multiple SaaS apps on.
I’m calling that foundation ZitaKit. I originally called it ZitaForge, but then discovered an AI company using the name ZetaForge (with an ‘e’ instead of ‘i’). Confusion serves no-one…
Anyway, that’s why I’m going to continue building SaaS apps in C++, despite everything that I’ve just said. At least, for now. I can still change my mind later.
Of course, I’d love to see more SaaS apps being built in C++. That would mean more community supported integrations. However, I want you to be aware that it doesn’t make business sense for most early stage startups for the reasons I outlined.
That’s NOT the conclusion I wanted. It’s the conclusion that serves you best.