1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP or Java?

Discussion in 'Programming' started by charlesbrown678, Feb 9, 2012.

  1. sufalamtech

    sufalamtech Peon

    Messages:
    116
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #41
    cakephp programming language is best for your all website development.
    SEMrush
     
    sufalamtech, Feb 21, 2012 IP
    SEMrush
  2. soundguy

    soundguy Active Member

    Messages:
    77
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    50
    #42
    php for websites, java for application.. like mobile phone applications and those kind of devices.
     
    soundguy, Feb 21, 2012 IP
  3. CodeBeast

    CodeBeast Well-Known Member

    Messages:
    462
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    105
    #43
    Java is most secure than php regarding the websites - There are no big projects written in php.The most of them are based on asp or java.
    php is also a good language and pretty easy to edit the scripts (yes,script not code) + the servers are mutch cheaper,but really if you want to make somthing secure and nice you have to go with another language.
    - Just my oppinion.
     
    CodeBeast, Feb 22, 2012 IP
  4. rani123

    rani123 Member

    Messages:
    171
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #44
    java have its own value but it cant accessible from any where besides this i would like to prefer php
     
    rani123, Feb 22, 2012 IP
  5. CodeBeast

    CodeBeast Well-Known Member

    Messages:
    462
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    105
    #45
    :) what are you mean by "it can't be accessable from anywhere" ?
     
    CodeBeast, Feb 22, 2012 IP
  6. rani123

    rani123 Member

    Messages:
    171
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #46
    i mean if you create any program on java then you cant open it from office system like i cant access any java application from here coz of the restrictions
     
    rani123, Feb 22, 2012 IP
  7. CodeBeast

    CodeBeast Well-Known Member

    Messages:
    462
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    105
    #47
    It may be true,but I was talking about a java WEBSITE,not about a java application.There are no restrictions to open a java website - it have nothing to do with the java apps - the java website is a .WAR file usualy running on glassfish or a socket server.It's working like a normal website and as I said there are no any restrictions,because it's not javascript or java application.Also regarding the benchmarks java is mutch faster than php:
    http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=java&lang2=php

    This site is written in java:
    http://www.java.com/

    Can you access it? :)
     
    CodeBeast, Feb 22, 2012 IP
  8. fbgifs

    fbgifs Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #48
    java2 is best
     
    fbgifs, Feb 22, 2012 IP
  9. soundguy

    soundguy Active Member

    Messages:
    77
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    50
    #49
    for me the biggest disadvantage of java is that the user is forced to install 3rd side proprietary software (java package - for windows) which also can contain backdoors, or jus "bugs".
    i dont say php is perfect :) its just my opinion and the biggest gap to use java
     
    soundguy, Feb 22, 2012 IP
  10. CodeBeast

    CodeBeast Well-Known Member

    Messages:
    462
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    105
    #50
    98% of the internet users are running JRE on their computers - now days its a must :)
    The good in java is that you have to type the code just 1 time and then you can run it everyehere(web,mobile,desktop) with small modifications and it's improving all the time - I mean java is becoming lighter and lighter.
    I can say that java may not be the most powerfull programming language,but its the most beautifull and in the most cases it will fit on your needs! :)
     
    CodeBeast, Feb 22, 2012 IP
  11. cheenki

    cheenki Peon

    Messages:
    59
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #51
    PHP is a server-side scripting language whereas Java is a general-purpose language.
    PHP is only used as a server-side language where Java is both for server-side and desktop programming language.
    Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language.
    Java Application servers enforce security model. Each application runs in its own container.
    Java/JVM has its own extensive security framework.
    No security guarantees from PHP: Administrators run PHP in CGI mode in order to avoid security nightmare. That is, PHP engine is forked for each page hit.
    Even Administrator chroots (each time to you hit a page) for security.

    Now is all up to you what would you like to choose Java and PHP
     
    cheenki, Feb 22, 2012 IP
    CodeBeast likes this.
  12. rani123

    rani123 Member

    Messages:
    171
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #52
    But i heard thats java web take more time of loading then php web
     
    rani123, Feb 22, 2012 IP
  13. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #53
    PHP is used mainly for web server-side development. (You can use it for developing desktop apps, but if you were at the elvel at which you could do that you wouldn't have asked what you asked.)

    Java is used to develop desktop apps that can run - unchanged - on different operating systems. The same file that runs in Windows also runs in Linux, Mac OS, etc. Java has some web use, but again, not for someone who had to ask what you asked.

    Javascript is a client-side web development language, that has absolutely nothing to do with Java, except that the names share some letters.

    ("Dr." Howard is useful for lengthening legs.)

    So it's not a question of whether you use PHP or Java, the first question is whether you're writing a desktop program or a website.
     
    Rukbat, Feb 25, 2012 IP
  14. CodeBeast

    CodeBeast Well-Known Member

    Messages:
    462
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    105
    #54
    - PHP is bad enough even for creating dynamic websites, its original and primary purpose. A few misguided souls work on projects such as PHP-GTK, but when there are dozens of nicer languages out there, why would anybody choose PHP to work in?


    - JAVA is wide used on the web and many of the BIG and serius sites are written on JAVA since it's safer and faster(but requiers most powerfull servers than php).Also a single java code/programm can't run on all the platforms(windows,linux etc),yes it's a cross platform,but it depends on the programm - many commands are different,depending on the OS.

    for me the cheenki reply was the best,since everything was correct,aslo it was the most informative!
     
    CodeBeast, Feb 25, 2012 IP
  15. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #55
    Because it does some things trivially? You can write an SMTP server in PHP in about 20 lines. Parsing an XML file in PHP is a foreach statement.

    Safety is determined by the ability of the person writing the site, not the language it's written in. Anyone who thinks that writing a site in Java guarantees safety is writing an insecure site.
    Thanks for the laugh. My laptop can run a Java-driven site (and does when I play that way).
    Again, that depends on the experience of the programmer. Nothing that you've already done is difficult to do. Anything that you don't know how to do is.
     
    Rukbat, Feb 25, 2012 IP
  16. Pepdeal

    Pepdeal Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #56
    php is best suited for me
     
    Pepdeal, Feb 25, 2012 IP
  17. CodeBeast

    CodeBeast Well-Known Member

    Messages:
    462
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    105
    #57
    You misunderstood me bro...I don't care about your laptop - I was talking about java desktop programms,not about java website ok now?
    JAVA servers are more safety than a simply apache + apache is writen also in JAVA :D

    Just in case you don't know....

     
    CodeBeast, Feb 26, 2012 IP
  18. Debustral

    Debustral Greenhorn

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    13
    #58
    i prefer php.. for server side solutions. java, i dont use anywhere. even for client application.

    and when someone forces me to download JAVA, i just delete that app and use alternative one.
     
    Debustral, Feb 26, 2012 IP
  19. Genesis1

    Genesis1 Peon

    Messages:
    644
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #59
    PHP is for a newbie, JAVA for a pro
     
    Genesis1, Feb 26, 2012 IP
  20. soundguy

    soundguy Active Member

    Messages:
    77
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    50
    #60
    that doesnt make any sense. can u explain? any noob can use java. like php.
     
    soundguy, Feb 26, 2012 IP