Websites: Does & Don'ts

Inane baanter or words of wisdom - you decide...
User avatar
Kon-Tiki
Baaaaaaa!
Baaaaaaa!
Posts: 5594
Joined: Fri Jan 07, 2005 9:54 pm 0
Location: Inside my BO
Contact:

Websites: Does & Don'ts

Post by Kon-Tiki »

Ok, another website-related question... are there any does and don'ts on which coding languages to use, and to which extend? For example, is it ok to use a bit of Javascript, or should it be avoided at all cost? And if it's ok, what's it ok for, and what not (Well, for Javascript, I know it's nonsense to write an entire site in it, but that's a bit blatant and obvious)
User avatar
Mayhem
Sheepie Whore
Sheepie Whore
Posts: 12572
Joined: Mon Apr 29, 2002 3:06 pm 0
Location: Londonish
Contact:

Post by Mayhem »

Personally do what you can with stylesheets, but little bits of java are fine if you can't do it any other way.
Lie with passion and be forever damned...

Xbox: Mayhem64
User avatar
moosedude
Baaaaaaa!
Baaaaaaa!
Posts: 6209
Joined: Fri Nov 19, 2004 1:19 pm 0
Location: Craggy Island
Contact:

Post by moosedude »

I try to use as little languages as possibly, otherwise it becomes a big furry mess; although somethings you can only do in javascript.

01000101 01000100 01000111 01000101

http://www.redbubble.com/people/fotofill/ buy my photos!
User avatar
PVB
Sheepie Whore
Sheepie Whore
Posts: 32542
Joined: Mon Apr 22, 2002 10:16 pm 0
XBL Gamertag: PVBuk
PSN: PVBuk
Location: Medway, U.K.

Post by PVB »

Depends what the site is for I suppose.

Gaming web sites tend to use any and everything, probably as the majority of their readers would have Java, Shockwave, etc. on their machines.

Serious/corporate ones tend to just be HTML, CSS, etc.
User avatar
Dungeon-Dave
Baaaaaa!
Baaaaaa!
Posts: 3925
Joined: Thu Aug 04, 2005 12:01 pm 0
Location: UK
Contact:

Post by Dungeon-Dave »

Aim to use Javascript as an addition rather than a necessity - ie: if javascript is disabled, can you still navigate around the site?

Also, test out the Javascript in several browsers. Quite a lot of incorrect Javascript works for the IE range but won't in other browsers.
User avatar
Kon-Tiki
Baaaaaaa!
Baaaaaaa!
Posts: 5594
Joined: Fri Jan 07, 2005 9:54 pm 0
Location: Inside my BO
Contact:

Post by Kon-Tiki »

So things like drop-down menus in Javascript's a big nono, cause they make navigating the site a pain if there's no Javascript available?
User avatar
JohnyZuper
Baa!
Baa!
Posts: 33
Joined: Fri Oct 28, 2005 9:51 am 0
Location: Gent, Belgium
Contact:

Post by JohnyZuper »

If you want it to look pretty, be interactive and cross-platform + cross-browser compatible, use Flash. :evil:
User avatar
Surfr
Baaaaaa!
Baaaaaa!
Posts: 4403
Joined: Sun Feb 02, 2003 2:00 pm 0
Yahoo Messenger: SurfrDanField
Location: Aberystwyth
Contact:

Post by Surfr »

XML and XSLT or XHTML and CSS

Nothing else.

Feel free to use PHP, Python, Ruby, C#, Java or whatever to generate the above.

SO LONG AS IT IS VALID CODE.

Use the w3c validator to check.
Meddw ar y lawnt mewn cyfddydd niwclear
User avatar
seibu
Baaaaa!
Baaaaa!
Posts: 1040
Joined: Mon Dec 20, 2004 3:24 pm 0

Post by seibu »

Surfr wrote:XML and XSLT or XHTML and CSS

Nothing else.

Feel free to use PHP, Python, Ruby, C#, Java or whatever to generate the above.

SO LONG AS IT IS VALID CODE.

Use the w3c validator to check.
I hate to be a Puritan (although I like the hats) but I'd agree. I'm not a fan of byzantine over-complex pretty pretty sites that try and act like an application or an AV demo. If you can't do it in HTML and CSS (via XML / XSLT if you're clever) then you're probably trying to do something the web isn't designed for.
User avatar
skweek
Baaaaaa!
Baaaaaa!
Posts: 3969
Joined: Tue Apr 13, 2004 6:47 pm 0
Location: skweez'land
Contact:

Post by skweek »

Surfr wrote:XML and XSLT or XHTML and CSS

Nothing else.

Feel free to use PHP, Python, Ruby, C#, Java or whatever to generate the above.

SO LONG AS IT IS VALID CODE.

Use the w3c validator to check.
Spot on. :D
Been round this road so many times
Feel like it's skin is part of mine
This taste of milk is almost gone
Still got my shame, but not for long
Been wrong so many times before
But never quite like this
Heard all, in the rain
But the rain all turned to piss
User avatar
Ratsoap
Baaaaaaa!
Baaaaaaa!
Posts: 6344
Joined: Fri Dec 19, 2003 1:46 pm 0
Location: Back in Edinburgh
Contact:

Post by Ratsoap »

Surfr wrote:XML and XSLT or XHTML and CSS

Nothing else.

Feel free to use PHP, Python, Ruby, C#, Java or whatever to generate the above.

SO LONG AS IT IS VALID CODE.

Use the w3c validator to check.
Just because a site doesn't validate doesn't make it bad.

I can think of loads of sites that use invalid code. Flickr, amazon, just about everything microsoft have published on the web, google, the list goes on and on.

And there is such thing as accessible flash.

And with the advent of AJAX I think we will be seeing a lot of really cool websites that don't even come close to using valid w3c code.

Although everything we produce these days in just (x)html and CSS.
Because fucking marketing cunts would never call a spade anything other than a Deluxe Easi-Shift Earth Movement Solution.
User avatar
tufty
Sheepie Whore
Sheepie Whore
Posts: 12525
Joined: Fri Jan 07, 2005 4:52 pm 0
Location: French Alps

Post by tufty »

skweek wrote:
Surfr wrote:XML and XSLT or XHTML and CSS
Nothing else.
Spot on. :D
Yep, that's pretty much the approach I take. If you _must_ use javascript, please make sure it degrades gracefully (i.e. make sure that the non-javascript enabled users can still use the site).

If you want to do drop-down menus, it can be done in pure XHTML/CSS. http://www.meyerweb.com/ is a reasonable starting point

Simon
"massive retard™", "full of shit™", "tiny bitch™", "retarted™", "a bit of a one trick pony™", "petty™", "simple minded idealistic twat™", "miserable humourless fucker™"
User avatar
starshipcommand
Baaaaa!
Baaaaa!
Posts: 1726
Joined: Thu Jun 24, 2004 7:27 pm 0
Location: UK

Post by starshipcommand »

IMO - Use JavaScript where necessary, and avoid it where possible.

As much for your own sanity as accessibility reasons ;)
User avatar
Wibble
Baaaaaa!
Baaaaaa!
Posts: 3317
Joined: Fri May 02, 2003 10:13 pm 0
XBL Gamertag: misterwibble
Location: The Hague - The Netherlands
Contact:

Post by Wibble »

Kon-Tiki wrote:So things like drop-down menus in Javascript's a big nono, cause they make navigating the site a pain if there's no Javascript available?
Pretty much.

I'd suggest a simple check, using lynx (a text-based browser). If you can't navigate a site using lynx, it needs work.

Similarly to "interactive" flash sites. Imagine being blind and trying to get any kind of response from such a site. Obviously, certain types of site revolve around the use of flash - but that's to do with the target audience.

My creed: unless your site needs a technology, don't use it :).

-W
User avatar
Kon-Tiki
Baaaaaaa!
Baaaaaaa!
Posts: 5594
Joined: Fri Jan 07, 2005 9:54 pm 0
Location: Inside my BO
Contact:

Post by Kon-Tiki »

tufty wrote:Yep, that's pretty much the approach I take. If you _must_ use javascript, please make sure it degrades gracefully (i.e. make sure that the non-javascript enabled users can still use the site).

If you want to do drop-down menus, it can be done in pure XHTML/CSS. http://www.meyerweb.com/ is a reasonable starting point

Simon
Aye caramba! Thanks for the link, mate! Now to figure out how to make it pop up other links you can click without them disappearing (not that I need that, but it's good to know :wink: )

As for the rest, it's pretty much the way I've been seeing it, then. XHTML, PHP, SQL and CSS, and if I'd use anything aside from that, like JScript, it shouldn't be necessary, and should have other ways to get 'round it (pretty much for stuff like smilies'n such then)

Another question... what's the difference between XHTML and DHTML?

Edit: Checking that site further, it solved my question for the menu things :)
Edit2:That doesn't work in IE. IE always seems to have trouble with :hover on anything else than a hrefs :roll:
Post Reply