Personal SFML Website Updated

A bit late, but better late than never: Happy New Year to everyone!

So the past few days I’ve been working on a new front- and back-end for my small personal website, targeted towards anything related to SFML. Active SFML developers and/or SFML forum readers might already know that I’ve been providing SFML Nightly Builds for a handful of compiler, up to now the downloads were provided through a small self written PHP file and linked in the static HTML download section. Now they’ve got a dedicated place and user-friendlier URLs.

Now let me talk a bit about the two frameworks, which currently power the new website. Both of them were fairly new to me and thus I had a lot to learn and read.

As for the front-end I used Twitter Bootstrap, the evermore popular collection of CSS and JavaScript assets, that give your site with a very simple HTML skeleton a somewhat standardized look and feel, which a many find quite intuitive and appealing to work with. The small SFML website wasn’t the first project with which I got myself introduced to Twitter Bootstrap, but it had recently refactored an older database-project, I had made for a friend of mine a few years back. The simplicity and powerfulness of the framework really surprised me and with the help of the online documentation working on a nice HTML site is a very easy task.

The decision for a proper back-end was a bit harder, since there are so many different ones and each of them provide again different features, which might sound genius, but can have a huge learning-curve, so you’d end up digging through tutorials and documentations for hours. The first framework I’ve had in mind was Symfony 2. It is a well-known and respected PHP framework and one can do any kind of web application with it. But because it’s so loosely coupled and generalized the learning curve is quite big. Although they provide some nice introduction tutorials, I’ve never gotten a good overview and never really understood how one would get to write a simple application with it.
In the search for something less clumsy and complex I went to Wikipedia’s web framework list and clicked me through one after the other, until I reached CodeIgniter. Looking at the short feature list on their website, I was immediately hooked and was pleasantly surprised as I switched to the documentation, which is structured cleanly and lets you choose on how deep you want to go, but builds up your knowledge about the basics step by step. Within a few minutes I had a running back-end with custom URL routing. The only problem I ran into was the correct mod_rewrite routing and I could only resolve it with some googling. So in case someone would by accident find my blog, here’s the correct routing I use to abstract the index.php away:

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|img|css|js|robots.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]

That way one gets a nice URL like https://my-gate.net/about/ which will get redirected automatically to the index.php.

Anyways I’m quite happy with the combination of Twitter Bootstrap and CodeIgniter and will most certainly use them further for different projects. I’m here specially thinking about SFMLUploads, which has as back-end only a few very hackish PHP files and thus is constantly failing and very hard to maintain.

Do you have any experience with CodeIgniter, Boostrap or any other framework you want to drop a line in the comment section?

6 thoughts on “Personal SFML Website Updated

  1. Thank you very much about the url rewriting you use. I’ve been planning on making a project with CodeIgniter and I’ve had problem in the past with the mod_rewrite with CodeIgniter.

    Also, did you had to do anything special to make it work with Twitter Bootstrap or it worked easily without and complicated configuration(seems in the past there was).

  2. I’m glad this could be already useful for someone else. :)
    From what I’ve read, there’s been some changes for the good in Twitter Bootstrap 2, one of them is, that they now provide a customization functionality directly on their website, so you won’t have to run a LESS compiler on your end. This reduces the complexity quite a bit IMHO; then again I haven’t dug into all the different details of Bootstrap.
    To set it up with CodeIgniter, I simply copied all the assets to the web directory (as you see in the rewrite, I put them into the directories img, css and js) and then implemented the different views I wanted with CodeIgniter, directly as PHP and not with some template language.
    One might also mention two websites, which are online WYSIWYG Twitter Bootstrap editors – unfortunately they don’t work well on my end, but it’s nice to quickly see, what possibilities there are: http://www.jetstrap.com/ & http://divshot.com/

  3. Have you tried Python Django? :X Seriously, I’ve been looking for really nice web frameworks for a very long time, in a couple of different languages. The first hours of all the frameworks were mostly cool and entertaining. But as soon as it gets more complex, most of them failed hard. You always find yourself looking for workarounds or solutions to build your stuff. Django, for me, is the first framework that I still fucking love after a couple of months. I really recommend that you try it out. I guess you’ll love it too. ;)

  4. Yes and no…
    I’m aware of the existence of Django and also had the website open a few times and even looked at the tutorials, but I’ve nearly zero knowledge in Python. Sure if you know one language it’s easy to learn another one or of course I might profit in the future more by learning Python, but I want something, that I can work with now and not having to go through learning a new language for a few weeks and constantly looking up things and failing at the slightest problems, just because I’m not experienced with it.
    Besides that CodeIgniter is very easy and yet powerful to use and I haven’t run into much problems.
    Maybe when I’m ready for Python I’ll look at Django again. :D

Leave a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.