Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Code and html separation - always or mostly doable?

by kiat (Vicar)
on Jun 17, 2004 at 05:29 UTC ( [id://367536]=note: print w/replies, xml ) Need Help??


in reply to Re: Code and html separation - always or mostly doable?
in thread Code and html separation - always or mostly doable?

Thanks, DaWolf!

I used to do it that way. There's a lot of html in the code. In the long run, it might be better to move the bulk of the html to a template.

You might want to seriously consider something like HTML::Template. I started using it at the beginning of this year and there's no turning back.

I've moved out lots of html from the code into the templates, and it makes for a cleaner code and probably an easier maintanence task.

What I find difficult and sometimes impossible to achieve is a 100% separation of code and html. But as others have pointed out, it's doable with a clear idea of the program logic. With time and more practice, I might be able to do that.

On a different note, I've seen rather huge programs (ikonboard and yabb) with code and html glued together.

cheers

  • Comment on Re^2: Code and html separation - always or mostly doable?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://367536]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-25 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found