User Name
Password
AppleNova Forums » Apple Products »

Code created in iWeb: just how bad is it?


Register Members List Calendar Search FAQ Posting Guidelines
Code created in iWeb: just how bad is it?
Page 1 of 2 [1] 2  Next Thread Tools
mowenbrown
Member
 
Join Date: Jul 2005
Location: Washington, DC
 
2006-01-24, 18:01

Does iWeb allow you to create pages from the template to get them up and running quickly, and then modify them using html/xhtml/css? or are are you stuck just using templates?

""The end of the world, most experts agree, will come about as a result of an accident. That's where we come in: we're computer professionals, and we cause accidents."
-unknown
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-24, 18:19

You can modify the finished pages in any text editor.

Note that you generally won't want to, though. The code that iWeb produces is u-g-l-y.
  quote
mowenbrown
Member
 
Join Date: Jul 2005
Location: Washington, DC
 
2006-01-24, 19:27

Quote:
Originally Posted by Brad
You can modify the finished pages in any text editor.

Note that you generally won't want to, though. The code that iWeb produces is u-g-l-y.
Worse than DreamWeaver?
  quote
torifile
Less than Stellar Member
 
Join Date: May 2004
Location: Durham, NC
Send a message via AIM to torifile  
2006-01-25, 02:19

Quote:
Originally Posted by Brad
You can modify the finished pages in any text editor.

Note that you generally won't want to, though. The code that iWeb produces is u-g-l-y.
Tru dat.

Jeez. I was trying to use the "look" of the site on the blog section with a real blogger (wordpress) and it's a pain in the ass. A large part of that is my CSS knowledge is seriously lacking.... but still... it's not really easy for mere mortals.

If it's not red and showing substantial musculature, you're wearing it wrong.
  quote
turbulentfurball
Right Honourable Member
 
Join Date: Dec 2005
Location: Québec
Send a message via ICQ to turbulentfurball Send a message via AIM to turbulentfurball Send a message via MSN to turbulentfurball  
2006-01-25, 05:00

Quote:
Originally Posted by mowenbrown
Worse than DreamWeaver?
It looks even worse than FrontPage, which I'm ashamed to have used in the past! Not that I'm complaining, so long as the sites look great!
  quote
morningstarrising
Veteran Member
 
Join Date: Jan 2005
Location: Philadelphia, PA
 
2006-01-25, 11:02

Quote:
Originally Posted by torifile
it's not really easy for mere mortals.
Yup , yup..I'm sure I'd could make my own page, but if it wasn't for Apple, I wouldn't have video of me up online anywhere....



....I don't know if that's a good or bad thing.

Jebus Google, just buy Apple already...
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2006-01-25, 11:39

iWeb actually produces really good code. I don't know what you all are going on about. It is miles ahead of Frontpage. Try and validate some of these pages, they validate as valid XHTMl 1.0 transitional. Not too shabby. The sites look really good as well. If a page validates why the heck do you care what the html code looks like? When was the last time you cracked open a PDF and said, "Wow that's some horrible pdf code right there!" I would say that hand coding html is an artifact of a time when standards sucked for browsers and code. Now that the tools can output a standard, and the browsers can read a standard, wysiwyg editors should be all that you need.

"Slow vehicle speeds with frequent stops would signal traffic congestion, for instance."

uh... it could also signal that my Mom is at the wheel...
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 13:24

Quote:
Originally Posted by Mr Beardsley
iWeb actually produces really good code. I don't know what you all are going on about. It is miles ahead of Frontpage. Try and validate some of these pages, they validate as valid XHTMl 1.0 transitional.
*sigh*

Valid Code != Good Code



The same goes for any language, not just XHTML and CSS. It's easy to write a program that compiles and runs but is full of redundancies, obfuscations, and bad design. Just the same, it's easy to make a web page that validates and displays okay but has code that is full of redundancies, obfuscations, and bad design.

Since when would something like, for example, this be considered "good" code?
Quote:
<div><div><div class="Normal"><div class="paragraph Title" style="line-height: 45px; margin-bottom: 0px; margin-top: 0px; padding-bottom: 0pt; padding-top: 0pt; font-family: 'GillSans', 'Gill Sans', 'Trebuchet MS', 'sans-serif'; font-size: 39px; font-weight: normal; line-height: 45px;">LaCunha Photo Blog</div>
</div>
</div>
</div>
(taken from the LaCunha Photo Blog above)

Just to scratch the surface with this small section: it uses multiple unnecessary nested divs, uses <div> where <p> or <h{1|2|3|4|5|6}>makes much better sense semantically, has multiple vague classes, mixes hard-coded presentation with content despite the aforementioned classes, has redundant hard-coded CSS, and line breaks and indentation are totally absent or inconsistent.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
spotcatbug
Veteran Member
 
Join Date: May 2004
Location: Clayton, NC
 
2006-01-25, 13:44

The iWeb output is not supposed to be human readable or even understandable.

Think of it as a compiler. No, wait, better, a C++ preprocessor from the olden days before C++ compilers existed. That, machine-generated C code was horrendous to look at. It was valid, compilable C code, but definitely not what you would call "good" in the sense of understandable and maintainable. Nobody would go into the C code to make changes, they would change the C++ code.

Same for iWeb.

Ugh.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-25, 13:47

Quote:
Originally Posted by spotcatbug
The iWeb output is not supposed to be human readable or even understandable.
HTML is a semantic language, not machine code.
  quote
spotcatbug
Veteran Member
 
Join Date: May 2004
Location: Clayton, NC
 
2006-01-25, 13:48

Quote:
Originally Posted by chucker
HTML is a semantic language, not machine code.
Did you not read my reference to C++ preprocessors? C code is a semantic language, too.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 13:50

That's not a good analogy.

Compiler-created code is impossible to read because compilers are generally "smarter" than most mere mortals. Compilers usually create code that is tighter and more efficient than what humans create.

iWeb does the opposite.

iWeb fails to create human-readable code, it fails to create more efficient code, and it fails to create semantically-meaningful code.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
spotcatbug
Veteran Member
 
Join Date: May 2004
Location: Clayton, NC
 
2006-01-25, 13:57

I thought you meant "good" as in readable and maintainable, not tight and efficient. Never mind.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-25, 13:57

Quote:
Originally Posted by spotcatbug
Did you not read my reference to C++ preprocessors?
Yes. It's severely flawed.

Quote:
C code is a semantic language, too.
I don't think calling a programming language "semantic" or "not semantic" doesn't work. Does C++ pre-define what the methods in your code mean? No. Does XHTML pre-define what its elements such as p, em, strong, ul/li, ol/li, dl/dd, h1-6, etc. mean? Yes, absolutely.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 13:58

Quote:
Originally Posted by spotcatbug
I thought you meant "good" as in readable and maintainable, not tight and efficient. Never mind.
Well, no matter which way you read it, iWeb is good at neither.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 14:04

Note: I have split this thread from the existing iWeb discussion here.
  quote
torifile
Less than Stellar Member
 
Join Date: May 2004
Location: Durham, NC
Send a message via AIM to torifile  
2006-01-25, 14:12

Quote:
Originally Posted by Brad
iWeb fails to create human-readable code, it fails to create more efficient code, and it fails to create semantically-meaningful code.
These are my major gripes about it. I would *love* it if it produced code that I could then take apart and customize without much trouble. But last night was a near exercise in futility because the code was so hard to follow. BUT, iWeb is leaps and bounds above where we were a month ago.

If it's not red and showing substantial musculature, you're wearing it wrong.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-25, 14:14

Still, some of the decisions just don't make sense. Why create a "paragraph" class? That's what the p element is for. Why a "body" class? body already does that. Why use inline styling so repetitively?
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2006-01-25, 15:20

Quote:
Originally Posted by Brad
iWeb fails to create human-readable code, it fails to create more efficient code, and it fails to create semantically-meaningful code.
My question is why does that matter? Your browser knows what to do with it, and can display it just fine. Why are people so concerned that the output from a tool has to look just like the best human written code? Is it really going to be any faster? I very much doubt it. Parsing some redundant styles is nothing when you have to deal with downloading and displaying images. Do you view the source of pages that you visit, read the tags, and "matrix like" construct an image of the page in your head? Then why do you care what the HTML looks like? Is it because you want to hand edit it? When was the last time you worried about hand editing an RTF file? You think there aren't any redundancies in them? How about your .docs from Word? The PDFs you output from pages? I'm sure it if was possible, you could hand edit your InDesign documents and make them more efficient as well.

My whole point is computers are really good at parsing things. Humans are very good at designing pleasing things. We should let each do what they do best. Do I think that iWeb couldn't produce better HTML? No, I'm sure it could. Do I think it really matters? No, I don't think it does.

"Slow vehicle speeds with frequent stops would signal traffic congestion, for instance."

uh... it could also signal that my Mom is at the wheel...
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-25, 15:26

RTF, .doc and PDF aren't human-readable formats. HTML is. End of story. Really, this debate has been beaten to death so badly over the years that I'm surprised it's still even brought up.

Well-formed markup is nice. Validating markup is better. But non-semantic markup is still something that could be so much better.

Why settle for less? We're all using Macs, aren't we?
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2006-01-25, 15:42

Quote:
Originally Posted by chucker
We're all using Macs, aren't we?
Exactly! Why should I muck around in tags when I could be dragging and dropping if the computer can read and display either one with no difference?
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-01-25, 15:43

Quote:
Originally Posted by Mr Beardsley
Exactly! Why should I muck around in tags when I could be dragging and dropping if the computer can read and display either one with no difference?
Why should we accept iWeb creating subpar code when it could be doing better? What's wrong with the criticism?
  quote
torifile
Less than Stellar Member
 
Join Date: May 2004
Location: Durham, NC
Send a message via AIM to torifile  
2006-01-25, 15:58

Quote:
Originally Posted by Mr Beardsley
Exactly! Why should I muck around in tags when I could be dragging and dropping if the computer can read and display either one with no difference?
Because we're perfectionists and 'good enough' isn't good enough for us! I'm a perfect example of why one would want readable code - I created a site with iWeb. It was spectacularly easy to get one up. That was the good part. It was very fast to get a site that works and looks good. Now I want to go back and tweak it some. Add my own blog software, make it dynamic, if I want, etc. But working within the tangled code has been very difficult.

Don't get me wrong, I think there is a lot of value to have a template driven system, but I have to be able to make it the way *I* want it, working how I would like. iWeb gets a 7.5 on my scale.

If it's not red and showing substantial musculature, you're wearing it wrong.
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2006-01-25, 16:00

Quote:
Originally Posted by chucker
Why should we accept iWeb creating subpar code when it could be doing better? What's wrong with the criticism?
Because the reason for criticism is becoming a non-issue. Back when teh intarweb was slow, computers were slow, browsers sucked, and html had no real standard, beautiful hand coded HTML had tangible advantages. Those same advantages don't hold today. For me if the HTML is valid, displays correctly, and can be designed with a wysiwyg editor I could care less what it looks like. Your computer doesn't care either.

"Slow vehicle speeds with frequent stops would signal traffic congestion, for instance."

uh... it could also signal that my Mom is at the wheel...
  quote
eventhorizon
Member
 
Join Date: May 2004
 
2006-01-25, 16:11

Quote:
Originally Posted by chucker
Why should we accept iWeb creating subpar code when it could be doing better? What's wrong with the criticism?
Explain again why it's such a big deal. If it's validated code that browsers can display and the time lag caused by the redundancies in the code is negligible, what's the bfd?
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 17:05

Quote:
Originally Posted by eventhorizon
Explain again why it's such a big deal. If it's validated code that browsers can display and the time lag caused by the redundancies in the code is negligible, what's the bfd?
Did you miss the post that started this thread? And torifile's followup?

XHTML is supposed to be relatively easy for humans to understand and change by hand. iWeb produces code that isn't. Thus, we have a problem that's the "bfd." QED.

There are plenty of people, from novice to professional, that want to have human-readable output so they can swap around pieces of code and tweak bits that iWeb (or another WYSIWYG editor of choice) doesn't allow you to change. Editors like iWeb that produce trashy code make customizing and integrating with outside parts nearly impossible. It's not just that iWeb produces redundant code that may be slow; the problem is also that iWeb produces code that is so redundant and twisted that it becomes impossible to edit with anything but iWeb.

Quote:
Originally Posted by Mr Beardsley
How about your .docs from Word?
I find this comparison to Word documents interesting and I'm genuinely surprised you chose it. Word is a fully stand-alone content system. You create documents in Word and you display documents in Word. It is a closed, end-to-end system. Ever tried opening a moderately-complex Word document in another editor? TextEdit? Pages? Mellel? Nisus? OpenOffice? Ever try creating something complex in one of those and them opening in Word? They all mangle the format in bizarre ways. Why? Because the Word document is a closed format with binary objects that isn't intended to be readable by other applications and certainly not by humans.

XHTML, of the other hand, is by design an open format that has semantic meaning and is not meant to be locked into any one particular publishing flow. It's meant to be clean and logical, separating content from presentation to facilitate display by various readers or presentation formats. XHTML is designed to play well with traditional browsers, screen readers, search engines, custom XML parsers, and so forth.

XHTML files and Word docs are polar opposites in this regard. So, the analogy fails badly.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2006-01-25, 18:01

Quote:
Originally Posted by Brad
Since when would something like, for example, this be considered "good" code?

(taken from the LaCunha Photo Blog above)

Just to scratch the surface with this small section: it uses multiple unnecessary nested divs, uses <div> where <p> or <h{1|2|3|4|5|6}>makes much better sense semantically, has multiple vague classes, mixes hard-coded presentation with content despite the aforementioned classes, has redundant hard-coded CSS, and line breaks and indentation are totally absent or inconsistent.
Oh the horror of two empty divs! Well crap there's no possible way I can figure out what that's supposed to mean or do. I bet that makes it take 20 minutes longer to load. The reason that they don't use <p> or <h whatever> is that placing it in a div lets you just edit the text like you would in any word processor. This is a consumer app that is designed to be easy for consumers to use. Why should someone who knows nothing of web design have to choose h1-h6 if they don't even know what those mean? However, I'm sure they know what bold 24 pt does.

"Slow vehicle speeds with frequent stops would signal traffic congestion, for instance."

uh... it could also signal that my Mom is at the wheel...
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 18:04

Quote:
Originally Posted by Mr Beardsley
Oh the horror of two empty divs! Well crap there's no possible way I can figure out what that's supposed to mean or do. I bet that makes it take 20 minutes longer to load.
Thanks for the hyperbole! It really helps.

Quote:
Originally Posted by Mr Beardsley
Why should someone who knows nothing of web design have to choose h1-h6 if they don't even know what those mean? However, I'm sure they know what bold 24 pt does.
I think you missed my last post:

"XHTML is designed to play well with traditional browsers, screen readers, search engines, custom XML parsers, and so forth."

Different tags exist for different purposes. That's why <div> isn't the only tag in the DTD. An application from a high-profile company like Apple should be able to produce code with better semantical layout even if Joe Creator doesn't look at it himself.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Mr Beardsley
Member
 
Join Date: Jul 2004
Location: Colorado Springs
Send a message via AIM to Mr Beardsley  
2006-01-25, 18:17

Quote:
Originally Posted by Brad
Thanks for the hyperbole! It really helps.
Quote:
Originally Posted by Brad
*sigh*

Valid Code != Good Code


Very sorry, we'll stick to you being condescending instead.

Quote:
Originally Posted by Brad
I think you missed my last post:

"XHTML is designed to play well with traditional browsers, screen readers, search engines, custom XML parsers, and so forth."

Different tags exist for different purposes. That's why <div> isn't the only tag in the DTD. An application from a high-profile company like Apple should be able to produce code with better semantical layout even if Joe Creator doesn't look at it himself.
Maybe they did it that way because having a machine guess the indended symantecs of a human is a non-trivial task. I'm sure they could have made it more like WO Builder if they had wanted. For their target iLife audience allowing full control without domain knowledge seems to make folks happy.

"Slow vehicle speeds with frequent stops would signal traffic congestion, for instance."

uh... it could also signal that my Mom is at the wheel...
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2006-01-25, 18:30

Quote:
Originally Posted by Mr Beardsley
Maybe they did it that way because having a machine guess the indended symantecs of a human is a non-trivial task.
When you're working from templates, as iWeb generally is, it's not very hard at all to create decent code. Template-based editors don't really have to guess at semantics; they just work with what the programmer originally defined and add special cases where necessary. How else do you think other template-based applications like RapidWeaver manage to produce better-looking code? It's not rocket science; it's quite doable.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Page 1 of 2 [1] 2  Next

Post Reply

Forum Jump
Thread Tools

« Previous Thread | Next Thread »

All times are GMT -5. The time now is 16:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova