Andrew Green
10-12-2005, 02:06 AM
Basically there are two places things happen when you visit a site, on the server, and on your computer.
As a developer you have control over the server stuff, but on the client they can overrule anything you do. Therefore one of the most basic design mistakes is assuming that everyone else will see the page as you do
So, just focusing on the client, as that is where things get unreliable...
You got a possible 3 parts:
html - Structural
css - Presentation
Javascript - eyecandy
*No flash, it's just annoying. It is for stupid little movies, games and annoying ads, not for site layout.
And that is the order you should do them in, as that is the order they will fail on you in.
A website should be fully useable with just html, so if a user turns off your fancy style sheet and dissables javascript your site should still function. It might not look nice, but it should still function.
So if you would like to use a fancy javascript navbar you need to change your mind. Why? Because anyone without javascript enabled will not be able to use your site, and that includes search engines trying to index it.
Next remember what html is, it is a structural language. It defines headings, paragraphs, tables, links, etc. It doesn't tell you what color they are, what size or anything else. It just says what is what, nothing about how it shows up on the screen.
And this is good, as it gives users the freedom to view things as they please, so someone with vision problems might have there browser set up to overwrite any of that in order to allow the person to be able to read it. This is the main advantage of structural languages over something like just posting pdfs.
Next, you make it look nice with your presentation layer. This is CSS, best served in a seperate file. But there are 4 types of style,
Default - Do nothing, this is what you get.
External - Seperate file, most convienient as changing it in one place changes all your pages. the css file is also cached making things load faster and saving bandwidth on slow connections
Internal - Exact same format, just in the .html file
inline - <p style="">
and they follow that order in priorities.
Now, in a ideal page all of your css will be contained in a seperate style sheet using classes as needed. But things rarely go perfect... Still, it is best to do as much as possible in the external sheet as it will save time later on.
Then Finally, after you have a functional structure, with a nice presentation layer you can add Javascript effects if you like. Remembering of course that javascripts are run entirely off the client and anything they send back to you is not to be trusted, so using javascript for form validation = bad idea, using javascript to animate buttons as the mouse moves over them = ok idea.
and finally, he who uses frames shall not recieve visitors.... (They mess with the normal flow of navigation and prevent bookmarking or linking too specific pages)
As a developer you have control over the server stuff, but on the client they can overrule anything you do. Therefore one of the most basic design mistakes is assuming that everyone else will see the page as you do
So, just focusing on the client, as that is where things get unreliable...
You got a possible 3 parts:
html - Structural
css - Presentation
Javascript - eyecandy
*No flash, it's just annoying. It is for stupid little movies, games and annoying ads, not for site layout.
And that is the order you should do them in, as that is the order they will fail on you in.
A website should be fully useable with just html, so if a user turns off your fancy style sheet and dissables javascript your site should still function. It might not look nice, but it should still function.
So if you would like to use a fancy javascript navbar you need to change your mind. Why? Because anyone without javascript enabled will not be able to use your site, and that includes search engines trying to index it.
Next remember what html is, it is a structural language. It defines headings, paragraphs, tables, links, etc. It doesn't tell you what color they are, what size or anything else. It just says what is what, nothing about how it shows up on the screen.
And this is good, as it gives users the freedom to view things as they please, so someone with vision problems might have there browser set up to overwrite any of that in order to allow the person to be able to read it. This is the main advantage of structural languages over something like just posting pdfs.
Next, you make it look nice with your presentation layer. This is CSS, best served in a seperate file. But there are 4 types of style,
Default - Do nothing, this is what you get.
External - Seperate file, most convienient as changing it in one place changes all your pages. the css file is also cached making things load faster and saving bandwidth on slow connections
Internal - Exact same format, just in the .html file
inline - <p style="">
and they follow that order in priorities.
Now, in a ideal page all of your css will be contained in a seperate style sheet using classes as needed. But things rarely go perfect... Still, it is best to do as much as possible in the external sheet as it will save time later on.
Then Finally, after you have a functional structure, with a nice presentation layer you can add Javascript effects if you like. Remembering of course that javascripts are run entirely off the client and anything they send back to you is not to be trusted, so using javascript for form validation = bad idea, using javascript to animate buttons as the mouse moves over them = ok idea.
and finally, he who uses frames shall not recieve visitors.... (They mess with the normal flow of navigation and prevent bookmarking or linking too specific pages)