473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Coding practices of large sites

I've seen a few attractive multi-column sites whose geometry is based
on pure CSS-P, but they're what you might call "code afficionado"
sites, where the subject matter of the site is "coding practices." (One
example of this is alistapart.com.) However, the project/development
realities for small boutique sites are completely different from those
of large commercial or institutional sites -- and I was curious to see
what coding approaches are currently in use at the latter. So I made up
a list of big commercial sites off the top of my head, visited each
site on the list, and looked at their code. The quick summaries of what
I found are below. (I looked at home pages only. Add ".com" to each
name for site location.)

Even if you just skim through the results, please notice at the end of
this post: my very brief comment, and my two questions coming out of
all this.

---------------------
_Amazon_
No doctype.
CSS styles and JavaScripts defined in head and body.
Body a mix of absolute positioned CSS, tables, and JavaScripts.
---------------------
_Apple_
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Mostly table code; some CSS; inline JavaScripts.
---------------------
_BBC_
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
Tables; CSS; CSS classes applied to table elements.
---------------------
_CNN_
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html
lang="en">
Tables; CSS; CSS classes applied to table elements.
---------------------
_Ebay_
Unbelievably long and complex code: loading the home page loads 31 (!)
additional text files into the cache (one is a CSS file, the others are
all JavaScript files). HTML file features:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML XMLNS:IE>
Mostly table code with old-fashioned tags like <font...> etc. Many tag
constructions like <BR><BR><BR> and &nbsp;&nbsp;|&nbsp;
Numerous inline JavaScripts.
The only external CSS file ("homepage.css") is incredibly short and
completely incomprehensible to me. Here are its entire contents:

@media all {
IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
---------------------
_Google_ (simple search)
No DTD. No external linked files. Extensive inline JavaScripts.
Uses table code with old-fashioned tags like <font...> etc.; some
inline CSS.
_Google_ (advanced seach)
No DTD. Code similar to simple-search, except more CSS defined in head.
---------------------
_IBM_
<!DOCTYPE html SYSTEM
"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd">
Mostly table code, with some CSS classes applied to table elements;
uses code constructions like &nbsp;&nbsp;|&nbsp;&nbsp;
---------------------
_Microsoft_ No DTD. Mostly table code, with CSS styles applied to
table elements.
_Slate_ No DTD. Mostly tables; some CSS. Weird code.
---------------------
_NYTimes_
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Note linked script name: <script src="/js/csssniff.js"></script>
Table code, use tags like <br><br> and <font face...
---------------------

Summary - what I found:
Every large commercial site I looked at used table code, not CSS-P, to
define its page geometry. (Amazon was a partial exception; they used
both.) All used CSS to define typographic styles, and sometimes other
things, at least to some extent; although <font... and other deprecated
tags were also common.

Two questions:
Large sites typically have separate job functions for Web developers
(coders) and designers. Logically, I have to assume that at least
*some* of these sites have knowledgeable developer teams; and for that
matter, even graphical editing programs like Dreamweaver have
increasing levels of CSS support. So why these results? Specifically:

1. If, as the regulars in this newsgroup believe, CSS is clearly
superior to table code for defining page layout, why are *none* of
these sites relying on CSS for that purpose?

2. Can anybody provide links to any large commercial or institutional
sites (whose subject matter is not "coding practices") that *do* use
CSS to define their page geometry, so that I can look at their code?

These questions are not rhetorical arguments-in-disguise; I really
haven't made up my mind yet, and I'm certainly not trying to start an
argument. I look forward to your replies.
Jul 20 '05
55 5087
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
JRS: In article <OxJBc.1151$4D4.1104@newsfe3-gui>, seen in news:comp.in
fosystems.www.authoring.stylesheets, Barry Pearson <news@childsupportana
lysis.co.uk> posted at Mon, 21 Jun 2004 22:44:45 :
I hope you accept that layout-tables are not deprecated. They will be valid
with Strict documents for decades to come.

So will <blockquote><p>This text is indented</p></blockquote> (in
situations where you aren't quoting someone saying 'This text is
indented'.

SGML validity doesn't imply meeting the specification, and the
specification's recommendation against using layout tables is exactly
as strong as its recommendation against using deprecated elements.
Therefore, ISTM that there should be (and that it would be easy in all
respects to add) a new mark-up GRID; it would behave visually just like
TABLE, but would not carry the same implication. It could use the
existing TD TH & TR, or new GD GH GR.


In that case, GH is almost certainly unnecessary - what would a Grid
Header be? Combining GH and GD into GC (Grid Cell) would make more
sense. However:

Rather than adding GRID (which would of course start off with no
browser support) why not use <div style='display: table;'> (or better
<div class='grid'> with appropriate stylesheet) which already has
browser support.

--
Chris
Jul 20 '05 #51
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> wrote in message news:<Pi*******************************@ppepc56.ph .gla.ac.uk>...
Fortunately, this apparent [Microsoft] attempt to completely discredit CSS for all
time was a failure :-}


Presumably M$oft had an Evil Alternative Proprietary Standard to use
instead (anyone remember Blackbird ?). Any idea what it was, and how
ugly it was ?
Jul 20 '05 #52
On Mon, 28 Jun 2004 13:41:54 +0100, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:
...there should be (and that it would be easy in all
respects to add) a new mark-up GRID...


You have missed just about every part of presentational discussion that
has been in ciwas through the last five years; right?

--
Rex
Jul 20 '05 #53
JRS: In article <87************@dinopsis.dur.ac.uk>, seen in news:comp.
infosystems.www.authoring.stylesheets, Chris Morris
<c.********@durham.ac.uk> posted at Tue, 29 Jun 2004 09:32:41 :
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
Therefore, ISTM that there should be (and that it would be easy in all
respects to add) a new mark-up GRID; it would behave visually just like
TABLE, but would not carry the same implication. It could use the
existing TD TH & TR, or new GD GH GR.


In that case, GH is almost certainly unnecessary - what would a Grid
Header be? Combining GH and GD into GC (Grid Cell) would make more
sense. However:


A GH would be just as useful as a TH, and rendered similarly. Default
TH here is bold centred; in a grid of entities a bold centred header can
be equally useful. The point is that GRID would exactly match the
functionality of TABLE, except for the spelling of the tags; it would
then use the same implementation code, and be cheap.
Rather than adding GRID (which would of course start off with no
browser support)
Accepted, naturally; the suggestion would best have been implemented in
the mid- or late- nineties.
why not use <div style='display: table;'> (or better
<div class='grid'> with appropriate stylesheet) which already has
browser support.


Perhaps so : but as an academic you will realise that the more benefit
that is obtained from a given amount of learning the better. If table-
based layout is functionally adequate but semantically unsound, what
need to learn a whole new set of features not otherwise yet required?
.... except to employ more academics, I suppose.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
I find MiniTrue useful for viewing/searching/altering files, at a DOS prompt;
free, DOS/Win/UNIX, <URL:http://www.idiotsdelight.net/minitrue/> Update hope?
Jul 20 '05 #54
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
infosystems.www.authoring.stylesheets, Chris Morris
<c.********@durham.ac.uk> posted at Tue, 29 Jun 2004 09:32:41 :
Dr John Stockton <sp**@merlyn.demon.co.uk> writes:
Therefore, ISTM that there should be (and that it would be easy in all
respects to add) a new mark-up GRID; it would behave visually just like
TABLE, but would not carry the same implication. It could use the
existing TD TH & TR, or new GD GH GR.
In that case, GH is almost certainly unnecessary - what would a Grid
Header be? Combining GH and GD into GC (Grid Cell) would make more
sense. However:


A GH would be just as useful as a TH, and rendered similarly. Default
TH here is bold centred; in a grid of entities a bold centred header can
be equally useful.


If a header is being useful then the content being marked up is almost
certainly Genuine Tabular Data (TM) and so <table> is perfectly
appropriate.
The point is that GRID would exactly match the
functionality of TABLE, except for the spelling of the tags; it would
then use the same implementation code, and be cheap.
It would use the same implementation code in certain browsers,
anyway. I can think of several browser (families) that would want to
have different displays for GRID and for TABLE.

If we ever get a browser that does interesting things with data tables
[1] (selectively hide/show rows or columns, automatically provide
totals, averages, and other statistics for numeric lines, etc) then
it'd want to display them differently too.

[1] Stopping it doing the same thing to layout tables is perhaps more
of a challenge.
Rather than adding GRID (which would of course start off with no
browser support)


Accepted, naturally; the suggestion would best have been implemented in
the mid- or late- nineties.


Technically it could be stuck on as a module for one of the recent
XHTML recommendations, but decent browser support for that isn't
likely to come quickly, and the display algorithm would need the CSS
rules to tell it to be a grid, so using <div> seems more logical.
why not use <div style='display: table;'> (or better
<div class='grid'> with appropriate stylesheet) which already has
browser support.


Perhaps so : but as an academic you will realise that the more benefit
that is obtained from a given amount of learning the better.


Provided you don't then run into local maxima and need to unlearn
things to progress further, yes.
If table- based layout is functionally adequate but semantically
unsound, what need to learn a whole new set of features not
otherwise yet required?


There are useful things which can be done with CSS layout that cannot
be done with table layout [1]. There are certainly useful things that
are far easier with CSS layout than table layout. And if one is using
CSS for colours, fonts, etc. (as is always a good practice) then it's
not a whole new set of features to learn, but simply an extension of
already known ones.

Also, under certain conditions, table-based layout is not functionally
adequate - precisely because there are browsers that should treat
TABLE and GRID differently.

[1] With current IE's lack of support for display: table, the reverse
is also true - for now - in a minority of cases. I can't imagine IE7
not fixing this, when (if) it finally gets released, however.

--
Chris
Jul 20 '05 #55
Bog
On Mon, 21 Jun 2004 16:21:43 GMT, Jonas Smithson wrote:

[cut]
2. Can anybody provide links to any large commercial or institutional
sites (whose subject matter is not "coding practices") that *do* use
CSS to define their page geometry, so that I can look at their code?


Jonas, after reading the whole interesting thread, I have one site for you:
the site of the ministry of Health, Welfare and Sports in The Netherlands
switched to XHTML 1.0 Strict/CSS design completely in January 2004, see
http://www.minvws.nl/. The site uses the Tridion CMS at the backend.

All governmental sites in Holland will probably try to pursue this coming
years.

Greetz, Bog
Jul 20 '05 #56

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

102
by: RFox | last post by:
I date back to the early days of the web when HTML was limited but very managable, and have always maintained that hand-coding HTML gives you far better control and cleaner HTML markup than any...
1
by: Todd | last post by:
Does anyone know of a book for C# .NET on coding standards and guidelines? My company is in the process of defining this stuff as we move to C# .NET. I could swear I picked up a book like this...
4
by: dotNetDave | last post by:
About three weeks ago I released the first .NET coding standards book titled "VSDN Tips & Tricks .NET Coding Standards". Here is what the famous author/ speaker Deborah Kurata says about it: ...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
2
by: Ed_P | last post by:
Hello I just wanted to get the opinions of those of you who have experience developing C# applications and programming in general. I currently am learning the basics of programming (choosing C#...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
50
by: Konrad Palczynski | last post by:
I am looking for tool to validate conformity to defined coding standard. I have already found Parasoft's C++ Test, but it is quite expensive. Is there any Open Source alternative? I do not need...
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.