I'm wondering is JSP a safe alternative to PHP? Some things I'm concerned about are cpu usage, memory usage, and security.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
closed as not constructive by Mark Trapp Sep 24 '11 at 7:03
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.
JSP is an alternative to PHP like any other programming language, and just like PHP is an alternative to anything other.
CPU-wise, it will depend on your applications. JSP, as ASP.NET, are compiled and run in a virtual machine; PHP, on the other hand, is interpreted. In both cases, the bottleneck would probably be the database access or your application itself, not the underlying language mechanisms.
As for memory usage, from what I've seen, small applications have a smaller memory footprint when written in PHP, and the opposite is true for large apps. Again, this is only my personal experience, and other people may not obtain the same results with their apps.
Finally, security-wise, it's up to you to make an application secure. If you know one language well, but not the other one, you surely will do some mistakes in this other language, making your applications unsafe.
then you can do some assertions about:
For the bottlenecks, after making those assertions, you have to profile them to have a good image of the reality. Expectations about the performance are usually wrong.
In practice, the second and the third conditions enumerated above are hard to match: