JAVA or PHP ?

by 79 replies
91
Java or PHP is best for web application?
#programming #java #php
  • it depends on you. I think php is the one that's more wildly used. but java/jsp is used by some big companys.
  • Php is Best. It Easy to use. Java is also used in php for advanced functions.
    • [1] reply
    • Hi sheikmd,
      how java is used in PHP language? Its possible
  • Neither. PYTHON baby!
  • Simple put, Java is more difficult to learn and much less used than PHP. PHP is easy to learn and has more jobs in the market.

    Java can be used to develop software, website (JSP), web applets etc. etc. (a lot more!)

    PHP is 'mainly' used for websites.
    • [1] reply
  • it depend on your need

    I this PHP is more simple than JAVA...
    There are many sources and tutorial of PHP if find dificult in coding

    if you working on software enginer maybe JAVA is the right choice
  • Depends on the project, your skillset, integrations, and tech that is in place already. We need more context.
  • PHP is best for now a days but Javascript is getting popular after coming node.js
    • [1] reply
    • Javascript is getting more popular, but it has nothing to do with the topic.
  • i would select php. because it's easy and cheap to implement. loads of developers are there. java development will be much more expensive.
  • As a sysadmin, I prefer php over java applications anytime on my servers. Java apps are memory-hungry and take far more system resources to run than the equivalent php code.
  • PHP is more easy to implement than Java. But many Enterprise applications are developed by Java.
  • It depends on you mate! Think of time you want and can invest into programming. Java is more complicated and will take the hell of the time to learn it, and PHP is more simpler.

    And also depends what you want to do later with it. If you'll be looking for a job, earnings with JAVA would be higher than with PHP (in most cases). So there are some things to consider before jumping on any chosen programming language. Also there are many other languages like C++ and previously mentioned Python and etc.
  • php is good if you want a website
    but java is used where you want more security and reliability
  • I think PHP is best, it's easy to use...
  • You have to be careful as some people on this thread might get you confused. Javascript has nothing to do with Java and is a completely different language.

    Now that we've cleared that up, my opinion would be that you start with learning PHP, but then eventually learn both languages.

    Yes, PHP is a lot easier to learn. It's used in almost every website, especially since everyone seems to be using Wordpress. That makes it a bit hard for Java to compete with.

    Java has a lot going for them though. We're in the mobile era these days. There's cellphones and tablets everywhere you look. The funny thing is... Java is heavily used on mobile devices. Especially since most of them don't even support flash. You can make mobile apps, games, etc. This makes Java very valuable to learn. I've even seen big companies around here hiring experienced Java Programmers and paying in the 6 figures.

    But anyways, they're both great. But you may have an easier time learning Java after you have mastered some other programming languages.
  • It depends on developer interest.PHP and JAVA both are best for web development .
    In my opinion, PHP is best because of its simplicity, easy to use and implement. but for game development Java is better than other language.
  • Php is simpler to learn than Java
  • Generally speaking, PHP is best for most web applications, as most web applications are fairly simple, small scale data capture, data manipulation, and data presentation programs.

    Java is a more complex language that is used primarily for intranet application development; that is to say, applications that are designed specifically for use in a limited or restricted access network, generally in a corporate setting. Most Java applications are designed to have a significant or even the primary bulk of their operations running on the client, a.k.a. the user's computer rather than on the host, a.k.a. provider's computer.

    PHP programs run on the host, a.k.a. provider's computer or web server, with the client (user's) computer running a browser with comparatively limited memory and computing power. It is true that web browsers on clients (users) machines regularly use small java applets, ad-ons, or widgets. This is typically for the presentation of special kinds of content that the browser is not able to run natively, such as PDF documents, Flash animations, which require additional computing power for manipulation that cannot be easily provided by the host machine or browser.

    So the question of which is best for a web application can only accurately be answered with further clarification as to the size, scale, and overall computational requirements of the web application you have in mind. The more computationally complex, the more likely you will need to use Java, the more simple and straight forward, the more likely PHP will be your best (fastest, easiest) development language.
  • It depends on your end goal.
    If you are just building web applications or websites for yourself, I would go with PHP.
    If you are looking to be employed in this field, you could eventually learn both languages but I would start with PHP.
    Once you learn PHP, you will find it much easier to modify existing platforms such as WordPress websites. Having said that, if you are just looking to create your own websites, I would jump straight into WordPress and build your knowledge as you go. You can do a lot with Content Management Systems without needing to learn a programming language from scratch.
  • PHP is best it's very easy
  • Php, of course.
    • [1] reply
    • Actually PHP shouldn't be compared to Java because PHP is a web scripting language only, while Java can be in multiple platforms (web, desktop-app, mobile-app, etc.)

      If you will just exclude other platforms of Java and be just in the web platform, PHP would win this since PHP has more features, and is easier to understand.
      • [ 1 ] Thanks
      • [1] reply
  • Php is best for web development. Jave is use for some other function. Php is basic for dynamic website . Php is easy to understand and user friendly . You can easy edit php code for your website.
  • PHP best I like PHP
  • I think php is the best its more user friendly i love php.
  • How i learn PHP?
  • that is totally up to us what to choose i JAVA is not very easy programming language it is tough while PHP is totally open source and easy to learn for me
  • I think both are good for web development. Depends on what you are expert at.
  • PHP is the best for web application and java is best for game application and many other application.
  • If you are a newbie, this is probably the most confusing thread you'll ever read. Unfortunately these sort of threads tend to degenerate pretty fast.
    • [ 1 ] Thanks
  • A lot of Engrish in this thread :-)

    PHP all the way. Even Facebook uses a customized PHP engine.
  • It is like asking - Do I become an engineer or a doctor? It depends on your taste, your desire. Honestly speaking PHP is easier to use, but you get more flexibility with JAVA in terms of hosting environment, backend database etc.
  • PHP is best for web application. Java is more complex and hard.
    • [1] reply
    • It is not a rule buddy. Neither PHP nor JAVA is simple or hard. It all depends on your apprehension skills. Also nothing is best for any particular type of application. Use of technology depends solely on availability of skills, complexity of application and time available for development.
  • It is simple:

    JavaScript - "client side language", scripting language that allows you to create dynamic HTML pages. It is interpreted and executed by the browser on your PC. It is essentially a toy language, but latter thanks to AJAX hype, it evolved. But still, it has ugly syntax, and it is not truly object-oriented. Node.js is an abomination.

    PHP - Nice server side language, powerful, generates HTML pages. It used to be C like procedural language, but evolved to OO (Object oriented). On serverside it is executed by interpreter. It is able to pick up data from database, read and parse files, etc.

    JAVA - has nothing to do with JavaScript. Java is a programming language, the core set of libraries, and virtual machine platform that allows you to create compiled programs that run on nearly every platform. It can be used to build web applications and sites.
    Heavy enterprise grade tool.

    JavaScript - easy to learn, but can be abused by inexperienced developers.

    PHP - medium-easy to learn, but it is easy to create unmaintainable crappy web app.

    JAVA - hard to master. Requires a developer highly proficient in writing an object-oriented code and with good understanding of design patterns and practices.
    • [1] reply
    • Just curious... why would you say that? I've been using Node a lot over the past year or so, and I love it (and for the record, I have several years coding experience in a handful of different languages).

      Of course... Node wouldn't be the best choice for certain types of projects. But that is true of any language/framework. For the types of projects that Node is good for though, I think it absolutely rocks.
      • [3] replies
  • Both, Java and Php are best to develop web application. It totally depends upon the client requirements and the environment on which you are using web applications. However, To learn java is a difficult tasks and you need to give more time to learn java as compared to php. java can be used in the multithreaded environment while php is not.
    • [1] reply
  • Php is more suitable, but you should look into the requirement of your project. After that you will be able to decide where you should go, for php or java.
    • [1] reply
    • While Javascript's implementation of OO may not be as elegant as other languages, it does have basic OO capabilities, if your project requires it (see this).

      I reckon that's a personal preference. I would agree that certain aspects of the language could be improved (but I think that about ALL languages). Overall, I think it's pretty decent though. Especially if you use a good framework like jQuery.

      Lots of IDE's out there that support JS. WebStorm, Eclipse, Netbeans, Aptana, Visual Studio, just to name a few. As per refactoring... if you code correctly in the first place, that should never be an issue!

      You can break up your code into as many external files as needed to keep everything organized. Also, flowcharts help immensely for managing large codebases!

      In my opinion, that's a good thing! It opens up way more potential uses for Javascript.
      • [ 1 ] Thanks
  • There are lots of eBooks on internet, you can download and even you can learn by online. Lots of website have their online tutorials.
  • Dear sir,

    I am Working on php that's why i like php.

    PHP is best.

    Regard
    Vaghela Dev
  • Best thing will be start with PHP and when you get more into, than you can continue with Java. I am working for example on one project, where I am using both together with Oracle. So you will never know what you will need ... but know both is very handy.
  • Go with functional programming in JavaScript on NodeJS. Neither PHP nor Java is really "functional". By functional I mean a language that is centered around functions that you pass around the program. JavaScript is functional and this really makes up for elegant solutions.

    Consider this:

    [1, 4, 5, 2, 0].filter(function(x){return x<=2;}).map(function(x){return x*2;}).reduce(function(a, b){return a+b;});

    this is equivalent to first picking all values that are less than or equal to 2, then multiplying each value by 2 and finally summing them all up into a result. It's very fast and efficient. This is javascript for server side running on Node JS.
    • [2] replies
    • PHP is best for web application.PHP is a flexible, dynamic language that supports a variety of programming techniques.It is simple than java.
    • Both languages are good.Which language is more easy and suitable for you then select that one.Java and PHP is easy languages.Many programming tutorials are available on the internet
  • PHP is simpler than Java
  • Red for sure!, actually no, blue. definitely blue.

    What can you hope to learn from this thread? Was there a point behind asking the question?
  • It depends on your project requirement and on your programming skills. Java is more difficult than PHP so if you want to build web project but you are newbie in programming, I suggest you to chose PHP.
  • PHP is server side (executes on the server), Java (applets) is client side (executes on visitor's PC). There is also JavaServer Pages that executes on serverside. JavaScript executes on the client's side too.

    If you like OOP then maybe Java is a good choice. PHP is good for it's simplicity, if you like procedural programming you may find PHP suits well.
  • PHP(Laravel) or Python (Django)
  • Banned
    [DELETED]
  • PHP is the popular. I would use PHP.
  • PHP is the best
  • What no one seems to have mentioned yet is, that PHP is a server side language that will generate HTML as an output, therefore your web browser does not require any 3rd party plugin to view a PHP page. You can create a website/web application in PHP, and everyone on any PC (Windows, Mac, Linux) or any phone or tablet, will be able to see use the website.

    With Java however, you will require that the user has to install Java first, thus eliminating potential customers. As far as I know, most Phones and Tablets don't support Java in the browser.
    • [1] reply
    • For java this is only true if you use it with applets only. If you use JSP or more historic servlets than you get exactly the same html ouput that PHP generates.
      The difference is, if you use PHP on the serverside you are a bit limited. While with server side java there are no limitations of using any java library you can think of.

      Mike
  • I am a php developer so i prefer only php you can also work at home in odesk so that why php is good.
    Mtv Music Videos
    music video
  • I second the posts mentioning Python. While PHP is the most widespread, that by no means means it's also the best tool for the job. Python with Django has been on the rise for web apps, and for a reason. I'd definitely suggest looking into it.
  • It totally depends on your project - the requirements and the needs of it. Every language has its purpose and sure some have more advantages than others but it still holds true that project requirements decide your approach.

    My two cents would be - why not learn/master both? Of course it would take you more time and effort but in the end you would have an edge over your competition and grow and develop as a professional.

    Best of luck to you!
  • Java or PHP is a best and essential language for web application & programming because both have many frame works. Java is a wider range of web application as compare to PHP, java is a complex and modern technology and PHP is helpful to take method towards web application. Java is used to run the browsers and PHP is used to develop the dynamic websites or E Commerce Websites.
  • Java is an awful language but big companies like it because they've been sucked into the whole object oriented programming thing. If you're coding on your own and not part of the team then learn functional programming. Studies have shown that programs written in functional languages (and php can be used kind of as functional language although it only relatively recently started supporting lambda functions) take a third of the time to write as their object oriented equivalents.
    • [1] reply
    • i have to agree, Java was invented to be multiplatform... not just across computers OSes but also smart fridges, microwaves... obviously this never took ground.

      Still a lot of schools ditched Pascal and started teaching Java. This had the effect that students had a mindset that Java is something you could use in the real world to write productivity software with!
  • both........................
    • [1] reply
    • +1

      Java is used for Windows applications and PHP is used for Web programming. There may come time when one needs both of them.
  • I think both languages are best,but if you want secure platform for your application development then java is good because it provides secure platform for development.
  • PHP is much better now a days.

    We would recommend you to learn PHP

    But its always better to know all languages and maybe master a couple of them.
  • do you mean a Java applet vs PHP web technology?

    Javascript is used in conjunction with PHP to develop web tech

    Java applets seem to be something from the 90s these days
  • It actually depends upon your project structure and requirements:

    : If you're planning to develop a secure site like banking sites then Java/jsp is the best one.

    : If you're looking to make some stunning web designing & dynamic site, then you should go with php because it makes you more independent to make application dynamic in terms of designing & development

    I hope this would help you !!
  • as a fast learner how many month can you suggest I can learn JAVA ?
  • Banned
    i study both java and php what i love working in php its easy and interesting.
  • From my experience coding in both, I'd say I prefer java overall.. proper types and reflection can do wonders for tracking down weird bugs.

    That said, admin of, say, tomcat is a bit trickier than a LAMP / LNMP stack

    PHP is a bit easier to learn, but I don't think there's a huge amount in it.
  • Java has a much wider range of application than PHP. It's also much harder to learn. PHP is mainly designed for web developers to produce dynamic websites. Whereas Java is mainly used for developing windows based applications. Large enterprises use the Java technology for their application development.
  • i think both are good.it totaly depends on you.

Next Topics on Trending Feed