Hello. I have downloaded some ready projects and i saw that they seperate html from php. They are echoing everything through a class.For example they make a class for <html> tag for <body> etc.
This is driving me insane.Whats wrong with just having some classes and then mix html and php to display the data ?I think its lot simpler. Otherwise i get lost ..If they need 100 includes just to display a simple page.I read many books and everywhere i saw mixed mode.
So whats right? How should i design my sites? Represanting each html tag with a class how the heck then a designer could design something? Isnt simpler just have a template ?
Please help..
parhs
0
Newbie Poster
Recommended Answers
Jump to PostIt is up to you. If you start building a large website with a lot of repeating code like headers, navigation menus, etc, you will realize how helpful the includes are.
Later on, you will realize that a database-driven site, with a lot of if/else statements becomes really hard to …
Jump to PostPersonally, I create a main template, and then divide repeating or interchangeable elements up into smaller templates.
I then combine the templates using a template class I've written, substituting templates in for placeholders, etc, before outputting the complete page.
I find it works really well. Essentially its following …
All 7 Replies
Rhyan
blocblue
238
Posting Pro in Training
Featured Poster
somedude3488
228
Nearly a Posting Virtuoso
parhs
0
Newbie Poster
blocblue
238
Posting Pro in Training
Featured Poster
parhs
0
Newbie Poster
parhs
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.