Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Web Coding

Reply
 
LinkBack Thread Tools
Old 08-26-08   #11 (permalink)
Linux Lobbyist
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: England
Posts: 2,046

Rep: 225 lattyware is acknowledged by manylattyware is acknowledged by manylattyware is acknowledged by many
Unique Rep: 164
Hardware Reviews: 1
Trader Rating: 0
Default

1) You need a Doctype Declaration - that tells the browser what it is it is rendering. Is it HTML? XHTML? What version?

2) Tables for layout are disgusting, CSS for Style and Layout, (X)HTML for markup.
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club
There are three types of software. Free as in speech (FOSS), Free as in beer (Freeware) and Free as in BitTorrent.

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2 x 500GB SATA (ST3500641AS), 250GB IDE, 200GB IDE
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch x64 w/KDE4.1
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline lattyware's Gallery   Reply With Quote
Old 08-26-08   #12 (permalink)
Programmer
 
OasisGames's Avatar
 
intel

Join Date: Mar 2008
Posts: 178

Rep: 24 OasisGames is acknowledged by some
Unique Rep: 23
Trader Rating: 0
Default

Quote:
Originally Posted by lattyware View Post
2) Tables for layout are disgusting, CSS for Style and Layout, (X)HTML for markup.
Tsk tsk. This is one of the most heavily debated subjects in all of web coding. Or it was, until it finally died ending with 'to each his own'. It all depends on what you're trying to layout. Though, yeah, what he's doing would best be done with a <div>...
__________________
Compiz-Fusion Developer
Ubuntu Alpha Tester

System: Acer Aspire 5610
CPU
Centrio Duo T2250
Motherboard
Acer "Grapevine"
Memory
1024MB
Graphics Card
Intel GMA 945
Hard Drive
Hitachi 120GB
Sound Card
Intel HD Audio
Power Supply
12V DC
OS
Ubuntu 8.10
Monitor
15.4" 1280x800
OasisGames is offline   Reply With Quote
Old 08-26-08   #13 (permalink)
Linux Lobbyist
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: England
Posts: 2,046

Rep: 225 lattyware is acknowledged by manylattyware is acknowledged by manylattyware is acknowledged by many
Unique Rep: 164
Hardware Reviews: 1
Trader Rating: 0
Default

Quote:
Originally Posted by OasisGames View Post
Tsk tsk. This is one of the most heavily debated subjects in all of web coding. Or it was, until it finally died ending with 'to each his own'. It all depends on what you're trying to layout. Though, yeah, what he's doing would best be done with a <div>...
I'm sorry, what?

Tables are for tabulated data. Using them for layout can cause major accessability problems, not to mention disgusting, unmaintainable code which is hard to deal with. There are no advantages. It's slightly easier if you have never used CSS for layout, but that's just laziness.
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club
There are three types of software. Free as in speech (FOSS), Free as in beer (Freeware) and Free as in BitTorrent.

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2 x 500GB SATA (ST3500641AS), 250GB IDE, 200GB IDE
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch x64 w/KDE4.1
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline lattyware's Gallery   Reply With Quote
Old 08-26-08   #14 (permalink)
1:14 Camera:People Ratio
 
Highly-Annoyed's Avatar
 
intel ati

Join Date: Jun 2005
Location: On CCTV
Posts: 1,953

Rep: 326 Highly-Annoyed is a proven memberHighly-Annoyed is a proven memberHighly-Annoyed is a proven memberHighly-Annoyed is a proven member
Unique Rep: 231
Folding Team Rank: 724
Trader Rating: 0
Default

Quote:
Originally Posted by lattyware View Post
1) You need a Doctype Declaration - that tells the browser what it is it is rendering. Is it HTML? XHTML? What version?

2) Tables for layout are disgusting, CSS for Style and Layout, (X)HTML for markup.
You know, it's weird, I've never used the doctype declaration. I'd never even heard of it until this thread. Yet, despite it's utter absence from every wed site I've created, I've never had a problem loading those sites in IE6, IE7 or FF... If the doctype is required, how come web pages work without it?

As for laying stuff out with tables. Well, I've never done anything else. I barely ever use CSS at all, unless it's to solve a problem I can't find a solution to any other way. As I said earlier, I'm not educated in web design at all. I've just taught myself as I went along and have just used what seemed most logical at the time, or what was easiest to get the job done.

Idk, maybe you see some kind of beauty in code, but I certainly do not. I just see it as a means to an end. I frankly don't care how elegant the code is, as long as the end result matches, or comes close to, what I want to achieve. Frankly, I'm just happy if it works, which it always has done for me in the end, even if the W3C checker might not of liked it.

To be honest, I know that a professional could achieve far greater results than I can, with a much more polished final look, with more logical, or elegant coding, but doing things my way costs me nothing and gets a result I can be satisfied with, at least in the medium term. Paying a professional would cost me a lot and to be candid, I don't think the extra money would buy me much more in the way of functionality, or looks from a site, than I really need.

Sure, it would be better to hire a pro, but cost to me could be anywhere from £200 ($400 US) to £4000 ($8000 US) for the kind of things I want. The extra impact from a professional job on the average Joe or Jane, wouldn't really correlate with the money I would have to spend to get it imo and only a coder would appreciate elegance in the code. From a small business, or personal perspective, it simply makes more sense to cobble something together that looks OK, rather than pay hundreds, or even thousands to get a pro to do the work.

Quote:
Originally Posted by OasisGames View Post
Tsk tsk. This is one of the most heavily debated subjects in all of web coding. Or it was, until it finally died ending with 'to each his own'. It all depends on what you're trying to layout. Though, yeah, what he's doing would best be done with a <div>...
LOL, like much else in this field, the controversy over this issue was something I was not aware of .

Quote:
Originally Posted by lattyware View Post
I'm sorry, what?

Tables are for tabulated data. Using them for layout can cause major accessability problems, not to mention disgusting, unmaintainable code which is hard to deal with. There are no advantages. It's slightly easier if you have never used CSS for layout, but that's just laziness.
Well, as I said, I'm certainly no expert, but in the few years I've been cobbling web sites together and teaching myself a few basics along the way, I've never found tables to be "unmaintainable". In fact, I find them rather easy to use as they follow a logical structure, rather like the kind of simple equations I'm used to using with spreadsheet work, where you need to use brackets to calculate financial figures etc. I also find it relatively easy to see the end result, just by looking at the tables, so that gives me a little extra guide as I code. Maybe CSS has the same kind of logical structure? I just don't know.

What do you mean by accessibility problems? Again, I've never had any issues I can think of that might fit this into this category, but perhaps I'm not interpreting what you mean correctly?

As I've said several times, I have had no education in web creation at all. Not a single minute of it. I've taught myself from scratch and just chose tables as that was all I knew about at the time. I've been using them for years and at least for what I've needed to do, I've never had any problems. When I think back to the thousands of hours I've spent making sites, I have to chuckle a little at you pronouncing me "lazy" .

You obviously have a different attitude to me with regards to web creation. You presumably see it with some reverence, as some kind of artform perhaps? Maybe the code sings to your emotions and it's elegant efficiency delights your intellect? Perhaps, to you, my kind of low tech, cobbling is an insult to the beauty and sophistication of the code you craft with? Maybe, you see it as mathematical clay, that you deftly sculpt with respect and love into something as elegant, as it is logical? I don't know? Clearly you have some passion for it anyway .

To me, it's simply a set of instructions that tell a browser what shapes, sizes and colours I want to appear on a screen, in what position and where I want text and pictures to appear within that framework. To me, it's a device, a vehicle through which I am able to achieve much greater things. Frankly, if my "disgusting" code, can create on the screen the same, or almost the same as some elegant code can, I don't see the difference, or care too much about it if I do.

If the result is good enough for me, what does it really matter how elegant the code is? The end user will never see the code, so other than some extra visual sophistication (most of which is lost on the average human anyway) and perhaps a few milliseconds of load time (which again, will be lost on most, if not all humans) what's the big deal about the code? From my point of view, there isn't an issue. If it works well enough for my needs, it's doing it's job. There's no real urgency for pretty code, to do the same job marginally better than "disgusting" code does; at least from my amateur perspective anyway .

Thanks again for your input people. It's been most interesting .

Highly-Annoyed
__________________
.
Wise men speak because they have something to say; Fools because they have to say something. -Plato
Talk sense to a fool and he calls you foolish. -Euripides .. Terrifying are the weaknesses of power. -Greek Proverb
----—-—-————————————————————————————————————————————————
My Favourite Windows XP Freeware Page . ...' ..'. Wowza's Core 2 Duo Motherboard Analysis
----—-—-————————————————————————————————————————————————
OCN Camera Club
Nikon D300 | Tamron 17-50mm f2.8 | Tamron 90mm Macro f2.8 | 2X SB600 Speedlights

System: Details & Benchmarks
CPU
E6600 @ 3.2GHz (400x8)
Motherboard
Gigabyte EP45-DS3P
Memory
2GB DDR2-800 OCZ Gold Rv.2
Graphics Card
X1950PRO 512MB 621/1350
Hard Drive
700GB SATA300 Storage
Sound Card
Realtek HD Audio
Power Supply
Corsair TX 750W
Case
Antec SLK3700-BQE (Black)
CPU cooling
Custom Water Cooling
GPU cooling
AC2
OS
XP Home SP3
Monitor
17" LCD (Black/Silver)

Last edited by Highly-Annoyed : 08-26-08 at 12:17 PM.
Highly-Annoyed is offline I fold for Overclock.net Overclocked Account Highly-Annoyed's Gallery   Reply With Quote
Old 08-26-08   #15 (permalink)
Linux Lobbyist
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: England
Posts: 2,046

Rep: 225 lattyware is acknowledged by manylattyware is acknowledged by manylattyware is acknowledged by many
Unique Rep: 164
Hardware Reviews: 1
Trader Rating: 0
Default

You think I was formally taught web design? I learnt it all by myself, online guides and the like.

Tables can cause problems for blind users using screen readers, for example - the screen reader will read the data as if it is a table. Acessability problems. Also text-based browsers, etc...

Sites work without doctypes as browsers can generally work it out, but it's good practice to put them there. It makes sure it'll work.

As to CSS vs Tables, look at the code for, as an example, this site I designed. Notice how it's human readable, and makes sense.

Now, the user may not see the code, but good code renders faster, works better cross-browser, is more readable by non standard software (screen readers, applications that use site content, text-based browsers), and is by far easier to maintain.

For example, if I wanted to change the layout of the site, I could do it by editing only the CSS, I wouldn't have to touch the XHTML. Now, with your site, you'd have to rewrite the table structure on every page.

Not only that, but technically attributes such as 'border' are depreciated - <img src="img.png" border="0px"> should be <img src="img.png" style="border: 0px;" /> - or even better, do it in an external stylesheet.

Things like the XHTML closing of tags (tags with no </> counterpart have a / in them, as seen above) make total sense. A program parsing the code would read an <img> tag and go searching for a </img> tag - which it'd never find and fail.

There are other things. <b> and <i> tags to bold and italicise are depreciated - What does a screen reader do when it comes across a bolded word, what exactly does bold mean? <em> (emphasis) tags should be used, and styled as you want with CSS - then a screen reader (or any other software) knows exactly what is needed. CSS tells it how to display it when drawn to a screen.

Using CSS/XHTML properly to create valid and good code is faster and easier for the web developer, and better for all end users.

Sure, most of your end users might not use alternate browsers, be they graphical, text or audio based, but why not design to a high standard when it is actually easier? You don't need to be a pro to write good code, you just need to look around and use the correct stuff.
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club
There are three types of software. Free as in speech (FOSS), Free as in beer (Freeware) and Free as in BitTorrent.

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2 x 500GB SATA (ST3500641AS), 250GB IDE, 200GB IDE
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch x64 w/KDE4.1
Monitor
Dell 2407WFP, Dell E248WFP

Last edited by lattyware : 08-26-08 at 12:37 PM.
lattyware is offline lattyware's Gallery   Reply With Quote
Old 08-26-08   #16 (permalink)
Photography nut
 
dangerousHobo's Avatar
 
amd nvidia

Join Date: Dec 2005
Location: ~/
Posts: 3,478

FAQs Submitted: 7
Folding Team Rank: 396
Trader Rating: 0
Default

Quote:
Originally Posted by lattyware View Post
Things like the XHTML closing of tags (tags with no </> counterpart have a / in them, as seen above) make total sense. A program parsing the code would read an <img> tag and go searching for a </img> tag - which it'd never find and fail.


Using CSS/XHTML properly to create valid and good code is faster and easier for the web developer, and better for all end users.
One thing to watch for is with the script tag. You need to end it with </> if its in the head. Because while it is valid XHTML it will not work in FF.

Using CSS/XHTML is defiantly easier to maintain for a front-end web developer. I have horror story I could tell about some ugly written sites I've been handed at my job.

Also you need to declare a type for your style and script tags.

EX)
Code:
<head>
		 
<!--[if IE]>
<style type="text/css">

body {filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#FFFFFF', startColorstr='#000000', gradientType='0');}

</style>	
<![endif]-->

</head>
__________________
"UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." - Doug Gwyn

Try out the latest Programming Challenge
Quote:
Originally Posted by Melcar
Only one reasonable way to solve this... a dance off.

CPU-Z Validation
@ 2.97-prime95 stable 16 hours @ 1.48v Proof | CPU-Z Validation @ 3.15


Getting Mouse Side Buttons to work in Linux, Compile a custom Kernel, More

System: Anomaly
CPU
Athlon 3700 SD(KACAE)0546 @3.02ghz
Motherboard
DFI UT nF4 Ultra-D
Memory
G.Skill 2x512 UTT(BH-5)
Graphics Card
evga 6800gs
Hard Drive
Maxtor 300GB + WD 250GB
Sound Card
onboard
Power Supply
Ultra 500w V-series
Case
one from Ultra
CPU cooling
Big Typhoon
GPU cooling
80mm fan mounted on
OS
Arch64 & Slackware 12.1
Monitor
Acer AL2216W 22" WS LCD
dangerousHobo is offline I fold for Overclock.net Overclocked Account dangerousHobo's Gallery   Reply With Quote
Old 08-26-08   #17 (permalink)
Programmer
 
OasisGames's Avatar
 
intel

Join Date: Mar 2008
Posts: 178

Rep: 24 OasisGames is acknowledged by some
Unique Rep: 23
Trader Rating: 0
Default

Quote:
Originally Posted by lattyware View Post
I'm sorry, what?

Tables are for tabulated data. Using them for layout can cause major accessability problems, not to mention disgusting, unmaintainable code which is hard to deal with. There are no advantages. It's slightly easier if you have never used CSS for layout, but that's just laziness.
I'm sorry, but what does vBulletin, Invision, phpBB, phpNuke, and every other piece of forum software (mine included) have in common? They use tables for layouts. Why? Because using a <div> for this stuff doesn't make sense. And this isn't just the (non-)tabulated data of a set of forum posts, but also menus, headers, and footers.

I'd also like to note that the days-of-old when mobile browsers didn't support tables are starting to come to an end.


Also, +1 to XHTML <... /> tags making perfect sense.
__________________
Compiz-Fusion Developer
Ubuntu Alpha Tester

System: Acer Aspire 5610
CPU
Centrio Duo T2250
Motherboard
Acer "Grapevine"
Memory
1024MB
Graphics Card
Intel GMA 945
Hard Drive
Hitachi 120GB
Sound Card
Intel HD Audio
Power Supply
12V DC
OS
Ubuntu 8.10
Monitor
15.4" 1280x800
OasisGames is offline   Reply With Quote
Old 08-26-08   #18 (permalink)
Linux Lobbyist
 
lattyware's Avatar
 
intel nvidia

Join Date: Feb 2007
Location: England
Posts: 2,046

Rep: 225 lattyware is acknowledged by manylattyware is acknowledged by manylattyware is acknowledged by many
Unique Rep: 164
Hardware Reviews: 1
Trader Rating: 0
Default

Quote:
Originally Posted by OasisGames View Post
I'm sorry, but what does vBulletin, Invision, phpBB, phpNuke, and every other piece of forum software (mine included) have in common? They use tables for layouts. Why? Because using a <div> for this stuff doesn't make sense. And this isn't just the (non-)tabulated data of a set of forum posts, but also menus, headers, and footers.

I'd also like to note that the days-of-old when mobile browsers didn't support tables are starting to come to an end.


Also, +1 to XHTML <... /> tags making perfect sense.
Why? Because they are written lazily, and also, forums are sort of tabulated data.

Still, the bact remains that CSS should be used for layout and styling - the separation of content and layout/style makes sense.

In theory, CSS has table layout stuff, so stuff that should be layed out as a table, but is not tabulated data (e.g.: a forum), problem is browsers don't have the support yet.

Tables for layout with forums is veugly-but-soon-to-be-redunant-and-yet-grudgingly-acceptable, tables for layout of the average site is an abomination.
__________________
Lattyware | Main (Sig) Rig: gBOX42 | Lan Rig: gLAN42
Never been convinced by Linux? Here is a challenge. | Using LVM
Scratched Disc? | Guide To LAN Parties | Writing a GUI application in Python/Glade
Etching an image into your case. | Wireless Access Points: Easy wireless networking.
A Member Of The OCN Anime/Manga Club
There are three types of software. Free as in speech (FOSS), Free as in beer (Freeware) and Free as in BitTorrent.

System: gBOX42
CPU
Core 2 Duo E6600 @ 3.51GHz
Motherboard
Asus P5B Deluxe/WiFi-AP
Memory
2 x OCZ DDR2 Platinum 1Gb PC6400 C4
Graphics Card
256MB MSI 8600GTS
Hard Drive
2 x 500GB SATA (ST3500641AS), 250GB IDE, 200GB IDE
Sound Card
Creative Soundblaster Audigy SE
Power Supply
SEASONIC S12-600
Case
CoolerMaster Cosmos
CPU cooling
XSPC X2O Delta CPU Waterblock V2
GPU cooling
D-Tek FuZion GFX Block
OS
Arch x64 w/KDE4.1
Monitor
Dell 2407WFP, Dell E248WFP
lattyware is offline lattyware's Gallery   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 09:13 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.30938 seconds with 8 queries