Forum Moderators: open

Message Too Old, No Replies

Dreamweaver Coding...

         

wfernley

1:41 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Guys.

I wanted to start a discussion about Dreamweaver MX. I have been doing Web Design for a year now and I operate my own Web Design Busines. I currently use Dreamweaver to design sites because I need the speed aspect of it and easy implementation of PHP.

I have heard from various people that Dreamweaver puts a lot of junk code in. I have also heard that JAVA Mouse-Rollovers have a lot of junk code if you use Dreamweaver.

I was curious if I can get some input from all you Webmasters out there about what kind of junk code Dreamweaver puts in its HTML Docs and how to change that code to be more efficient.

Thanks guys.

Wes

limbo

2:12 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One of the biggest areas of over-bloating in Dreamweaver is the font and style tags.

I have seen sentences that look like this :

<font face="Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif"><font face="Arial, Helvetica, sans-serif"><b><b><b><i><i>text</i></i></b></b></b></font></font></font>

All that for one word! Not good!

Have a look at the HTML in 'code view' and you will see your text wrapped in all manner of excess tags - especially in tables.

CSS is an excellent method for reducing code bloat produced in DW. Also I hear here that MX support of CSS is better than in previous versions.

[edited by: limbo at 2:27 pm (utc) on Dec. 10, 2003]

BlobFisk

2:13 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi wfernley,

This may be better off in the WYSIWYG and Text Code Editors Forum [webmasterworld.com]!

However, many of the DW behaviours produce quite bloated JavaScript, although I thing that it's HTML is ok. Having said that, I'd recommend hand coding - that way you are in total control and can keep your code neat and trim.

HTH

stever

2:29 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With regard to HTML and CSS, DW puts in a lot of junk if you don't know how to use it properly, as in limbo's example.

I could build a wall - but it would be useless because I don't know how to use the tools correctly. It doesn't mean the tools are bad, just that I don't know how to use them efficiently.

Some of DW's proprietary Javascript extensions produce bloated script (apparently, I'm not an expert at .js) and the Fireworks to Dreamweaver menu code is horrendous.

But equally there are some highly-praised simple and efficient javascript extensions out there for the programme which simplify preset behaviours or extend the possibilities available (not mentioning names due to URL-drop prohibition).

Of course, BlobFisk is right that it is better to learn to code Javascript by hand - but there are many competing languages and technologies these days and I understand from personal experience that it is hard to keep up-to-date in all of them.

wfernley

2:50 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the replies.

Yeah I have seen lines of code where the fonts and weights of the text have been messed up. I do use CSS and I find that fixes the problem. The JS is what I would have problems with because I don't know JS. Can you download any extensions for DW that fix that problem?

creative craig

3:06 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have recently moved to MX as I started a new job, I used to code all my XHTML, CSS and Javascript in notepad.

IMO it does add alot of tags that are not needed with Javascript and also with any type of style that you use in the page.

I still code by hand for any freelance work :)

wfernley

3:46 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK This, brings up another questions I have.

When I export a template in Photoshop, it makes each image in a cell. Is it better to have all the images in one cell, or a cell for each image?

Because of having a cell for each image, would this slow the site down?

Thanks for your help :)

Wes

CyrusG

5:12 pm on Dec 10, 2003 (gmt 0)



Are you talking about your slices of an image or layout? If so, I would suggest placing each image in a cell to maintain full control over placement, but I'm new here.

stever

5:15 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you say a cell, I presume you are referring to a table cell. I'm not sure about Photoshop templates (I'm a Fireworks user) but I virtually never just export a template from a graphics programme.

Firstly, a cell is just a container - and it can just as well be a div as a table cell.

Secondly, in many designs, images can be reused or repeated as backgrounds for cells, divs, headings, saving substantial amounts of weight in downloading a page.

Have a look at the CSS forum while you're here - there's a lot of good information there about reducing page weight and getting away from the old graphic design-to-html route.

wfernley

5:20 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks. I will look at the CSS forum. I current use graphics for repeating backgrounds where possible.

Thanks again :)

Wes

thehittmann

2:29 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



I started web designing with frontpage 97>2000>XP then to Dreamweaver MX 2004 which i currently use now. Every page I make ends up being edited in Notepad at some point, just cos i cant be bothered waiting for Dreamweaver or Frontpage to load. Its just easier and quicker sometimes.

I still use frontpage for somethings but I found that it does leave lots of white space everywhere making file sizes bigger.

Ive found that Dreamweaver has a lot less junk code, if you set your styles and texts properly you eliminate all the un-necessary <font face="" color="" size="" align=""> tags. It also has a tag inspector built in to point out the not needed tags. But no program is going to write you the cleanest possible code. You have to do some things yourself still. Personally I dont use rollover mouse effects, they annoy me.

balinor

7:53 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



Hi Wes, I'll add my 2cents here.

I learned HTML the old fashioned way, in notepad. But I use Dreamweaver MX as my primary editor because it does a lot of things automatically (especially things like site-wide find and replace). However, I always have the screen split so I can see what is going on in the code, as even Dreamweaver makes a mess of things from time to time. I have found that DW doesn't create a lot of garbage code, especially if you are using CSS, which I HIGHLY recommend. Not a font tag to be seen! As far as the JavaScript, I have used both the Dreamweaver versions, and other 'shared' scripts for things like rollovers, and I honestly don't see all that much of a difference in performance or 'bloat'. IMHO, Dreamweaver is the best WYSIWYG editor out there, but I would recommend always looking at the HTML anyway. Hope this helps!

Regards,
Padraic

yowza

8:01 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



wfernley

You can get JavaScript extensions on the Macromedia site. There are also many more on the web you can find by doing a search.

wfernley

8:22 pm on Dec 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks guys.

Yeah I think Dreamweaver is the best editor I have seen, and I will never touch Frontpage, thats a whole different discussion right there.

I use CSS extensively because of the font tag issues, also because it makes editing later on a lot easier. If there isn't that big of a deal with the JS rollovers then thats good. I have heard some programmers say good and bad things, so I might as well use it considering I don't know JS.

Aside from these issues, are there any other issues I should be careful with while using Dreamweaver?

Wes