Walking on water and developing software from a specification are easy if both are frozen.

Edward Berard

Blog About JV Roig

Site Info

JVRoig.com is hosted by Siteground and is powered by Linux.

This is site is not powered by WordPress or similar blogging / CMS products.

Dynamic content in this site is delivered through PHP and MySQL. There is no more dynamic content on the site itself, as far as visitors like you can see. The hosted files are all static HTML files. However, when I work on them, they are still made through a combination of PHP+MySQL using tools I wrote myself. Instead of uploading and serving those PHP files, I recently wrote a simple "preprocessor" of sorts (it's a very short PHP file) that runs through a list of files and converts them to the appropriate HTML files. Those generated HTML files produced by the preprocessor are what eventually gets hosted. All the PHP files remain at home on my computer.

Why bother writing this preprocessor when the PHP files themselves can be hosted with less effort? (And that was in fact how the first two incarnations of this website functioned - regular PHP files querying a MySQL database).

For one thing, performance.

Serving plain HTML files is much faster and less resource intensive than processing PHP files that query a MySQL database to dynamically create content on the fly. My Siteground hosting plan (currently, the "GoGeek" plan) is already the top-tier shared host plan, but it is still no VPS (Update: I downgraded to the entry-level shared hosting package since becoming too busy to actually run this website). After some rudimentary load tests, I found that the max hits per month the plan could accomodate was much less than I was comfortable with. I could solve that by paying 3x more for the lowest-tier VPS plan. Instead, I decided to write the preprocessor and host only HTML files, which effectively raised the theoretical max hits the site could sustain by over 100x (the previous limit was an arbitrary "script executions" total count placed by Siteground, not exactly due to how heavy or light any PHP file actually is). I confirmed this by running another set of rudimentary load tests for 24hrs straight, and then letting the great Siteground Tech Support team verify my findings. This took me only 2 days (including the 24hr load test), so it's definitely better than just lazily shelling out 3x more money per month for the lowest-tier VPS.

For another thing, security

By doing all the content creation offline (it's still as convenient as using a CMS like WordPress), it doesn't matter whether this homebrew CMS tool of mine is less or more secure, or less or more vulnerable, than other CMS products. It's not hosted. Plain-jane HTML files are the only things found in the website, so there are no SQL-injection, XSS, XSRF, EAR. or other vulnerabilities to exploit.

Most things you see in this site was made by me, using 100% Open Source software:

  • I use Linux as my work OS at home, most often CentOS or Fedora.
  • I use gEdit as my text editor to write HTML, PHP, Javascript and CSS code for the site.
  • I use GIMP (GNU Image Manipulation Program) for all graphics and photo-editing
  • I use Inkscape Vector Graphics Editor to make vector graphics, like my signature which you can see in the home page

What I don't make myself, however, are any icons and other "cliparts" you may find here. I unfortunately don't seem to have the skills yet to create acceptably good icons and clip arts from scratch. Instead, I source them from openclipart.org, the best collection of free, public-domain icons and clip arts I could find. I just download the good clip arts I find from there, re-size them, and occasionally do minor editing when the clip art is almost perfect, but not quite.