Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Comment Keep seperate things seperate (Score 1) 156

Unless you have a very good reason for not doing so, always keep your presentation(HTML,RSS,whatever) seperate from your code.

There are several reasons for this:
1. It is much easier to edit HTML that actually looks like HTML, and code that actually looks like code. Debugging a 1500 line web page that is mixed code and HTML is my personal definition of hell.
2. If you are worried about designers screwing up a simple templating language just imagine what will happen when they start screwing up your inline PHP/ASP/Perl/Java code. i.e. "I removed all the weird looking stuff". Oops.
3. If you are using source control, it is handy to keep revisions of application logic seperate from revisions to look and feel. If something breaks you can quickly fingure out if it is a code or template problem based on revision history.
4. What is the downside? You need two tabs open in your editor? You need to learn a basic templating language?

Slashdot Top Deals

Nothing succeeds like excess. -- Oscar Wilde

Working...