Jump to content
  • Advertisement
Sign in to follow this  
mfk_1868

[web] Which one is more efficient? JSP or PHP

This topic is 4503 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I will start coding a web based game in a few days. I am not sure with which one should I code it? But I am more tended to JSP. I want your comments on this please.

Share this post


Link to post
Share on other sites
Advertisement
The one that will be the most efficient is the one your the most familar with. Your productivity will be much higher in the long run going with the one you know best. However, you may miss an exciting oppurtunity to learning something new and challenging!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

http://shootout.alioth.debian.org/debian/benchmark.php?test=all&lang=java&lang2=php

In these tests PHP seems to be more efficient with memory, but Java is mostly faster.

I've never used JSP so I dont know how sutable it is. PHP is very easy to learn/use, but I would just use whatever you are more familliar with.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sorry, the forum messed up the link...

http://shootout.alioth.debian.org/debian/benchmark.php?test=all&lang=java&lang2=php

Share this post


Link to post
Share on other sites
Don't worry about which one is more efficient. Worry about which language you are more proficient in.

Also, the first thing to affect efficiency is going to be how you design your database and how you access it. Yes, the language/framework powering your application will affect speed, but usually far less than the code you write yourself.

Share this post


Link to post
Share on other sites
The more efficient one is, as others have noted, the one which you are more proficient in, because you will be able to build the application more quickly (which is more important than runtime performance).

I'm sure Java will outperform PHP in every task at runtime, but you really don't care!

Mark

PS: Please don't use JSP, it really sucks. It is an abuse of the Java VM :)

Share this post


Link to post
Share on other sites
I am good on both languages. But the main performance problem is with the database queries. In java I made a design plan about database queries. I will form a class file for each database table in which there will be methods get_field and set_field for each field and a method update_record to set all fields to new positions. By this way I am thinking of minimizing the database query number to minimum. Is this a good idea?

Share this post


Link to post
Share on other sites
For best performance you will want a layer that gives you direct SQL access to the database, and performance will then be dependent on your database, database structure, and SQL quality, rather than the web language. Both languages should be able to offer this.

Share this post


Link to post
Share on other sites
Quote:
Original post by mfk_1868
By this way I am thinking of minimizing the database query number to minimum. Is this a good idea?

Yep, that's pretty much rule #1 in database queries. Don't use two queries if you can manage with one. Crossing the boundary from your external application to the database is expensive, so use as few queries as possible.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!