View Full Version : Crisp code with Dreamweaver
jakenoble
02-04-2004, 10:20 PM
I have been reading alot of posts about peoples websites.
I have found that a fair few comments comment on the code of the website and how the code, it poor, too long, repeatitive, etc.
Is this down to dreamweaver. I use it, and i have noticed it repeats a lot.
I also read by cleaning code up you can reduce your page size by 80%, i believe you can reduce it but by that much!
Is it worth going through the code to delete repeats, delete bits dreamweaver didn't, (like when i deleted a recordset, but dreamweaver didn't get rid of all the code, it happened!), and delete blank lines.
Thoughts, tips and ideas, all i will be very greatfull for?
Vladdy
02-04-2004, 10:25 PM
I can see the page size being reduced by 80% if it goes from a ugly tabled layout (like the one found on your site) to CSS positioning of semantically meaningfull markup.
To do that you can dump the DW and write your code with a notepad (or colorized version of it). When writing your code you will also be able to use CSS for most of the dynamic effects which are done with some bloated JS in DW.
The further reduction can be done by utilizing the first C of CSS which is often not being recognized by amatures.
jakenoble
02-04-2004, 10:29 PM
OK
Why is it ugly on my site.
I am currently working on a new version, with table width set to 100%, rather than pixels? Would that help the "uglyness"?
Comment on my site all you want, i need the feedback!
especially as i am making a new one!
JAKE
Vladdy
02-04-2004, 10:30 PM
tables are for tabular data:
http://www.hotdesign.com/seybold/
jakenoble
02-04-2004, 10:32 PM
OK.
Whats wrong with using them how i just mentioned?
It works, and it looks loads better in other Resolutions other than 1024X768.
Should I do away with Dreamweaver?
You think CSS is the way to go?
jakenoble
02-04-2004, 10:33 PM
no no, that sounded like CSS instead of DW.
I mean should i just code, and no use DW.
and should i use CSS to improce my sites further?
jakenoble
02-04-2004, 10:34 PM
that, my friend, is a great link
Len Whistler
02-04-2004, 11:26 PM
A problem with deleting code in Notepad after you have made the page in programs like Dreamweaver, GoLive etc. is that you will not be able to use those programs to edit that page again.
My site was completely done in Notepad.
Leonard Whistler
www.stubby.ca
Vladdy
02-04-2004, 11:56 PM
Mine too :thumbsup:
... OK it was SciTE for code highlighting, but the distinction is that if you want to do it right, you got to do it yourself ;)
Spookster
02-05-2004, 01:05 AM
Originally posted by Len Whistler
A problem with deleting code in Notepad after you have made the page in programs like Dreamweaver, GoLive etc. is that you will not be able to use those programs to edit that page again.
Sure you can. I use DW and often edit pages in notepad when I am in a hurry or not at a computer with DW on it. If you use templates you have to be careful not to mess with those tags but other than that there is no reason you can't edit the pages in notepad and continue to use them with DW.
jakenoble
02-05-2004, 01:11 AM
Spookster is right.
When you reload the page it justs says" this page has been modified elsewhere, would you like to update it, YES OR NO"
Its always been fine for me.
Spudhead
02-05-2004, 03:03 PM
Whether or not you use DW, or any WYSIWYG editor, depends on what you're going to use that code for.
I'm you're want to construct a complete, one-off page, maybe just static HTML or at least just a small amount of server-side processing, you know that neither you nor anyone else is going to look too closely or critically at that code, you're a bit pressed for time and the point is to get the thing up, live, and working as soon as possible; then that is a good time to use a WYSIWYG editor. It might not be elegant but it'll work.
If you're dealing with heavy server-side processing that'll churn out an idential chunk of code for each of the 20,000 rows in your database; if you're working as part of a team of developers who might at any time need to automate parts of a page; if any of them give you grief about wading through reams of <font></font><font></font> tags; if your site makes frequent use of SSI's and modularised code; if you're concerned about the size of your pages and their loading time; if you look at function MM_findObj(n, d) and wonder which soul-less cretin spawned it; if you want your site to be an example of the most modern techniques in web coding: then that is a bad time to use a WYSIWYG editor.
Any other times are up to you :)
Len Whistler
02-06-2004, 01:23 AM
Spookster.......I stand corrected.
Whenever I made a page in GoLive5 and altered the code in Notepad I couldn't view it in GoLive5 again. But the browsers would show it.
I assumed that the same was for Dreamweaver.
Leonard Whistler
http://www.stubby.ca
Spookster
02-06-2004, 06:33 AM
Originally posted by Len Whistler
Spookster.......I stand corrected.
Whenever I made a page in GoLive5 and altered the code in Notepad I couldn't view it in GoLive5 again. But the browsers would show it.
I assumed that the same was for Dreamweaver.
Leonard Whistler
http://www.stubby.ca
I don't doubt that about Adobe GoLive. It's as bad as MS Frontpage in my opinion.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.