Why I'm leaving the LAMP stack and embracing the MERN stack

"Hi my name is Eric and I build websites."

I've said that to people for years. From the time I started web development I've been a LAMP (Linux, Apache, MySQL, PHP) stack developer. I've built well over 20 enterprise-level Drupal and Wordpress sites in addition to coding hundreds of thousands of lines of custom CSS and UI JavaScript. My entire professional life has been a back and forth between the front-end and the LAMP stack - getting pretty good at both but never mastering either. As the years have gone by I've gravitated towards the front-end but I've always maintained that I'm a true full LAMP stack developer - while never really mastering either the front-end or the back-end.

I _am_ good at "building websites." But companies like SquareSpace and Shopify are automating these skills and making me obsolete. In staying on the LAMP stack I have been holding on to an old and dying format. By teetering in the middle I was spearheading my own demise. To evolve I had to update my skills. I had to ditch what wasn't working and master what I really loved.

Today I'm officially ditching the LAMP stack and finding something new. This is the start of my journey into being a web application developer. I'm tackling this from the point of view of an expert and a complete novice. This is humbling and embarrassing and completely necessary for me.

"Hi my name is Eric and I build web apps."

My journey began 6 months ago when literally all I knew was that I needed to learn a front-end framework in order to update content on a Drupal site better. That led me to a standoff between either React or Angular (Vue wasn't much of a thing yet). After crunching some numbers, I found the general consensus was that React has more top-level tech companies using it. It was settled, I was learning React.

In order to learn React you need to know ES6/ES2015 and JSX. Uh oh. So the new first thing I had to do was to learn ES2015. Then I quickly moved on to learning React along with Webpack and Babel. I was quickly overwhelmed. I didn't even know what a router was. I didn't understand what an MVC was. I was trying to grock React before really grocking the stack. So I backed up. Way back. I had to understand the stack.

My new stack.

I have slowly fallen in love with JavaScript and after learning ES2015 I have been pushing myself to become an expert in it; I knew my stack would have to be full-time JS. So I chose Node.js for the backend.

And, the web framework that you use for Node is Express.js.

Then the database. Since I'm starting anew, I want to get away from rigid SQL databases and go with the most JavaScripty looking NoSQL option available: MongoDB. I'm going to love throwing JSON objects at it. After doing some cursory research on it, I'm absolutely loving it compared to relational databases. Bye-bye MySQL, don't let the tables hit you on the way out.

The MERN stack.

I decided my first site would be to convert ericconstantinides.com from static HTML / Apache / JS to a Node / Express / JS site. I didn't want to involve any React or anything too intense just yet. I just wanted to get used to having a simple site up and running with my new stack. I converted most of the data to JSON and was able to get it working in a few days. That wasn't so bad!

I also decided that all of my personal websites will now be up and running on my GitHub account. I want people to know who I am and what I'm about. No more playing in the dark.

Where do I host? I use Digital Ocean for all my Drupal sites, but I wanted something specific for my new stack. I looked into AWS but it is too complex (for now) to get up and running right away. For the time being I decided on Heroku. They have a nice freemium model that is easy to get up and going (I ended up paying $7/month so that the site would have instant spin-up (good job, Heroku)).

My next project is a simple Node To Do app. I already had a front-end only To Do app but I wanted this one to be on a Node server, work with Mongo, and have a full RESTful API. There are a ton of tutorials that tell you how to do a RESTful API but it ended up being a lot more work than I had intended. In the end though, I'm very happy with it.

I'm putting this site in Node. This will be my honarary post. I'm making it dead simple and putting all the blog posts in markdown files. I found an NPM package marked which enables me to load in all of my posts.

Next up, React. Oh but first, Webpack.

For the first time in a long time I'm excited again about code. It's been a long time.