Category: HTML

Fronteers 2011 – The videos

All the presentations at Fronteers 2011 have been recorded, and the first presentation (The Future is Native by Aral Balkan) has now been uploaded to vimeo, the other talks will follow soon. View the presentation below:

Aral Balkan | The Future is Native | Fronteers 2011 from Fronteers on Vimeo.

All videos will appear on this page at a later time:

Fronteers 2011 Day 2 – more thoughts

The second day promised to match the quality and depth of the talks on the first day and it totally fulfilled that promise. Although it started off a bit rocky for me, because I arrived about 20 minutes late for the first presentation, I still managed to get the most important information out of it. So let’s go through the various talks.Read More

Fronteers conference 2011 Day 1 – my thoughts

The past two days, I’ve been at the Fronteers 2011 conference. Fronteers is the Dutch trade union for front end developers and this is the fifth year they’ve organized this conference. Last year was the first time I went to the conference, which was okay. This year’s conference, however, was very much worth the time and money spent.

Read More

Magento theme development

Recently, I’ve started working on building a Magento theme as part of setting up a Magento store for a client. As this is the first time I’m working with Magento I run into a lot of issues that many newbies encounter. I’ll try to write up some stories about the things I ran into and how I solved them.

It’s easy enough to find general information about where to find the files used in a theme. However, once you get past that initial level, things get a lot harder. For instance, when you install Magento, you get these example banners on the homepage (the blackboard with “back to school” text). Sadly, it’s not possible to remove these through the CMS. These blocks are, for some reason, hardwired in the theme files.

From what I’ve understood, there’s two ways to remove them: either remove the phtml files that generate them, or create a file called local.xml and turn them off there. As the first solution requires that you edit files that are part of the default install, you might run the risk of the callouts returning after an upgrade. That’s why I went for solution two. This also has the added benefit of having the local.xml ready for more changes, which is very useful.

Here’s the relevant part of the Magento Wiki on how to remove the callouts.

My opinion about HAML/SASS

This is my response to Kyle Simpson’s post about HAML.

Let’s start with a disclaimer of my own: I haven’t used HAML (or SASS) in a real environment, so I don’t know how useful it can be.

Now, with that out of the way, here’s my opinion, based on Kyle’s post:
HTML (and CSS) are two languages that are easy enough to learn. Of course, there are certain intricacies related to how browsers handle HTML and CSS, but that doesn’t change the difficulty of writing in those languages. A link will always be marked up with an a tag, and you’ll always use the background property to set background styles on an element. Once you get the basic syntax, there’s not much you can do wrong (luckily Geocities doesn’t exist anymore to disprove my point ;)).

I agree with Kyle that templates should contain as little logic as possible. This allows for them to be easily changed to be used with a different server side language and makes them easy to maintain for people that have little to no knowledge of the server side language that’s being used. And of course, there’s the whole separation thing; client side developers are always very adamant about separating HTML, CSS and Javascript, so why should you mix HTML and server side languages (above a certain level)? So, to keep things simple, a templating language should, in my opinion, probably only offer simple variable replacement.

I also agree with Kyle that languages based on indentation don’t make sense. I also like the clarity of having something wrapped in brackets, like it is in Javascript. On top of that, I don’t see the advantage of having to type HTML-like syntax, and leave out the closing tags, or even the brackets around the tags. Yes, it requires more key presses, and I’ve been taught that programmers are extremely lazy (hence the DRY principle), but if that means adding some kind of processing (which requires server power), then I think you’re going overboard.

And to round off my response, here’s a little analogy: I prefer reading books by English authors in their native language instead of a Dutch translation, because I can understand all the subtle nuances and jokes the authors make as they intended them when they wrote them down. However, if my English wasn’t that good, I’d probably prefer the Dutch translation.
It’s the same with HTML versus HAML. To really understand what’s going on, it’s easier to look at the HTML code that’s being put out, as long as you have a good understanding of HTML. However, if you’re not really that good at HTML, but understand HAML very well, you’ll probably prefer reading the HAML code. But that will always mean that you won’t always get the subtle nuances of HTML (granted, there aren’t that many, but if you look at CSS vs SASS, then it starts to make more sense).