Why I chose MERN (MongoDB, ExpressJS, React, and Node.js) stack for Twos
by Parker · 31 things on NewTwos
- This story was inspired by a friend who just started learning web and mobile app development so I thought it would be useful to share.
- Background
- I first started building Twos: an app and website that helps you remember *things* in 2015.
- I was studying computer science at Vanderbilt University, but I had zero experience in web and app development.
- We were learning the fundamentals of programming, but I had no clue how to put it all together into an application.
- I started watching a lot of online tutorials and researching the best technologies to build a web and mobile app.
- Here is the list of technologies I chose to use and why.
- MongoDB (database)
- I chose MongoDB as our database because I read good things about the flexibility and performance of non-relational databases.
- I was learning about relational databases (SQL and MySQL) in college and they were more complex.
- I used mLab for hosting, which has now become MongoDB Atlas.
- Node.js (server)
- I chose Node.js because asynchronous servers were a hot topic at the time. They performed well (still do) and I was learning JavaScript to practice with basic web development.
- A JavaScript library was easier to pick up rather than learning Ruby, Java, Python, Closure, or Elixir in parallel.
- ExpressJS (routing)
- I chose ExpressJS because it was also a JavaScript library and pairs well with Node.js.
- React (front end) (originally AngularJS)
- I originally chose AngularJS because it is JavaScript framework, was hot at the time (Angular 1, I think they are on Angular 14 now, 😂), and it is backed by Google.
- I switched to React mainly for React Native.
- The first version of the Twos mobile app was a wrapped web application using Apache Cordova. It was not good.
- I wanted more of a native feel and a lot of hype was starting around React and React Native so I thought it would be a good transition (it was wonderful).
- Other (domain and server hosting)
- For domain hosting, I use Google Domains. They make it super simple to buy and configure domains and I like Google.
- For server hosting I use Heroku. Heroku is super easy to set up and is free for a long time. I still have websites that use their free hosting. For their basic paid tier, it is $7/mo so once you’re ready to launch, it can still be cost-effective and performant!
- High-level
- Since I was just starting out, I wanted to keep things as simple as possible. I was learning JavaScript so using all JavaScript libraries and frameworks optimized for practice and speed.
- I wouldn't change a thing.
- Thank you
- Thank you Jack for the great question and your curiosity and drive to learn web and app development.
- Thank you to you, the reader, for reading this story.
- I wish you both all the best and if you have any questions, drop a comment and I'll be happy to answer them :).