The Protest Against Dynamic Websites

Discussion in 'Linux Other' started by Eric Hansen, Jan 6, 2014.

  1. Eric Hansen

    Eric Hansen Member

    Messages:
    96
    Likes Received:
    38
    Trophy Points:
    18
    While I usually prefer to give tutorials instead of opinion pieces, I feel this should be addressed. But I want to clarify what I mean by "dynamic websites" first.


    A sort of hypocritical point to my argument that I will be bringing up is that the use of Ajax/JavaScript is still permittable. However, in terms of "dynamic" this is more in line with running a site using a pre-processor such as PHP, Python, ASP, etc... Sites that also connect to databases real-time (i.e.: WordPress). Essentially what seems to be every website that exists out there these days.

    Now, this is not to say that dynamic websites serve no purpose. Take Linux.org for example. Without this site being dynamic it wouldn't have the content or presence that it does. However, this site's primary focus is to be community driven, and with that it needs that dynamic aspect to it. Most business websites, however, fail in this regard.

    Take my old business, Security For Us, for example. It was an IT consulting business and most of the time was powered by WordPress. While this was a bad decision (in my opinion) for other reasons, one of them was because the website didn't need to pull data from a MySQL database to generate a website. Nothing was actually dynamic about what was presented to the user, so it just used up valuable resources. The only thing actually dynamic on it was the comments section, and anyone who runs a WordPress site knows that its mostly spam.

    The other aspect that really sways me between using a dynamic or static website is security. Lets consider what is needed for a typical basic dynamic website (man that's a lot of adjectives):
    Now, lets look at the needs of a typical static website:
    I know I put "Web Server" twice in a row but the point is "GET /somefile.html" -> "HTTP/1.1 200 OK". The outlining point here is that to generate content back to the user with a dynamic website it has to run through not just a web server, but 2 other services at least. This is comparable to the idea of not loading 5 different purposes onto a single server. Each server should serve one item and do it excellent, not serve 10 different services okay. The reason, besides performance hit, is that the more software you install onto a machine the more open you're making the system to vulnerabilities.

    Now the fun part of this post, JavaScript. Yes there are a lot of reasons not to use it, but there's equally (if not more) reasons to actually make it useful for your site. One of the hurdles that you'll discover when making a static site is how to get a user to search your site. You can rely on a third party solution such as Google to search your website for you, but that again puts you at risk. What if that third party website gets hacked or someone finds a bug in their code? You're at the mercy of either shutting down the search function until the issue is fixed or exposing your users to issues that can drive away traffic.

    Luckily for static sites there are solutions that take a simple file (sitemap.xml) and be able to preent it to a user in a functional manner. There's a JavaScript library/file called Tipue Search that provides you with the ability to offer a functional locally-hosted search for your static site. My new business' website is built using a static website creator called Pelican and I use Tipue Search to provide an easy search feature (I will show how I did this in a different article).

    Attached Files:

    Luis Pena and |)/-\|) like this.

Share This Page