Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do you hand code your pages? 9

Status
Not open for further replies.

pugs421

Technical User
Nov 25, 2002
114
0
0
US
I'm new to php but I have a book and I'm slowly learning. The book is teaching to hand code and I'm wondering if that is the norm. I'm using dreamweaver to produce my pages and I figure I can tweak the code out to better suit my needs once I learn what the code it produces is actually doing. Do you devlopers hand code, or use a program to produce it and then just customize and add to it to suit your needs?
 
Design:
You should (when you have the application available to you) design the layout of a web page in a WYSIWYG editor, making good use of CSS. I have seen too many instances where PHP coders get hung up on silly HTML FONT tags. If you define a good CSS, there should be no need to pepper your PHP code with unnecessary HTML fluff. Good CSS and template structure can ease PHP coding as well.

I completely disagree with WYSIWIG. My feeling on the matter is that a good designer already knows how it looks like on the page, and is already capable of coding it accordingly. And, why the slam on just PHP coders? I know lots of PHP'ers who write beautiful code, and conversely, have seen many others (Asp'ers alike) who "fluff" their code with font tags too, because they dont have a good CSS understanding.

___________________________________
[morse]--... ...--[/morse], Eric.
 
nawlej
IMHO ideally there should be a complete separation between design and functionality. PHP code should be the processing part while the design part is handled completely outside of PHP. I subscribe to the use of external HTML templates that are fully editable in a WYSIWYG editor. Thus the look of the output can be changed at any time without having to touch the code and - even more important - by someone who has no understanding of the code and in even does not need it.
I never write PHP code that creates HTML output - it's like a timebomb for the future when the design changes. A PHP application is much more distributable and versatile if the wrapping can be easily changed without having to touch the code.
... a good designer already knows how it looks like on the page, and is already capable of coding it accordingly...
The first part is certainly a possibility, the second however seems unlikely. From my experience the number of people who can do aesthetic design and good coding is very small. If you are one of them, cheers to you!
 
DRJ478
I never write PHP code that creates HTML output - it's like a timebomb for the future when the design changes. A PHP application is much more distributable and versatile if the wrapping can be easily changed without having to touch the code.
This presents a problem when you are utilizing a content management system, or building certain aspects that require output from a database into the page, in HTML format. How does one get around such a thing without coding HTML into the php code? Im not saying that you have to output the whole page from PHP to HTML, but it is unavoidable to have some HTML in certain situations.


___________________________________
[morse]--... ...--[/morse], Eric.
 
Not correct. A HTML template system works with the template using regular expressions. They may contain repeating blocks, optional blocks etc.. I have not found any problem in which this would not apply. "Pure" PHP code, without any HTML generation, is possible.
 
Point taken. Valid point. I still wouldnt use a WYSIWIG for the world. :)

___________________________________
[morse]--... ...--[/morse], Eric.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top