Originally posted by drawmack
In college I had a class called Programming Languages. In 14 weeks we learned and programmed in 12 languages. The entire point of that call was, all languages are pretty much equal so pick the one that best fits your needs and use it.

WOW!! What college was this and what course??!

Originally posted by yuraupt
PHP and Java they each have their own purpose. PHP is good for a simple websites. Java is better for more complex systems.

I would like to beg to differ. As I believe it...they can do pretty much the same but each has additional uses on top of the other one that make each one useful for the fitting situation. You might have already meant that and I mis read but I know definately PHP is hardly a simple language.

The longer I spend reading on PHP - the further the 'Guru' status seems for me.

I can proudly say I'm a HTML Guru, however [font=courier new]=oD[/font]

    Originally posted by Davy
    WOW!! What college was this and what course??!

    East Stroudsburg University - Programming Languages.

    I would like to beg to differ. As I believe it...they can do pretty much the same but each has additional uses on top of the other one that make each one useful for the fitting situation. You might have already meant that and I mis read but I know definately PHP is hardly a simple language.

    The longer I spend reading on PHP - the further the 'Guru' status seems for me.

    Java was originally designed for embedded systems and platform independence. PHP was originally designed for server side scripting of dynamic web pages. Therefor Java is better for embedded systems and platform independence while PHP is better for web scripting.

    If you really look at the languages you can see this. Java is strongly typed, which is a feature that really helps prevent coding errors in embedded systems, java also forces the OO paradigm on the programmer which also helps avoid errors in embedded systems. Java bytecode is how they achieve platform independence. Java runs in a virtual machine which always has the same specs no matter what actual machine it is running on.

    PHP is weakly typed which helps with rapid development of small programs. PHP offers many functions that are not necessary, but decrease development time (i.e. the array functions).

    Every langauge that I know of was designed with a spefic purpose in mind and reaches its full potential when it is being used to achieve that purpose.

      Originally posted by Davy


      I would like to beg to differ. As I believe it...they can do pretty much the same but each has additional uses on top of the other one that make each one useful for the fitting situation. You might have already meant that and I mis read but I know definately PHP is hardly a simple language.

      Differ? The difference is HUGE. Here you are:

      • php page is parsed everytime the user makes a request for. Meaning everytime it executes SQL queries to the database. (Seems not to be very effective for a websites with 100s concurrent users... But I am not guru. May be there are some techniques to improve the performance.)

      • java (jsp) file is compiled once. Possible to cache the data on the server side.

      • php is only for developing dynamic web pages. Java covers much more app types: from desktop apps to applications for cell phones.

        • php is simple. HTML file with embeded php code - what can be simpler? Make a file, store it on the server and it works. Java: you will need to install an application server, configure it, it will take some time to see your first page working...

      Just for the record: I am not saying that java is better that php or vise versa. They are different. They are for different purpose.

        BTW, in the article this thread started from the author mentioned that much more companies are looking Java programmers than for PHP ones.

        Can any body explain why?

          Originally posted by yuraupt
          - php is only for developing dynamic web pages. Java covers much more app types: from desktop apps to applications for cell phones.

          That's funny. I have php scripts that run system level maintenance, send out summary emails, parse incoming data, etc that have nothing to do with webpages.

          I've also made small desktop applications with php. Apps that have a front end GUI(see php-gtk), and have no relevance to a webpage. Not to say this was the most effective way to do this, but more that I could do it.

          On the question of jobs, how does he know? Did he do a worldwide count of job openings? Well, put the theory to the test of what I usually do when I want to find something, I'll google it.

          Results 1 - 10 of about 5,530,000 for java jobs.

          Results 1 - 10 of about 8,950,000 for php jobs.

          Well hell, seems there's more php jobs. Not to say this is an accurate way to see, but neither is trusting some random java programmer's opinion...

            Originally posted by LordShryku
            That's funny. I have php scripts that run system level maintenance, send out summary emails, parse incoming data, etc that have nothing to do with webpages.

            I've also made small desktop applications with php. Apps that have a front end GUI(see php-gtk), and have no relevance to a webpage. Not to say this was the most effective way to do this, but more that I could do it.

            That's even more funny - I did non-web-pages-php-scripts too. Like run a php script each night to do stuff in database.

            It doesn't make a big difference.

              Originally posted by LordShryku
              I'll google it.

              Results 1 - 10 of about 5,530,000 for java jobs.

              Results 1 - 10 of about 8,950,000 for php jobs.

              Well hell, seems there's more php jobs. Not to say this is an accurate way to see, but neither is trusting some random java programmer's opinion...

              I noticed the fact than there is more java jobs that php ones from my own expirience not from the article. The better way to check it is to go to a job search website rather than google.

              I tried one just now. http://jobsearch.monster.com/

              java: Jobs 1 to 50 of more than 5000
              php: Jobs 1 to 50 of 811
              (I selected USA)

              This is not the best and precise method neither, but a bit closer.

              I am still wondering for an explenation. I can't find one for my self... I heard that job agencies post job ads just to keep their resume bank updated. But still the difference is huge...

              LordShryku, I want to see more php job around. But beleive me there are more java ads. (don't know how many of them real one)

                Okay, so now I'm confused....

                Originally posted by yuraupt
                - php is only for developing dynamic web pages.
                I did non-web-pages-php-scripts too.

                Which is it?

                  PHP was originally designed for web page scripting.

                  You can do anything in it, if you really want to, but it is best at what it was originally designed for.

                  I mean you can write a gui word processor in assembler, if you really wanted to.

                    The point is that to say java has more uses and that php is only for webpages at this point is just a bold faced lie.

                      Originally posted by drawmack
                      Piers,
                      What I've found is that java is good in a couple of situations:

                      2) On the web, if you want the user to be able to visually manipulate a picture and just send in the final result. Java is a good choice.

                      Q: Wow! Where can I learn to do that?

                      3) Anytime you want to have live interaction between the web page and the backend. For example an insurance companies claims system could be web based but you really can't wait for page loads between selecting the make and model of a car, however you want to populate the model list dynamically based on the make. Java is the way to go for things like this as well.

                      Q: Why wouldn't you want to use javascript from HTML to do this instead of requiring Java?

                        Originally posted by Magnets
                        Q: Wow! Where can I learn to do that?

                        There's lot's of tutorials on this sort of thing.

                        Q: Why wouldn't you want to use javascript from HTML to do this instead of requiring Java?[/B]

                        Since when can javascript do a live connect to the database in any browser besides netscape? If I had 3,000 (a conservative estimate) models of cars I would have to send the information on every model to the browser to do this in javascript. Where as with java all I initially send to the browser is the UI (which once loaded is cached) Only the data that is actually needed is sent and it is sent as it is needed.

                        With the java applet hooked into a bean you can make the web page function like a db app on the desktop would. Sometimes you want this functionality. Granted, I've not needed it very often but when I have java was my solution of choice for it.

                          Originally posted by drawmack
                          There's lot's of tutorials on this sort of thing.



                          Since when can javascript do a live connect to the database in any browser besides netscape? If I had 3,000 (a conservative estimate) models of cars I would have to send the information on every model to the browser to do this in javascript. Where as with java all I initially send to the browser is the UI (which once loaded is cached) Only the data that is actually needed is sent and it is sent as it is needed.

                          With the java applet hooked into a bean you can make the web page function like a db app on the desktop would. Sometimes you want this functionality. Granted, I've not needed it very often but when I have java was my solution of choice for it.

                          I use Internet Explorer to do live connects. It's worked since 5.5 as I recall.

                            Originally posted by Magnets
                            I use Internet Explorer to do live connects. It's worked since 5.5 as I recall.

                            Interesting I did not know that. Do you know what other browser's it works in. Not saying I'll change cause there's things I like about doing this in java, just curious for the alternatives since my information is not up to date.

                              Originally posted by LordShryku
                              Okay, so now I'm confused....
                              Which is it?

                              LordShryku, to vanish your confusion I will say it out loudly. I WAS WRONG WHEN SAID php is only for webpages.

                              Even more to give you the complete satisfaction. PHP is the best language ever. You can do what ever you want using PHP.

                              It's better then Java. Sounds good now? Did you want to hear this?

                                Yeah, works for me. If you post comments like that, expect to be grilled.

                                  Originally posted by drawmack
                                  Interesting I did not know that. Do you know what other browser's it works in. Not saying I'll change cause there's things I like about doing this in java, just curious for the alternatives since my information is not up to date.

                                  As far as I know it just works in Internet Explorer. Their intention appeared to be that folks might want to download a file and be notified when the download was complete. Instead of a file I just passed it a short message. It worked perfectly fine.

                                  I just checked the Microsoft website and they've added some xml namespace stuff to the code. They're sample no longer works. I just tried my old code and it still works.

                                  I developed this little sports tool that appeared in a window about the size of today's large cell phone window format. Users could maintain their rosters and interact with other sports applications. People using the tool could have little IM-style conversations using that download feature. I spent a small fortune developing it. I'm terrible at marketing so nothing came of it. Oh well!

                                    To be honest it's kinda silly to post something with strong biased opinion with a weakly structured article on an arguement between php and Java onto a site that URL domain specifically starts with 'php'.

                                      Write a Reply...