Never Keep the Front in the Front

published on January 1, 2012 in technical

I have read an article a few days back, which states that PHP developers should work with frontend developers, how they should help them.

The article that got my attention, was this: Keep the Front in the Front, written by Rachel Andrew. There are a few thought that I think might be considerred, but I disaggree with the most of them.

1. HTML in AJAX response

This is something I strongly dissaggree with. I think that AJAX is for getting data from the server, not HTML markup. If one need HTML, then he should put it together. after the data has arrived from the server.

There is one exception to this ruke, which gets to be used when you want Google to crawl those AJAX call URLs, too. Then, that URL should be capable of sending HTML to Google, in some cases. But this a bit more complicated, I do not consider this a very good way of building my applications, thus I do not use it.

2. Familiar templating syntax

I read another very interesting advice in the above article. Rachel says that we PHP guys (that is just a part of me!) should use some simple, easy to use templating system so the frontend guys could understand it. I gave this article a few days to settle, but I still find this harsh. PHP short tags, or normal tags, echo-ing variables the short way, or the long way, or any other PHP struncture that is built for PHP to have a strong templating engine, are quite easy to understand. On one hand.

On the other hand, where is the teamwork here? The PHP guy writes something, hidden from the frontend guy. Then, the latter one, builds something upon that. These are people we are talking about. Make them talk. Make them meet. If they don't, or do not want to, fire them, get some real developers to work for you.

As a note to the above: great ideas are born in conversations, while communicating. Not while coding.

3. We are all web developers

As I said many times, I don't think that fontend and backend should be so far from eachother. We are building the same applications, for the same users. Our goals meet in the browser. We might not think the same, but we must work together. As a real team.