PHPers rejoice.. keep your JavaScript secure!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Gen-Ik wrote: Programming to standards is good don't get me wrong, but it does restrict your creativity if you want to do something more spetacular and original with your website(s).
One example for CSS: http://www.csszengarden.com
and
one for Javascript: http://www.dansteinman.com/dynduo/
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

patrikG wrote:One example for CSS: http://www.csszengarden.com
and
one for Javascript: http://www.dansteinman.com/dynduo/
Hmmmm, dull in my opion.

Here's a brief overview of what I'm doing at the moment...
Everyone has seen community based sites that have windows (or mods) of data either down one side or both sides of the page right? Well the site I'm working on at the moment allows you to detach these windows individualy so they can be dragged around the screen or drag-n-dropped into different positions. If you are logged-in and make any of these changes your account is automatically updated with the mods position so that next time you return to the site, or refresh the page, the mods are where you left them.

The examples above are ok but it's nothing amazing if you know what's possible with the new MSDOM/JScript routines... which is the point I was trying to make in my last post. You do need to break the rules if you want to try something a bit more spectacular and/or original with your site, but depending on the type of site, who it's for, and what it's for, will normally dictact if you stick to the 'standards' or use the more modern JS (and CSS) routines/functions.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

i like what troll said. it's actually the basis of what i was saying, that you have to make it backward compatabile because people are... well id10t errors...

we all hear the suport stories about the idiot tht doesn't realize he can't use his computer in the thunderstorm that knocked out power, and we all get a great laugh... but i've worked net ops... we have this nice generator so i didn't realize the power had gone out since i had been working in the machine room. i ended up with 5 calls like that that day... all i'll say is i was working as fte for a university on the east coast.

i got those at a think tank...now figure out how bad the masses must be...



and about those sires i mentioned in an earlier post...one was a radio station that claimed it can stream to 56k....did so ok.. but when i got cable and found it takes 3 min to load completely on cable due to the number of images....is it any wonder i got fed up and i don't think i ever let it load completely prior to cable?

like i said, if your making a site for a company and can't do it text-only something's wrong. there shuld at least be a gopher back up for those that don't have all the bells and whistles or for some reason don't want to load them... although the best way to encourage their loading is to strip the back-up to be so bland aside from the recoommendation to upgrade "to see this site how it should be"

eventually curiosity will get most if you do that
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Gen-Ik wrote:Hmmmm, dull in my opion.

Here's a brief overview of what I'm doing at the moment...
Everyone has seen community based sites that have windows (or mods) of data either down one side or both sides of the page right? Well the site I'm working on at the moment allows you to detach these windows individualy so they can be dragged around the screen or drag-n-dropped into different positions. If you are logged-in and make any of these changes your account is automatically updated with the mods position so that next time you return to the site, or refresh the page, the mods are where you left them.
If you have a closer look at those links, follow some of the sites they link to, you'll find that you can easily do what you describe - but supporting standards. Heck, I've done a website some years ago together with a friend of mine which has exactly those simulated windows.

The gist of what I am saying is: you can program according to standards and be cutting edge.[/quote]
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

patrikG wrote:If you have a closer look at those links, follow some of the sites they link to, you'll find that you can easily do what you describe - but supporting standards. Heck, I've done a website some years ago together with a friend of mine which has exactly those simulated windows.

The gist of what I am saying is: you can program according to standards and be cutting edge.

I have taken a look at a lot of the links and you are right about some nice things being able to be coded to standards. However looking at the source code I noticed that a few things that take 10 lines of code using standards only takes 1 or 2 using DOM/Gecko... not that it's a major problem or anything just an observation. There are still many things that can be done using DOM/Gecko that can't be done with standards.

Don't get me wrong if a client needs a site created using standards I can and will do it obviously, but so far everyone I have worked for has been happy to go with the modern NS/IE versions.

It's like I said before there really isn't too much point sticking to standards anymore, sooner or later DOM/Gecko will become the standard, and I can't see IE or NS losing the 'browser king' crown any time soon.
User avatar
trollll
Forum Contributor
Posts: 181
Joined: Tue Jun 10, 2003 11:56 pm
Location: Round Rock, TX
Contact:

Post by trollll »

Gen-ik, I will not attempt to stop you from making kick-ass things that non-updated browsers can't see. If I have a game written in jscript that doesn't work in javascript, I won't include the link to the page for anything except IE. If someone doesn't have the flash plug-in, I won't try to display a beautiful animation.

I realize full well that some people feel restricted by standards. However, standards didn't get adopted by developers and used by browsers because everyone hated them. For example, the UK has stricter standards for certain cell phone services than the US. This results in any cell phone in the UK having the ability to text any other phone, regardless of the service provider, characters-per-text limit, etc. Just try texting a friend here who doesn't have the same service. Stricter standards end up meaning more flexibility and functionality for the user!

Besides, if you have to make something that intricate and that restricted to a certain crowd of people, why not just do it in flash and at least allow more people to enjoy it?
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

trollll wrote:Gen-ik, I will not attempt to stop you from making kick-ass things that non-updated browsers can't see. If I have a game written in jscript that doesn't work in javascript, I won't include the link to the page for anything except IE. If someone doesn't have the flash plug-in, I won't try to display a beautiful animation.

I realize full well that some people feel restricted by standards. However, standards didn't get adopted by developers and used by browsers because everyone hated them. For example, the UK has stricter standards for certain cell phone services than the US. This results in any cell phone in the UK having the ability to text any other phone, regardless of the service provider, characters-per-text limit, etc. Just try texting a friend here who doesn't have the same service. Stricter standards end up meaning more flexibility and functionality for the user!

Besides, if you have to make something that intricate and that restricted to a certain crowd of people, why not just do it in flash and at least allow more people to enjoy it?
I'm not saying that I don't like standards or think they are stupid in any way. I agree that to use standards will enable more people to view/access your website. All I am simply trying to say is that it shouldn't matter if someone decides you use standards or the more modern JS and CSS functions on offer.

If I was creating a website for a company or individual that wanted their site to be build to standards I wouldn't have a problem with that. Most of the clients I have had over the last year or so haven't minded or had a problem with their sites using the new DOM/Gecko stuff.

Another reason I can see that standards are in place is for those non NS/IE browsers that really don't cut-the-mustard and can't cope with anything more than the most basic JS and CSS.

With about 90% of people collectively using the newer NS/IE browsers though the remaining 10% will either need to catch up or miss out.

It's the same thing as deciding if to create a site using the latest Flash plugin or not... how many people will have upgraded/installed the latest plugin? Restricting yourself to Flash4 when Flash6 is around just to please those people who dont' know how, or can't be bothered, to upgrade is stupid.

Why don't we restrict the highway/motorway speed limits to 30mph so that those people with old/<span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> cars can keep up and not feel left out?

Standards are in place but they are not law. Sometimes it's good to stick with them other times there's no point. Like I keep saying it's down to the type of site you are making and who you are making it for. Just because a site isn't created to standards doesn't mean it's not created well, nor should the person who created it be shot down simply because they decided to use modern techniques.


As for creating a site 100% in Flash that's down to what sort of site you are building. I used to do this when I first got my hands on Flash... it was Flash overkill... but now I use it here and there on sites (if I use it at all). The latest site uses Flash but it isn't visible, it's used to load and save data to the server while the visitor does their thing. Anyway.. can you imagine these Forums being created totally in Flash? Nope.
Post Reply