If you look around the web industry you will run into the terms static sites and CMS. What are they, and when should you use one over the other?
What is a website?
A website will live somewhere on a host’s server. Servers read more complex code like php, python, .net, etc which in simple terms creates much of the HTML that is sent to the browser. Many times when using these languages part of the server language’s job is to act as a bridge to your sites database.
How does that all work together? Well, when you visited this page the server recognized the page you wanted content for, php grabbed the content from the database, put it in the appropriate HTML structure, and sent it to you in the browser. Between those major steps could be thousands of smaller steps, whereas if you just had an HTML file already built and ready sitting on the server, you cut out the middle man so to speak and the content is served up faster. Standalone HTML files prebuilt are called a static file.
A static website is a compiled collection of prebuilt HTML files ready to be served up to the users.
Advantages to Static Websites
Because static websites don’t have to rely on server side code to check a database and generate HTML they can be much faster out of the gate than many CMS platforms.
You can find excellent free hosting for static websites like GitHub pages.
No server side code, and no databases means your site has a much much lower risk of being hacked.
Static Site Generators
You can’t mention static sites without mentioning static site generators. So one disadvantage to a static site is once your site grows past one page, you will then run into an issue of duplicate code in multiple files. Imagine you have a website with three pages and each of those three pages are linked in your sites header. If you add a fourth page and want that linked in the header you now have to change all four files to be accurate. Now imagine that same process for ten, twenty, fifty, 100, or 1000 pages. The scalability of a simple static site becomes very hard, very quick.
A static site generator like Jekyll or Foundation Panini or others, makes the process of updating a static site much easier. You can create template files that are then compiled to all of your HTML files making that common code update go from having to edit thousands of files to one. The generator takes your content file, usually written in markdown, your template files, and generates all the necessary HTML files to run your site.
Disadvantages to Static Sites
You need to know some code. Without knowing markdown, or some basic HTML you’re not going to be able to really manage a static site.
No database means if you want a form, to save data, sale items, or a number of other things you’re going to need to more than likely pull from a third party source.
Content Management Systems
A content management system, or CMS is much more complex than a static site from a code standpoint but you get many additional benefits.
There are many many CMS platforms and it would be impossible to cover them all in a single post. Of the many CMS platforms there are a few major ones in the web world. Wix, Squarespace, Drupal and Joomla are a few of the top CMS platforms. The most popular CMS by far is WordPress. When doing a search for WordPress you may come across WordPress.com and WordPress.org, you can see the differences for those here.
With a CMS you can edit content without needing to know code, collect information without having to use a third party site, sale items directly from your site, and many many more things.
Disadvantages to a CMS
A cms isn’t as secure as static sites, but you can take steps to offset that. Hosting will usually cost a bit more.
If you’re working with a builder type CMS like Wix or Squarespace you have limited control over your site.
Which is right for you?
In most cases a CMS is the best way to go. If you know some HTML and want lower costs a static site may be best for you though. Reach out if you want to get more information on which option would be best for you.