March 21st, 2002, 03:26 PM
Does anybody else find server-side java a pain in the neck?
I did a site for a client in JSP and it took a lot longer than sites I did in PHP and coldfusion. Every little exception had to be caught and handled. I then went a step further and developed my own framework that was based on the controller-model-view model, with servlets, custom-tags and javabeans. Now I find my server account is suspended because the site is taking up too much processor time. I beginning to wonder is java worth it. Of all the server-side languages it seems to take the most effort. My attraction to the platform is the use of components and custom tags but I'm wondering should I leave the platform and go back to something simpler like PHP? On a related note, how fast is server-side Java? Because the code is compiled into byte-codes shouldn't it be faster than interpreted scripting languages? Also does garbage-collection encourage sloppy code for example using String when you should use StringBuffer?
March 22nd, 2002, 03:04 PM
I think compiled Java would be a lot faster than PHP and database access would be a lot faster
In my view Java is more powerful than PHP because Java can be ported to many devices and has massive support from large corporations like Sun and IBM
You dont see IBM and other large corporations supporting PHP but they do support Java
In my view Java is more powerful by far but on the downside it is much harder to maintain and develop
100 trillion calculations per nanosecond
March 22nd, 2002, 09:21 PM
I can't see why people care about Exception handling. I mean with PHP you handle exceptions by checking return values, and such, to avoid PHP fatal errors. There's little difference between Java Exceptions and PHP runtime errors other than it's easier to handle Java exceptions.
As for the speed aspects, it depends on what app server you use. Obviously a Apache-Tomcat engine will be slow compared to PHP, while an optimized engine like Resin or JRun will perform much better.