Pros and cons of static website builder - Although the popularity of content management systems has skyrocketed recently, some projects are still better served by static websites. Static websites are still a better option than content management systems.
To better understand when you should choose a static website on CMS and when you should go with a CMS, we will introduce you to static page builders, highlighting their advantages and disadvantages.
What is the static page builder? How was CMS born?
Back when static websites were the norm, a website was created by simply creating individual HTML pages published on the web server. Each HTML file calls with images, CSS and JavaScript. There is no admin panel, only code editors like Dreamweaver.
But as the web gets bigger and more complex, difficulties arise in updating files, keeping tabs of directory structure, and on handling dynamic content. To overcome this and better handle the hassle of complex websites, a content management system (CMS) was born.
A CMS comes with an admin panel that helps users write content, then store it in a database behind.
Creating a website and maintaining it with a CMS is done without interacting with the code and the CMS works with concepts like themes or templates, controlling how the pages are displayed in the client's browser (face). front of the site). CMS has paved the way for non-programmers to try their hand at creating websites and will also handle dynamic content (eg blogs) without problems.
On the other hand, static page builders are part of the static pages that are manually coded, but not as complex as CMS, however, it is described as a compromise between two pages. Static page builders will also use templates to create websites with only static HTML with content extracted from the database or by reading from flat files like Markdown.
Static page builders are often overlooked because the installation process is often unfriendly and lacks a user interface, sometimes SSG (static page builder) is better suited for your project than CMS or when a CMS would be an overkill.
Hugo, Jekyll, Metalmith are just some examples of popular static page builders.
What are the advantages and disadvantages of a static website builder?
Advantages of SSG:
Efficiency
The speed advantage of static pages is one of their biggest advantages. Because there is no database query to run, no handling of every request, the web server has no problem serving instant static files to the visitors.
Caching systems supported by plugins or integrated caching systems used for CMS will be effective in reducing database query costs, however, a static website will always ensure Smallest download on web server.
Version control
Version control is another interesting advantage that static websites have on CMS. Changes to your static page will be tracked through source control management programs like Git, helping multiple people work together on a project and undo changes when something goes wrong.
A CMS has version control elements, but some changes are permanent and you need to rely on backups - if you've taken preventive measures to implement them!
Better security
CMS platform is a common target for hackers and malicious users. Although WordPress Core is considered to be secure, installed plugins and themes will have security vulnerabilities and exploits from XSS (Cross Site Scripting) that are simply reflected through SQL Injection, ways to Execute remote code. Experienced users will take security measures to prevent or avoid such problems, but less experienced people will ignore these aspects.
Static websites, however, make it harder for hackers to crack because they have little or no server-side functionality. And static websites are usually created on one machine and then often served from another machine, what the attacker will do with the web server serving static files.
Even if someone has managed to gain SSH or FTP access, the damage will be simply overcome for the site itself.
Few requests related to server
By definition, a CMS depends on the server side. For example, installing WordPress will require an operating system such as Ubuntu or CentOS, Apache or NGINX web server, PHP with the necessary extensions and web server configuration, MySQL, WordPress software, code, plugins and themes. . This needs installation, updates and management.
A static website requires less - Any web server capable of returning HTML files will work. Also, you don't have to bother installing plugins or taking care of updates.
Better handle the increase in traffic
Few server resources are required to serve static HTML files, which is why a sudden increase in traffic is not an issue when it comes to static web pages. A CMS is more vulnerable to sudden increase in traffic, which will lead to issues including database crashes or active connection restrictions.
For static websites, the whole process is less intensive, which makes static websites more reliable and better prepared for handling the increase in traffic.
These are the best benefits of a static page builder, but of course, no system is perfect, so there are a few shortcomings that you shouldn't overlook.
Disadvantages of SSG:
Real-time data is not available
By definition, static websites do not get flexible data changes. If you don't want real-time data on your site, then the static page builder is not for you.
To solve this, some people will decide to use server-side JavaScript then match the results for a page that has been served, but this will be a dangerous path and lead to an experience. Bad users, poor SEO.
There is no user interface
Content management systems like WordPress make it easy to create and publish content from a user-friendly administrative user interface accessible from any device. The lack of an admin UI is a major disadvantage, but there are a few solutions to fix this problem.
Some platforms like prose.io or CloudCanon have a WYSIWYG editor for Markdown and a web interface integrated with GitHub, helping you create, edit or delete files on the GitHub repository.
In the same vein, there are apps for Android and iOS that are connected to GitHub and they're designed to write and publish content on the go, pushing changes into the repository.
A third solution is to post to a static blog by email. The Jekyll static page builder uses this through its JekyllMail service, works by logging in to your POP3 account, then extracting messages with predefined secret subject lines and saving them in messages. specific item (for example, _posts or images folder). There is also the option to add them to your blog's git repo.
No user generated content
WordPress websites or blogs have user generated sections such as comments or reviews. Having a commenting system implemented on a static website is an extremely difficult thing.
Another way is to use platforms like Disqus, JavaScript to add comments to a page after being served. However, this way does not allow you to have the content stored together. One approach that helps you keep comments with the rest of the site is to use a server-side handler to process and add comments, then push them to GitHub.
As you can see, it is possible to deploy with a CMS just by installing the plugin, but many things cannot be done with a static website and you have to use different solutions to achieve it. These will require some expertise or experience, or you'll have more difficulty with static page builders than with a CMS.
So is a static website builder good for you?
Static websites are reliable when increasing traffic, they do not have many security issues like CMS and because they do not consume a lot of resources, they are very fast.
However, static websites are not for everyone and are not suitable for every project. Sometimes they reduce development time and costs, or they cause problems, especially for people without the necessary development skills.
Post a Comment
Post a Comment