The Protest Against Dynamic Websites

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

  1. Eric Hansen

    Eric Hansen Moderator Staff Writer

    Messages:
    116
    Likes Received:
    68
    Trophy Points:
    28
    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.
  2. Pyplate

    Pyplate New Member

    Messages:
    15
    Likes Received:
    5
    Trophy Points:
    3
    I'm a few months late, but I only just saw this thread. I had the same problem with Wordpress. It was too slow and using caching plugins only helped so much. I wrote my own Python CMS called Pyplate. It can serve pages dynamically, but there's a page in the admin area where caching can be managed. If you build the cache then a static version of each page is generated in the web root directory. So you get the benefits of a CMS, and the speed of a static site.
  3. Eric Hansen

    Eric Hansen Moderator Staff Writer

    Messages:
    116
    Likes Received:
    68
    Trophy Points:
    28
    I checked out Pyplate, but it seems a lot of extra work is needed to get it to be usable. Which, for me wouldn't be a deal breaker but it really does limit the amount of users who would use it.

    I would suggest making the install script either edit the files in question or create a new site config and tell the user that they might have to edit it or something.
  4. Pyplate

    Pyplate New Member

    Messages:
    15
    Likes Received:
    5
    Trophy Points:
    3
    The idea is that once it's installed, you just need to edit the site name and the site banner in the site settings page of the UI. Then you can choose from one of the pre-installed themes and start writing posts.

    If you do a custom install then you might need to modify the code in a couple of places, or if you want to make major changes to the page layout. Apart from that, most configuration is done through Pyplate's UI.

    Was there something specific you needed to edit?

Share This Page