• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

php vs java

 
Ranch Hand
Posts: 38
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to everybody,
I am studying my final year engineering(computer science) so i am handling a Indian Government project.Project is dealing within a certain security issues and a part of the project has been already implemented using PHP but i want it to be completed in JAVA and i need to know the differences between PHP and JAVA with certain issues like
1.security
2.flexibility
3.compatibility
4.scalability
5.connecting various databases
And finally,using the above issues please explain me which is better JAVA or PHP or any other suggestion for my project .

 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I could type all day and not answer this completely. Given the topics you stipulate:


1.security


Both languages can be secure or otherwise, depending on how you use them


2.flexibility


Both languages are flexible or otherwise, depending on the architecture of your application


3.compatibility


Both languages can run on a multitude of platforms and can interact with a bunch of other technologies


4.scalability


PHP tends to lose out here. That being said I know of a bunch of fairly big organisations who back their online shops with PHP


5.connecting various databases


You can connect to databases from both.

I think your major driver here is that part of the project has already been implemented in PHP. Why throw that away?
 
Marshal
Posts: 28009
94
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Sturrock wrote:I could type all day and not answer this completely.



Yes, that would be a pretty good magazine article (if we still had magazines). At least 2,000 words and probably more. Asking somebody on a forum to write such an article for a non-paying audience of one is a bit audacious, I think.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are you really "final year engineering(computer science)"

I would hope that by the time an engineering student is that far along, they would know the answers, and would at least provide a complete description of what you mean by vague topics such as "security" There is enough material in that one word to fill up a Masters Thesis.
 
Abhilash Etikala
Ranch Hand
Posts: 38
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

are you really "final year engineering(computer science)"


Iam Engineering Student only sir.i know the security issues but iam not as experts.iam with less feasible experience on handling such type of project.So iam taking suggestions from such experts from this community.


Paul Sturrock
PHP tends to lose out here. That being said I know of a bunch of fairly big organisations who back their online chops with PHP


Thank you sir for valuable suggestions and please can you explain the scalability of your point of explanation clearly.So that i can convince my professor to go with java than php.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there, in general I agree with Paul. It will take several pages to completely compare PHP and Java.

IMO it really depends on 1) the project goal (what you are building) and 2) how "should" the project be designed or architected?

Currently in today's development, PHP has many frameworks to choose from eg Joomla, CakePHP, Prado, Drupal, Wordpress, etc. Each has its own strength or purpose. Is your existing PHP using such framework? As for Java enterprise application, it comes down to Hibernate+Struts2+Spring2 with or without EJB.

Now design issue. Well it somewhat depends on the framework you choose. How such and such framework be tweaked to do abc. Can the framework do xyz or is there a external plug-in or module so you don't need to write it.

Also don't let expectation hinder your decision at first. I experienced a case where at first the client just wanted a "easy to maintain" website. Then as time progressed, they wanted more (demanding features).... ultimately what they really want is a CMS. But at the very beginning the framework for the website is NOT a CMS. Oh I wasn't the person who started the website.

So do consider what may be right now may not be right as the application grows or simply client increases expectation.

Also if you were the client would you switch to java just for the "more" X (security, scalability etc)? Also Java app hosting usually cost more because you need 1) more memory and 2) app server.

Hope this helps.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K. Tsang wrote:As for Java enterprise application, it comes down to Hibernate+Struts2+Spring2 with or without EJB.



100% NOT TRUE. There are many more choices than what you listed here. Better choices, in my opinion.
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gregg Bolinger wrote:

K. Tsang wrote:As for Java enterprise application, it comes down to Hibernate+Struts2+Spring2 with or without EJB.



100% NOT TRUE. There are many more choices than what you listed here. Better choices, in my opinion.


Indeed. The assertion is rather ridiculous.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I may be over-simplify with Java frameworks but that's the trend "these days".
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K. Tsang wrote:...but that's the trend "these days".



According to?
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still disagree. Some of those technologies may be popular, but that combination is hardly "the trend".
 
Abhilash Etikala
Ranch Hand
Posts: 38
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i agree with K. Tsang that goal of the project makes the difference but as i said it is already implemented in php and moreover the project was a simple client-server application which mostly consists around 10 to 15 pages which takes the input and displays the results with some logic, it doesn't use any frameworks but now the application goes big.I have to go with any of the frameworks.


Can anybody suggest which framework is better and it should be advantageous to me in my career.
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For PHP, or for Java?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We get the "which framework should I use" question a lot. The most recent entries are:

https://coderanch.com/t/474309/Application-Frameworks/Application-Frameworks/Search-Framework
https://coderanch.com/t/474302/Application-Frameworks/Application-Frameworks/Framework-small-medium-application
https://coderanch.com/t/471590/Application-Frameworks/Application-Frameworks/Which-framework-learn

And the answers given which can be summed up with "We can't tell which framework you should use" apply to any language (php, java, etc).
 
Abhilash Etikala
Ranch Hand
Posts: 38
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

For PHP, or for Java?


for php...sir...



Thank you Gregg Bolinger...for valuable suggestions...
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well this isn't exactly a hotbed of PHP gurus. Perhaps you should be asking on a PHP forum?
 
Ranch Hand
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K. Tsang wrote:
Also Java app hosting usually cost more because you need 1) more memory and 2) app server.
Hope this helps.



Looks like a disadvantage to me. Can anything offset this ?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I'd ask K. Tsang to back this up. You may need more memory or you may not. It depends how you have designed and written your application. You cannot make sweeping statements like "Java uses more memory". That aside, given the comparative costs of development resources and buying more memory, if it were true would it even matter?

There are plenty free app servers outs there. And it's very debatable if you need one for your Java application anyway.
 
Greenhorn
Posts: 2
Google Web Toolkit Chrome Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java is client based and php is web based language. Java is used for developing software that runs on computer and php is used for developing web sites.
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Minal Dussal wrote:Java is client based and php is web based language. Java is used for developing software that runs on computer and php is used for developing web sites.


That's completely untrue. Java can be used client side, but the vast majority of Java code out there is server-side.

(Edit - OK, "vast majority" may or may not be true! But it's probably the most important current use of Java.)
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

K. Tsang wrote:OK I may be over-simplify with Java frameworks but that's the trend "these days".



Actually, one of the industry's common complaints against Java is that the frameworks are huge, hard to setup, hard to use, and generally difficult to develop with. Its not a fair complaint against Java the language, its really the fault of bloatware frameworks.

People who think that these huge frameworks are the answer are asking the wrong question.
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic