PDA

View Full Version : Dreamweavers PHP code


kona72
02-02-2007, 05:11 PM
Hey David and or all other PHP gods.

First off let me start by saying that this message is by all means NOT intended to offend or 'tick' anyone off. It is simply being asked because I feel that alot of individuals on this forum have the knowledge base to answer this question intelligently.
Having said this; my question, as I am sure I am not the only one wondering this. As we all know DW has the built in ability for all kinds of DB connectivity and functionality. I can very much appreciate the fact that hand coding is cleaner and MUCH easier to understand, but what is the reasoning behind all of DW's 'junk' code that they put in? Would Macromedia/Adobe not have the best practices in mind?
Simply put... I find it much faster to use the built in functionality that DW has that to hand code, keep in mind I am not a seasoned hand coder. BUT... My end goal is to become a proficient hand coder so that i can actually look at the code and understand it in its entirety rather than 'muddle' my way through it.

Regards, a frustrated wanna-be hand coder....

Thanks Guys/Gals... I look forward to all the replies...

domedia
02-02-2007, 05:33 PM
This question does not relate directly to PHP as a language, but how DW generates code on a general basis.

Dreamweaver is not a human, it can't handcode, afaik this is the best answer to your question about why DW's code looks messy. It uses prebuilt snippets and rules that has to work with other parts of it's generated code. The same thing goes for how DW writes JS, and basically also how it writes HTML and CSS from design view (not exactly best practices semantic markup).

If you find it faster and more efficient to point and click, then that is probably best for you. Others require more control and customization, and would probably handcode. That's why DW supports both kind of users :) Just like you can write your own JS or use behaviours. Same with Code View/Design View.

kona72
02-02-2007, 05:48 PM
Thanks Domedia. Your explanation is excellent....