views:

548

answers:

8

I want to start working on some simple physics simulations that I can embed onto my website. I have a lot of experience with web programming with languages like PHP and javascript, a fair amount of experience with python and some experience with C++.

Should I use Java applets, Flash or something else?

Also, could you please recommend a good IDE and point me in the direction of some tutorials?

A: 

It depends on the things you want to do, but if you can stick to Javascript it will work in most browsers.

If you really have to choose between Java and Flash, Flash is definitively present in more browsers than Java.

kmkaplan
+1  A: 

I'm not familiar with Flash libs but i know that if you need to do some physics java would be great for you. You can find tons of libs written in Java for any king of computation, which can save you alot of time. But note that Applet is a technology not much sites are using today, and Flash is the preferred way for doing nice looking web ui today.

About the IDE, for java you have the Eclipse which is great and free, i think that for a begginer this is the best IDE out there. Other names you might check are NetBeans and Intellij IDEA.

Alon
A: 

I did http://www.google.co.uk/search?q=java+physics and got 2.7 million hits. ;)

Peter Lawrey
+1  A: 

As kmkaplan wrote, it's easyer to find Flash on modern browsers and there are a lot of free physic engines for Flash ready to use. Here's a very good one.

Stefano Driussi
A: 

Flash enjoys far greater browser/user acceptance than Java applets. The drawback is you have to do all your authoring work in Adobe's Flash IDE. (Which I hate even compared to other IDEs.)

Other possibilities include Silverlight (less widespread again), and SVG (which would be interesting as you could author the physics object directly into the page, but browser support is limited; you won't get it going in IE).

bobince
Not true. You can use Flex Builder (which builds of eclipse) or any other IDE you prefer actually.
grapefrukt
+1  A: 

Processing is a java based language focusing on rapid development, graphics, and simulation. It can be embedded into a web page as a Java applet.

Here's an example of some of the physics work being done with it.

AK
+3  A: 

I have a fair amount in pyhsics and java applet and flash.

I strongly recommend doing it in flash. First of all is the flash player much better distributed than the java runtime. Second is it since flash player 9 (10 is current) and actionscript3 much faster and less ressource hungry.

There are some pyhsics frameworks:

There are allready 3d pyhsic engines for flash. but they are still very young:

For the IDEs I recommend the following:

The Flex SDK (compiler for as3 + flex) is free and / or opensource:

I think you will find alot of tutorials on the sites for the frameworks. Have fun and share your results :D

monkee
A: 

I'm speaking as a user: Use Flash!

The startup time of a java applet is so bad. It will take 5-10 seconds at least to start up the JVM. In this time, the browser is blocked and that really annoys me.

furtelwart