Forum Moderators: open

Message Too Old, No Replies

Clean & Compliant Code with Dreamwever

A Do's and Don'ts Checklist

         

limbo

12:40 pm on Aug 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Inspired by this thread [webmasterworld.com]

Do

  1. Do work in code, or mixed code/design view: view > code, or code and design
  2. Do turn off auto indenting - use you own!: edit > preferences > code format > uncheck indent box
  3. Do strip out template inserted comments before you ftp: modify > templates > export (for non Contribute sites!)
  4. Do use clean up HTML command: commands > clean up HTML - specify attributes to update
  5. Do create simple and logical directory structure to avoid: ../../../../../images/image.gif
  6. Do use the CSS shorthand rule command: edit > preferences > css styles > tick boxes to suit
  7. Do use the 'show attributes when inserting' command for images and tables: edit > preferences > accessibility...
  8. Do check your design regularly using compliant browsers (F12): edit > preferences > preview in browser > + (find browser)
  9. Do use validate markup command: file > validate > validate markup (use with w3 validator [validator.w3.org])
  10. Do use the 'check links sitewide' command: (site view) > site > checklinks site wide
  11. Do keep it Simple, edit it the way you feel comfortable and stick to a pattern; In other words keep you code consistent!
  12. Do place DW generated Jscript into external files
  13. Do recreate you site cache from time to time (especially if you use templates and library includes)

Don't

  1. Don't just use Design view - it'll hamper you ability to 'clean as you cook'
  2. Don't let DW do too much - keep it well reined in, if you point and click to often the code will bulk up quickly
  3. Don't use the import firework html. For rollovers use CSS [webmasterworld.com], for popup-menus [webmasterworld.com] seek a decent script [google.com]
  4. Don't rely on the properties palette to format text
  5. Don't use Dreamweaver Layers! Use <div>'s and CSSP [webmasterworld.com]!
  6. Don't expect Dreamweaver to do a good job alone - it's a tool like any other

This is all I can think of for now. Please add or criticise as you see fit :)

jatar_k

3:38 pm on Sep 20, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



great points limbo

stever

4:29 pm on Sep 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good post, limbo.

> Become comfortable with the Find-and-Replace command. Directory-wide or site-wide, it's a great timesaver.

> Back up site definitions regularly. There is a tool available which will do it for you automatically.

limbo

9:42 am on Sep 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Loving the backup site definitions - You have saved me a lot of time! Cheers Stever

For anoyone looking: Site > edit sites > export > choose directory > save :)

Couldn't see an automatic back up command...?

stever

12:07 pm on Sep 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure what version you are on - there's a free third-party tool called MM-Exporter which does this for DW and Flash in different versions including just site definitions, registry settings or configurations. But they may have integrated it into the newer versions now? (I'm waiting to buy a new computer before upgrading from MX to 8.)