The PHR Stack and the Uprise of Services

by Aleksandar Pavlov

5 min read

The PHR stack, or as we commonly know it, the “Probably Has Regrets” stack, consists of building websites using the fabulous headless CMS Prismic.io, hosting it on the amazing Heroku, and paying for expensive React developers! 

Bollocks! You can use PHP instead of React! Or JS, or any other language! 

True! But then the stack would’ve been PHP or PH (whatever), but not PHR, right?! Well, unless it’s Ruby the one you were going to use… in that case, that’s fine.

But that’s enough losing time, let’s get to the real part. 

What is Prismic.io? 

Prismic.io is a headless CMS offered as SaaS (Software as a Service), with the Headless meaning that it has no front end attached to it, so the content is accessible only by leveraging the API, and SaaS meaning you have no control over what’s going on it.

It has a good support service, so they are going to address any issues you might have, but if something is not achievable, then it’s just not, and you should change CMS. 

The upsides of this approach are many, ranging from not having to care for updates, to having somebody else fixing the bugs, and all of that starting with a free tier. 

Prismic.io has Custom Content Types that can be of two types:

  • Repeatable, and
  • Single Types

The Repeatable ones are meant for blocks of repeatable content, like Posts and Articles, while the Single ones are mainly for pages that have specific layout and are not re-used. 

Other than that, Prismic.io offers a good changelog history that allows you to rollback any data that has been changed in the past, making it reliable and granting some peace of mind to the Content Writers. 

The last thing Prismic.io offers is a Preview of the content before it is published. Not much to say about this feature, it’s a must-have for all the CMS.

All of the above points expose what Prismic.io offers, and why you should consider it, but let’s talk tech here! 

What Prismic.io offers the developers is an extensive and very well documented guide about how to integrate their API. They require a different setup for every technology you plan to use, so be sure to check out the guide here.

What is Heroku?

In a few words: It’s a hosting provider. 

In other words, It’s a PaaS (Platform as a Service) that allows you to host your apps on it. It takes care of many problems that you might have, leaving you free to write code that works. You don't have to think about how to install the SSL, force the redirection, load balance the requests, configure apache, and so on. 

Heroku offers you different containers for different app environments. You can have your staging and your production on different containers, which is pretty good if you tend to write commands like ‘rm -rf /’ from time to time on the server.

Another amazing feature Heroku offers is the CI/CD integrated with GitHub. You can have different branches linked to different containers so that when you push changes on those branches it kicks in the deployment automatically. This requires almost zero setups if you want to use it plainly, otherwise, you can trigger the deployment manually by pressing a button.

The amazing features don’t stop here! Heroku offers Add-on, which improves the containers with load balancers, error reporting, SDK tools, DBMS, and much more! This is exceptionally good if you want to use any technology but you don’t want to deal with the whole setup process. How?

Let’s say you use a relational MySQL database and you need MySQL installed on the container. Normally, you should log in, run the command line, install it, configure it, check it, and make sure it runs. If you have slow queries it might get killed by the server due to the process taking too many resources. 

Well, in Heroku, you just install the Add-on, access it, upload the DB. Neat, right?!

Heroku has a free SSL starting at the smallest paid package. 

I do recommend checking it out!

Finally! We get to React!

Yeah, I’m not going to do that here….

Wait… What?!

Come on! It’s React! All you have to do is click here!

Final Say

Today we live in a world where services are provided to us to simplify the development process, delivery time, reliability, and minimize the headache developers have when it comes down to tasks that are out of our scope.

But do you support/endorse these services?

I sure do! You can be the best developer in the world, but if your car is leaking fluids, you are going to bring it to the mechanic, right? Or, you can attempt to fix it by yourself.

Let me know how that goes!

FAQs

Q: What is Prismic.io

Headless CMS offered as SaaS (Software as a Service), with the Headless meaning that it has no front end attached to it, so the content is accessible only by leveraging the API, and SaaS meaning you have no control over what’s going on it

Q: What is Heroku?

It’s a PaaS (Platform as a Service) that allows you to host your apps on it. It takes care of many problems that you might have, leaving you free to write code that works. You don't have to think about how to install the SSL, force the redirection, load balance the requests, configure apache, and so on.

Aleksandar Pavlov
Aleksandar Pavlov
Senior Software Engineer

Aleksandar is a full-stack engineer with over 8 years of experience in the industry. Over the years, Aleksandar worked with many international startups to helped them release their products on the market faster. He has a skill for writing insightful (and catchy) posts about technology and loves engaging in discussions on a range of thought-provoking topics. When he's not writing code, you'll find him playing video games or swimming at the local pool.

Expertise
  • JavaScript
  • PHP
  • Laravel
  • MySQL
  • Node.js
  • ReactJS
  • Git
  • PostgreSQL
  • Vue.js
  • Bash
  • +5

Ready to start?

Get in touch or schedule a call.