I am new to building web applications and I am developing my skills in programming. I have a few questions about JavaScript that I cant find the answers too easily.

1. People seem to think that there is a cold war going on between Adobe's Flash, Microsoft's Silverlight, and JavaScript. With all the new JavaScript Libraries coming out like DOJO, JQuery, Mootools and others; JavaScript is becoming pretty powerful and animations are becoming easier. So my first question is.. How come there are not any JavaScript animation Studios? Like Flash and Silverlight.

2. Is it JavaScript that is displayed differently in every browser? or is it the CSS? because when I play with JQuery, certain animations will look different depending on which browser I'm using. I have Google Chrome, IE6, and FireFox.

Thats it for now, thanks ahead of time :)

-Evan

There aren't any Javascript animation studios because there are so many quirks between the different browsers they'd be doing N times more work, where N is the number of current browsers. Believe it or not people still use IE5.5 and if you're going to do business you have to support those people whether you like it or not.
To answer your second question, it's both Javascript and CSS and HTML and pretty much everything else that is rendered in the browser is rendered differently unless they use the same rendering engine (Chrome uses Webkit)

1. People seem to think that there is a cold war going on between Adobe's Flash, Microsoft's Silverlight, and JavaScript. With all the new JavaScript Libraries coming out like DOJO, JQuery, Mootools and others; JavaScript is becoming pretty powerful and animations are becoming easier. So my first question is.. How come there are not any JavaScript animation Studios? Like Flash and Silverlight.

Not sure what exactly you mean by Javascript *studios* but there are many noticeable differences between Javascript and Flash. Flash is an entire development platform in the sense that it comes packaged with a language to drive the processing (Actionscript) along with the nice ability to drag and drop and many other niceties. Javascript is just a programming language and creating complex animations requires a good mathematical know how and is definitely more difficult, time consuming when compared to Javascript. Now think about it, if you were asked to create a simple user driven animation on a web page, which would be your first choice?

2. Is it JavaScript that is displayed differently in every browser? or is it the CSS? because when I play with JQuery, certain animations will look different depending on which browser I'm using. I have Google Chrome, IE6, and FireFox.

Different browsers have different rendering engines, for e.g. Firefox uses Gecko, Chrome uses Webkit etc. Hence if a same piece of code looks different of different browsers, it is because of the difference in rendering capabilities, Javascript has got nothing to do with it other than driving the animation. And since CSS is a part of rendering engine, different browsers have subtly different CSS implementations which again might lead of a difference in the way an animation is displayed.

To me, Javascript/HTML/CSS animation always feels like an ugly hack: sure there are libraries available to assist with the lack of any built-in support for graphics*; but then there are libraries to render 3d scenes in graphing calculators [ just because you 'can' doesn't always mean you 'should' ]. Flash & Silverlight provide built-in support for graphics, the dedicated plugin runtime environments are better tailored & optimized for that kind of thing.

* ( support for static images doesn't count as "graphics support" )

Of course, there's usually better availability of JS than there is for Flash or Silverlight [ I don't install the plugins for either, personally ]. For simple animations, or animations that should be seamlessly integrated into a webpage, use an animated image format and/or JS. It depends how complicated you want animation to be really - simple fixed animation can usually be done as an image / videoclip anyway.. complex interactive animation is not really suited to JS ( in that it's not the best option available ).

As to why there aren't any available JS animation design studios.. No idea. Someone will probably consider it: crazier things have been developed.

For Q2: Javascript isn't displayed: it's just used to move things around/change properties of HTML+CSS objects. Of course, there may be discrepancies in timing under different environments.. or outright difference in the way a feature is implemented in JS; but it's ( very ) much more likely that the difference is in the browsers interpretation of the HTML/CSS specs. Of course, that issue doesn't exist in Flash/Silverlight ( the plugin always gives the same output ).

There might be other options sometime in the future maybe.. Like SVG + Javascript ( and SVG does support graphics ), in this case, Javascript is used to control SVG objects: it's alot nicer than HTML+CSS+Javascript, but not well enough supported quite yet.

[EDIT: Ha, double beaten-to-it]

Thanks everyone!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.