Just setting up my $5 VPS on Digital Ocean droplet.
PHP, SQLite, here I come!
Not gonna lie, it’s still scary venturing into unfamiliar territory. I’m a JavaScript dev. Cut my teeth on Vue.js, then Nuxt.js. Mostly avoided wrangling with backend by using headless CMS Strapi, which is similar to Node.js but with more abstraction and scaffolding. Deployed that with PostgreSQL on Heroku, so I didn’t need to think much about dev ops. My coding journey so far is one focused on offloading everything to frontend as much as I can.
I tried to avoid having to do anything backend for the longest time, but there comes a time when I can’t avoid it no longer, if I want to progress on my goals of shipping fast and building long-lasting apps. I wasted so much time searching for a solution, which on hindsight, now feels like procrastination.
Getting into PHP and backend is scary yes, but I think I know how to manage that fear by now. Something I learned from the past few years of not knowing how to do something, but just figuring out anyway. Everything is figureoutable. Yes it’s unfamiliar territory but not uncharted. PHP and SQLite had been around for ages, and there’s lots of communities and resources online that can help. AI makes a huge difference now.
But maybe you’re thinking… “But why? Why PHP and SQLite?”
So the dream tech stack I’m trying to get to from learning PHP and SQLite:
Frontend: Just plain HTML, CSS, JS with sprinkle of Vue for interactivity. For bigger SaaS, maybe Nuxt.
Backend: PHP to run API endpoints for frontend to consume.
Database: SQLite for database.
Hosting: A VPS, like Digital Ocean.
CDN: Cloudflare.
Why I chose this stack:
Sanity and stability. Basically I just want to be able to deploy something and not touch it for say 10 years and it still runs, and I can still edit it without having to update dependencies or need build step.
Decoupled front and backend. I like this approach. I’m more of a frontend dev, so I can do the changes on frontend without really touching much of the backend
Long lasting. I’m tired of the Javascript ecosystem circus. Especially all the shiny new frameworks, Node and npm and packages and dependencies. Forever beta. So using PHP and SQLite will bring some stability and longevity to my code.
Backward compatibility. This is why I chose PHP over Node.js, even though I’m more comfortable with JS. Less major breaking changes, and with focus on backward compatibility, my apps can last long without worrying that I can’t even start the app.
Lightweight. SQLite is lightweight but performant, and making a comeback now.
Cheap to host. Digital Ocean and Hertzner are cheap to host, for long lasting apps. Scaling is cheaper too, compared to surprise bills from new cloud providers like Vercel and Netlify.
So something solid, stable, emphasizes backward compatibility, doesn’t update too often, and zero to minimal breaking changes every update. So between PHP, Laravel, Rails, I did some research and ended up with timeless technologies like plain HTML, CSS and Javascript, PHP and SQLite.
Getting there… soon!