Acs Posted July 25, 2008 Share Posted July 25, 2008 Hey!! Please help me out here guys! I have some guy talking to my boss about java saying that java is better and does this better than php! I have found some stuff on google about php vs java, but most of it is really old (like 2003 or something) and I know that php has come a long way. I found that say that php does scale better than java, but does anyone know of where I can find some really good data that shows that php is better or at least as good as java! Please please help me out, I don't want to start working with java. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/ Share on other sites More sharing options...
.josh Posted July 25, 2008 Share Posted July 25, 2008 For web development? PHP ftw hands down. Java is better for graphical applications and other general stand alone applications. I guess it depends on what it is your doing (you really didn't mention that, so it's kind of hard to give you specific reasons). Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599524 Share on other sites More sharing options...
Acs Posted July 25, 2008 Author Share Posted July 25, 2008 I am sorry! This is for web development. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599555 Share on other sites More sharing options...
redbullmarky Posted July 25, 2008 Share Posted July 25, 2008 just reel of some examples of PHP in use on a huge scale. Facebook, Yahoo, Wikipedia, Youtube, etc etc - if it's good enough for 4 of the biggest sites on the web, it's good enough for me. The reason he's probably pushing the idea of Java is that he's no good at PHP and Java is his comfort zone, same as you the other way around. There's a thread somewhere in Misc - no time to look for it now - listing all the big sites that are PHP-powered. There's more than enough ammo. Plus - if it's your boss you're talking to, then tell him what he wants to hear: 1, PHP developers are easier to find when you need one - either to employ or outsource work to. ie, no struggling when big chunk of work comes in. 2, PHP developers generally command lesser salaries than Java developers - therefore meaning it's cheaper for him to hire people 3, Most of the team is probably already proficient with PHP and would need retraining - costing the company more money just based on the preference of one single person. I could go on, but i'm sure you're getting my gist. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599579 Share on other sites More sharing options...
waynew Posted July 25, 2008 Share Posted July 25, 2008 PHP is often easier to learn than Java. I've done Java in college and JSP etc, and I can say that everything is a lot more prolonged if you get my drift. For instance, think of the length of code taken to connect to a db in PHP, in comparison with the same code in Java? Although I do like Java better. :-\ Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599581 Share on other sites More sharing options...
.josh Posted July 25, 2008 Share Posted July 25, 2008 hard to find java hosting unless you get a dedicated server. That's more money. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599602 Share on other sites More sharing options...
Acs Posted July 25, 2008 Author Share Posted July 25, 2008 Thanks guys! I don't think everything will be converted to java, but we already have one of our websites working with java. We have servers so the money part won't help Most of the guys here don't really enjoy java. But will see how things go Thanks again for the help Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599636 Share on other sites More sharing options...
Daniel0 Posted July 25, 2008 Share Posted July 25, 2008 For the record, asking whether X language is better than PHP on a PHP forum will only result in biased opinions. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599643 Share on other sites More sharing options...
tibberous Posted July 25, 2008 Share Posted July 25, 2008 Java is a language that is only still around because of colleges pushing it. It must be easy for them to get Java teachers from the ever-growing pool of unemployed java programmers. Java isn't a bad language, but it doesn't work well for the web (or for distributed applications, or applets). Objects, which are the core of the language, create a lot of overhead, which isn't bad for something like an application that gets created one time, but sucks for something like a page request that is processed only for a brief second. Java has a longer development time up front, that is generally never made up for by code reuse - and as much as Java programmers would like to tout their objects as reuable, the truth is that copy and pasted PHP code is just as reusable, sometimes more so because it won't be dependent on 20 other objects. Most of the things you can do in Java can be done in PHP, it's just that PHP doesn't force you to do them -- which according to Java programmers makes it worse. Personally, I like that fact that PHP gives me the flexibility to structure a program however I want, not how someone, who spends more time pushing their paradigm than programming, says I should structure it. Also, and I might be wrong on this point, but I don't think that the JVM is Open Source. I'm not mentioning this because you'll ever need to touch the source of PHP or the JVM, but just because making the source available to a large userbase generally leads to better code. I think Java is basically dead. Adobe is going to kill the Applet and platform inspecific implementations of it, .NET and C++ will always beat it for real applications, PHP and ASP will continue to hold the server end, and Java will be relegated to the community colleges - where for $92 a credit, you can learn something very similar, yet infinitely less useful, than AS3. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599752 Share on other sites More sharing options...
448191 Posted July 25, 2008 Share Posted July 25, 2008 That post really disappointed me. More to the point, it's a load of crap. Most of it anyway. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-599778 Share on other sites More sharing options...
Liquid Fire Posted July 26, 2008 Share Posted July 26, 2008 @tibberous: While i agree that I would rather use php for web development and C++ for standalone applications, I would not say java is dead. I really do not like java because out of the 3 applications i have used built form it, they were all buggy and slow. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600262 Share on other sites More sharing options...
waynew Posted July 26, 2008 Share Posted July 26, 2008 It is a load of crap. It sounds as if somebody didn't learn Java and therefore thinks that it's no good. The vain brain; people like to believe that what they can do is far more important and better than what others can do that they cant. Speaking from experience, here in Ireland, Java programmers are very well sought after. Their salaries are completely through the roof, so that point about unemployed Java programmers is completely void. Also, Java isn't going to be just shelved for Flash applications that have the power of a hamster running around in its wheel. I've created Flash applications in the past and for some reason, they just don't feel right. That's not just my own; but that's all the other Flash applications that I've used in the past as well. Also, I doubt that Flash is going to replace a language that is even used in microwaves. It has a long way to catch up before it can meet the same level of convergence as Java. Prove my point? Just look at your mobile phone. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600264 Share on other sites More sharing options...
.josh Posted July 26, 2008 Share Posted July 26, 2008 umm we're comparing java to php not flash... and anyways, don't get me wrong, I'm Irish. Irish Pride, RAWR! But I hardly think Ireland constitutes any kind of significant data for java programmers... Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600270 Share on other sites More sharing options...
webref.eu Posted July 26, 2008 Share Posted July 26, 2008 Well, I used to be an ASP.net developer, but I switched to php mainly because of the wealth of scripts available and the number of people who will help you out on the net, and that is a major plus point. Although I haven't used Java, I'm sure php development would be so much quicker, I just hope your boss makes the right choice. I reckon php would win on speed of development, staff cost, hosting cost, maintainability ... what more could he want. Rgds Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600282 Share on other sites More sharing options...
waynew Posted July 26, 2008 Share Posted July 26, 2008 But I hardly think Ireland constitutes any kind of significant data for java programmers... So 90000 Euros a year isn't significant data? Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600286 Share on other sites More sharing options...
.josh Posted July 26, 2008 Share Posted July 26, 2008 Hey I'm sure if you're a java programmer living in Ireland you'd be setup for sure, but I am comparing the whole world here...I'm just saying...you gotta consider how many programmers there are in Ireland vs. the whole rest of the world...and the fact that that 90k euro a year market is restricted to just Ireland... Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600374 Share on other sites More sharing options...
Liquid Fire Posted July 26, 2008 Share Posted July 26, 2008 as for comparing PHP and Java, they are 2 different languages built for 2 different things. Java was not designed for web development specific and PHP was. PHP is a bit faster for development of web applications than Java from my experience(of course my java experience has not been with web development). Also many web host companies do not see offer java support as a priority and that is for good reason. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600453 Share on other sites More sharing options...
tibberous Posted July 26, 2008 Share Posted July 26, 2008 I know Java, at least I used too. It's a nice language to program in and the documentation for it is great, but... Applets suck compared to Flash apps. The JRE is slow. Until I built this computer, Limewire ran noticeably slow, and Limewire is hardly a complex application. Every application doesn't need to be object oriented, or benefit from being broken down into objects. Forcing people to install the JRE isn't exactly user friendly. That's why Java is a college language - because it's easy to write and probably the easiest language to read. It might be good for a huge project with 20 people where everyone can pick and object and not be confused on what to do, or for a command-line utility that needs to run cross platform, but in general it can't compare with languages more geared towards a specific task. I don't dislike Java because I don't know it, I don't know it because I dislike it Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600544 Share on other sites More sharing options...
448191 Posted July 27, 2008 Share Posted July 27, 2008 I'm sorry, how is this about Flash? I'll agree that Java APPLETS are as good as dead. There is quite a bit more to Java than just applets. I'll also say that Java desktop applications are slow, and yes, C++ and .NET, for Windows at least, are 'better' alternatives. Where Java is currently shining is 'enterprise application development'. And that is a huge market, if not the largest. The thing that bothered me the most about your original post is that you promote 'copy and paste' coding. Yeah, I'm talking about this bit: Objects, which are the core of the language, create a lot of overhead, which isn't bad for something like an application that gets created one time, but sucks for something like a page request that is processed only for a brief second. Java has a longer development time up front, that is generally never made up for by code reuse - and as much as Java programmers would like to tout their objects as reuable, the truth is that copy and pasted PHP code is just as reusable, sometimes more so because it won't be dependent on 20 other objects. That, is a load of crap. Why do you think PHP is becoming more like Java with every release? Copy-pasted code is hard to debug and hard to manage. Finally, I emphasized part of your quote. Consider only a relatively very small amount of memory per request can be attributed to a single request, as the Java environment (using servlets at least) persists across requests. Same cannot be said for PHP, unfortunately.. In all, your post seemed more like an unfounded bitch against Java than anything else. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600552 Share on other sites More sharing options...
Liquid Fire Posted July 27, 2008 Share Posted July 27, 2008 my things against java is not their extensive use of object because that is what i basically do with PHP(just like any PHP framework) but that applications based on it seem slow, buggy, and a memory huger/leaker. While copy and pasting php code is reusable(and i use that word lightly), maintaining it is next to impossible and a major waste of time. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600565 Share on other sites More sharing options...
Daniel0 Posted July 27, 2008 Share Posted July 27, 2008 I don't dislike Java because I don't know it, I don't know it because I dislike it I'm sorry, but that's ridiculous. How can you dislike something you don't know? That's like saying "That guy over there, I don't know him, but I fucking hate him!" Forcing people to install the JRE isn't exactly user friendly. Right... it's not like Flash has similar requirements to the client. Also, take a look at this piece of ActionScript code (source: http://en.wikipedia.org/w/index.php?title=ActionScript&oldid=227252689#ActionScript_3.0_examples): package { import flash.display.Sprite; import flash.text.TextField; import flash.filters.DropShadowFilter; public class HelloWorld2 extends Sprite { public function HelloWorld2() { var shad:DropShadowFilter = new DropShadowFilter (2, 45, 0x000000, 25, 3, 3, 2, 2); var txt:TextField = new TextField(); txt.textColor = 0xFFFFFF; txt.filters = [shad]; txt.width = 200; txt.x = Math.random() * 300; txt.y = Math.random() * 300; txt.selectable = false; txt.text = "Hello World welcome! [" + Math.round(txt.x) + "," + Math.round(txt.y) + "]"; addChild(txt); } } } That looks a lot like Java. You also mentioned that Java is bad because every bit is broken into objects and that it is highly inefficient. However, if you look at the code then you will see that there are several objects in use: TextField, Sprite, DropShadowFilter, etc. Also, regarding the quote John posted above from you. Seeing as you need to compile a Java app, it will only be "created" one time. Furthermore, our site makes heavy use of objects, and, well... it's running pretty fast for me. Chances are that you don't know how to do it correctly and it is therefore inefficient to you when you try. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600718 Share on other sites More sharing options...
.josh Posted July 27, 2008 Share Posted July 27, 2008 actionscript is based off javascript but seriously, why are we still comparing java to flash...? The OP was java vs. php and some dude misread and went on a rant about java vs. flash (which seriously, I don't see how the two can really be compared). Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-600827 Share on other sites More sharing options...
Liquid Fire Posted July 28, 2008 Share Posted July 28, 2008 I don't think there is any real reason to use Java over PHP for web development. With properly written PHP code(and because a lot of amauters use PHP and they generally produce less then good quality code and even professional companies i have works with produce less than good quality code I think gives PHP a bad name), it is very scalable, maintainable, and reusable. If you feel you need to use Java, i would just use java but write the application as a standalone application and not for the web(but at that point i would use C++ or C# instead of Java). Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-601193 Share on other sites More sharing options...
waynew Posted July 28, 2008 Share Posted July 28, 2008 actionscript is based off javascript but seriously, why are we still comparing java to flash...? The OP was java vs. php and some dude misread and went on a rant about java vs. flash (which seriously, I don't see how the two can really be compared). No, if you had read, you would of noticed that the guy above me was claiming that Flash was going to overtake Java. That is why I started mentioning Flash. :-\ Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-601518 Share on other sites More sharing options...
bilis_money Posted July 28, 2008 Share Posted July 28, 2008 if i'm not mistaken the average applications for java is for mobile phones. Quote Link to comment https://forums.phpfreaks.com/topic/116564-php-reasons/#findComment-601747 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.