Page 1 of 2 12 LastLast
Results 1 to 40 of 69
  1. #1

    Java losing to php in terms of penetration.

    I like java servlets better than php, felt that way for years. Strong typing wins. But I always choose to write my apps in php. Even apps I write for fun.

    Am I right that if you pick java, you have drastically less isp's to choose from (or move to) to host your site? I could only find one web host that offered servlets for a shared account, lunarpages.com. There are probably others. Somewhere. The point is, if I log in to any non-ms web hosting account, I can bet you a pizza that I'll have php and perl right there at my fingertips. Is that a safe bet for servlets/jsp?

  2. #2
    Join Date
    May 2005
    Location
    Houston, Texas, USA
    Posts
    5
    Even Oracle (one of the biggest Java supporters) is looking into PHP. They recently teamed up with Zend on some projects.

  3. #3
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    IBM has already announced an alliance with Zend to make sure PHP runs without hiccups on their iSeries platform.

    About your question regarding servlets -- it depends on your host (obviously). The company I work for, we charge a fee per month to enable servlets on our UNIX/Linux servers. Most providers do not advertise this because they are specifically targetting the "will this script that I found at ____ for free work on your server" -- and 99% of the time, these are PHP/MySQL scripts.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  4. #4
    Join Date
    Oct 2002
    Posts
    226
    Yes, many people are starting to think that Java is a sinking ship. A lot of hard-core Java programmers feel that Sun f'd up J2EE.

    Tomcat/Java can be a pig and yes, most providers charge extra to deal with it. If you're going to run Java in any meaningful way you really should run your own server.

  5. #5
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    If you're going to run Java in any meaningful way you really should run your own server.
    ...and avoid Tomcat (which is not the best thing for a production servlet container).
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

  6. #6
    This is so sad. I really want a language that has strong typing. And that's peristant, you know, stays in memory between pages. Php isn't either. And I have a philosophy that if your language doesn't do strong typing then you shouldn't do OOP with it either. OOP without strong typing = silent bugs and instability.

    They say programming languages are like religions, and I'm ripe to be converted. Perl doesn't do strong typing either. Python cares about my whitespace.

    Hey will perl 6 do strong typing? What else is there?

  7. #7
    Join Date
    Feb 2004
    Posts
    634
    I certainly don't see Java losing any popularity; the Java world is as vibrant and varied as ever IMHO. My company (primarily a Java shop that develops apps for mostly mid-market & Fortune 2000 companies) certainly isn't suffering from a lack of new work; we've had to turn away several projects recently. As enterprises have started to migrate to the next set of buzzwords (Web Services, SOA, ESB, SOBA, whatever the next acronym Gartner comes up with), you'll see plenty of work for Java & .Net programmers, as PHP doesn't have much of a role in that arena. Java has a strong enterprise presence and I don't see that changing anytime soon. Java has certainly had some missteps (overblown, overarchitected EJB implementations being the prime example), but from my perspective it seems to be recovering from that. Java is moving towards a OPJO-based unified persistence mechanism, and the EJB 3.0 spec will fix a lot of the overhead and problems with using EJBs, especially when they were previously used to do something they really shouldn't have been used for to begin with. Aside from the wide variety of commercial offerings based around Java, we see (and use) a lot of cool open source technology coming to fruition and being used to solve real business problems, things like the Spring Framework, Hibernate, the Apache Jakarta projects, the ObjectWeb projects, etc. Go to sites like the ServerSide.com, JavaLobby.com, JavaRanch.com, etc.--there certainly doesn't seem to be a lack of good technical discussion and/or people complaining about not being able to find a good job in the field.

    The question is if Java can get more penetration on the low end and make things easier for less advanced programmers to effectively utilize it. Sun is trying to mimic the simplicity and GUI appeal of Microsoft's Visual Studio with it's Java Studio Creator, but it still has a ways to go. For simple apps where thinks like granular persistence of objects, sophisticated DB pooling, extensive middleware libraries, etc. aren't of any concern, PHP is probably the better choice if you want to get something done quickly.

    I think there are several reasons you don't see Java installed by default by most web hosting companies, starting with the fact there is very little demand for it at the shared hosting tier. Given it's more enterprise orientation and steeper learning curve, there aren't a lot of people looking to publish their casserole recipe database on their homepage using Java on a $10/month shared hosting account. I doubt Java will ever fill the role for those that just want some simple form processing or pulling a few things from a MySQL database; it's simply too much overhead and complexity for that. I think another reason is the licensing. Although the Java J2SE and J2EE libraries are free to download, there are certain licensing restrictions that preclude Java from being included with many of the open source *nix variants, including many of the most popular flavors used by web hosting companies. If Sun can work out the details on getting Java included with more of these distros, I think you'd see more people interested in "kicking the tires" so speak and looking at what Java is and what it can do. If Tomcat/Java can get bundled with popular distros the way Apache/PHP is, I think you'd see more hobbyist interest in Java and probably more demand for it to be included by hosting companies.

  8. #8
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082
    Originally posted by Rotwang
    This is so sad. I really want a language that has strong typing. And that's peristant, you know, stays in memory between pages. Php isn't either. And I have a philosophy that if your language doesn't do strong typing then you shouldn't do OOP with it either. OOP without strong typing = silent bugs and instability.

    They say programming languages are like religions, and I'm ripe to be converted. Perl doesn't do strong typing either. Python cares about my whitespace.

    Hey will perl 6 do strong typing? What else is there?
    Strong typing is the way of the past. Why you're basing your language decision on such an inconsequential (and annoying, IMO) 'feature' of a language seems silly to me. You end up with weak (and slow late-binded) typing with Java anyways when you use Object references all over the place because there's no other way to create a sane container. The only thing strong about Java's typing is that the primitives aren't objects, which IMO should be true of any real OO language. If you really, really need to implement something similar, it's pretty trivial to use introspection in a setter to make sure the object is the right type before you assign it to a member.

    Perl 6 will definitely not be strongly typed.

    I think it's time you lost your bias, all the neat, very cool new languages are probably going to be loosely typed. The only ones with any popularity in the web field that aren't are C# and Java. Take a look at Python and Ruby, both are very excellent languages.

    As for the OP's question...I don't really see Java losing popularity...yet. It seems to be maintaining it's ground, at least for now, but I get the feeling that Sun is fighting a losing battle at least with open-source proponents. It doesn't integrate well with other OSS technology, and in the opinion of many is not well suited to web development in the first place. Java carved out a niche for itself because it was the only viable solution that did what it could do at the time (cross platform, full OO, etc). PHP was (and still is) sorely lacking in OO features, and just in general feels like a disorganized mess. Perl is even more hodge-podge, and while being well-suited to quick one-off scripts, it's a clumsy language to use for large web projects. At the time, that left you with Java and Java alone. Today, however, there are a multitude of viable choices, and many of them are probably better than Java for the task at hand. Most, even large, web projects simply don't need the weight and development overhead of using Java. PHP5, Python, Ruby, even C# will cut development time significantly, while still offering the same advantages Java does. For that reason, combined with the fact that Java is a boat and administrator's nightmare, I think we'll see a pretty large decline in Java development on the web in the next five years. In other areas, I'm not so sure, but I think a move to C# is well under way.

    Sun failed, IMO.

  9. #9
    Join Date
    Feb 2003
    Posts
    433
    Yeah, try ASP.NET using C#..Very cool, and easy to use (I personally do not favor strong typing though :p).

  10. #10
    Thanks, Emil, I should've mentioned that I'm in the anti-MS camp and wouldn't spend a minute even considering anything to do with MS. But given what I wrote your suggestion makes sense.

    To lockbull, you're doing what so many java guys do, you're poo-pooing php as lightweight and trite and not serious. It used to be true, it certainly started that way. But now it's getting serious. As I was informed earlier in the thread, when Oracle and IBM are starting to cater to it, it's being used for more than cooking recipes. It just proves my point: The battlefield is the web hosting companies. PHP is absolutely not as good a language/architecture as java. But that's not what matters. Windows was absolutely not as good as MacOS, but that didn't matter either. Penetration wins, popularity wins. Propagation, ubiquity. Another example is redhat. They account for what- 70% of the linux web hosting market now? I can't even name a web host that's offering linux but not offering red hat. Some offer red hat *or* some other other flavors. Is red hat the best linux flavor? probably not.

    You said "The question is if Java can get more penetration on the low end and make things easier for less advanced programmers to effectively utilize it. " But see, the problem with that is cases like me. I'm plenty advanced, I'd love to use java. I'm even running dedicated, not shared. I could even figure out how to install jboss in spite of the crappy documentation for how to hook it up to apache. But I'm not going to write (or move) my company's platform to a language with such poor penetration, I'd be nuts to do so. The fact that I'm advanced enough or that I'm running dedicated is irrelevant to the decision. (And I'm not doing casserole recipes!)

    The acronym "LAMP" will be what crushes java, IMO. There ain't no J in "lamp".

    And to error404, we're in different universes! Strong typing is "annoying"? Why, because it catches bugs in your code! And I could count on one hand the number of times I've written a java function that passes Object data types instead of some derivative. I think you're writing some loose java code there.

  11. #11
    Join Date
    May 2005
    Location
    San Mateo, California
    Posts
    13
    There are benefits for using Java over PHP.

    1. The language syntax is stricter to prevent common mistakes which makes complex applications with a lot of code less error prone.
    2. The JVM optimizes code at runtime for the specific system for better performance.
    3. You can write multithreaded applications and caching techniques to boost performance and scalability.

    This means Java applications tend to be more appropriate for larger and more complex applications.
    Prices123.com - Online product price comparison shopping

    Compare/check prices at Prices123.com | Affordable dedicated servers

  12. #12
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082
    Taking it a bit too far, of course, I'm not a fan of Java by any means. Especially annoying are a) the lack of true object-orientation (there should be no notion of a 'primitive' in an OO language) and b) the fact that the built in classes break conventions you as a programmer are forced to follow. The hardcoded-ness of some of the stuff in Java irks me. For a couple examples, look at the handling of Strings and the fact that they're non-primitive, however have operators associated with them. And ugh, event handling in Java is uggglyyyyyy. C# is superiour in every way, and while it may be created by MS, it actually has an open-source runtime, unlike Java.

    Strong typing is not something I really hate, I just don't really see it catching any bugs in a properly implemented loose language. If you pass the wrong object type, and then try to manipulate it, you're going to bomb with strong typing or without it. I find very, very few of my bugs have anything to do with type errors or passing the wrong object. Maybe it's just me, but I find I just get annoyed when I code Java, having to explicitly cast references back and forth all over the class tree even to do simple things. Whenever you use a J2SE container, you're casting your reference to Object (or to/from whatever interface you're using, anywhere), which you then have to re-cast when you take it out. Containers are even worse when you're trying to store a vector of integers or whatever, and with the only way to determine the type of an object at runtime being late binding, there is no better solution. Most of these are Java shortcomings, I really just latched on to your outright statement that loosely typed languages are evil(tm). I enjoying working in C++, but far moreso in Python. Python and Ruby are the only languages I've worked in where I don't find the language and it's requirements getting in my way of just writing working code.

    There is a paradigm that's sort of middle-of-the-road on the typing issue. I can't even remember what language uses it, which is quite sad...but anyway, the idea is that the object's type is defined when the variable is first assigned a value. After assignment, the type of that particular reference can't be changed. I like the idea.

    Of interest may be this interview with Bill Venners (a well-known Java advocate and developer) and Guido van Rossum (the creator and design of Python) on the topic: http://www.artima.com/intv/strongweak.html

  13. #13
    Join Date
    Feb 2004
    Posts
    634
    Rotwang,

    I'm not trying to convince you of anything except that Java certainly doesn't seem to me to be "losing to PHP in terms of penetration". I guess I just don't see it that way. Go to a job board, say Dice, HotJobs, Monster, whatever. Type in Java, .Net, Ruby, PHP, Python, whatever you want. Look at the openings in each technology and then tell me that Java has a minimal presence in the web applications market. Check the TIOBE Index and notice how Java is pretty consistently ranked the number one most popular programming language over the last several years. There has been an explosion of quality open source projects in Java over the last few years, exceeding that in any other language. In the realm I compete in I almost never see PHP or Python or Ruby. It's pretty much Java, C++ or .Net. I'm not trying to trivialize PHP--the casserole comment wasn't to say that's all it can do, just that for certain low end things Java will probably never get used (though truth be told I do probably prefer Python or Ruby for that sort of application). PHP, Python & Ruby have all been around longer than Java, and Java has never been supported by many web hosting companies (though I would guess that's probably on the upswing, not the downswing). What evidence do you have that LAMP is somehow "crushing" Java now? The Apache foundation's Jakarta group is one of the largest contributors of open source Java projects; they already have a full blown J2EE application server called Geronimo under development, and just last week they anounced they are doing an open source JVM called Harmony. RedHat already includes Java and the JONAS J2EE server with their Enterprise AS package. Certainly Java won't be viable forever, but I think that anyone who thinks that Java will somehow be a bit player in the web applications arena in the next 5 years is seriously out of touch with what is going on in the general (i.e. not just web hosting) market. If you believe all the technology prognosticators, we're at the start of an upgrade cycle where companies will be migrating their applications to more flexible service oriented architectures, and the technologies best equipped to fit those needs are Java and .Net. We actually tried doing a somewhat involved Web Services project with PHP not that long ago, and pretty much gave up because the libraries were so poor that we didn't feel comfortable rolling it out.

    IBM and Oracle are supporting PHP for one reason--they want to migrate those customers to Java if they can. Here's a comment from Richard Rendell, senior director of product development at Oracle:

    "Rendell said Oracle is supporting efforts to increase interoperability between PHP and the J2EE (Java 2 Enterprise Edition), and is in support of JSR (Java Specification Request) 223, which is looking to bridge the gap between scripting languages like PHP and the Java environment."

    So yeah, both of them are saying we want you to run your PHP applications using DB2 or Oracle backends. But when you need to do more, we'll try to sell you on our Java application servers and Java infrastructure because we don't make money selling PHP, and by increasing interoperability we can more easily move you over to Java.

    I'm sure Sun/IBM/BEA/Oracle/etc. see .Net as their main future competition, not scripting languages with (some might say misplaced) enterprise aspirations like PHP or Ruby or Python. Which isn't to say those aren't capable languages in their own right and that people don't (or shouldn't) use them. Java certainly isn't the end all be all--use whatever fits your needs. I personally think that Java will make more inroads into the middle and lower areas than something like PHP/Ruby/Python will make in the enterprise market, but that's just my (somewhat) informed opinion. The entry level web hosting market is not what I see as the battlefield--Java is certainly much more commonly taught in university level CS programs than PHP, Python or Ruby, and there are a lot of large companies that have a big stake in Java doing well. I've had several conversations with what I would call entry level programmers (which who have been in the biz a few years but who lack formal CS degrees), people who are bristling a bit at having to migrate from something like PHP4 to PHP5 or VB to VB.Net and basically having to learn an entirely new OO paradigm. I tell them those are both heavily influenced by Java and that they should just learn Java instead and get paid more And if you like the quick n' easy style of scripting languages, Java can accommodate you with things like Groovy, Jython, JRuby, BeanShell, Rhino, etc.

  14. #14
    Originally posted by prices123
    There are benefits for using Java over PHP.

    1. The language syntax is stricter to prevent common mistakes which makes complex applications with a lot of code less error prone.
    2. The JVM optimizes code at runtime for the specific system for better performance.
    3. You can write multithreaded applications and caching techniques to boost performance and scalability.

    This means Java applications tend to be more appropriate for larger and more complex applications.
    I agree with all of that completely. Those are benefits of using java over php. (number 2 actually just got a lot better with the latest jvm update). Java is better than php. It's also losing to php.

  15. #15
    error404, excellent url about the strong/weak python typing. I'm still reading it.

    I've actually written some C#. I completely agree about the event handling (delegate as a keyword!). In fact, the syntax sugar in C# prompted sun to follow up, I think it was in the 1.5 release, they added all kinds of syntax stuff, typed arrays etc. C# is good stuff. Except that it's laced with darkness and evil and poison and an absurd license and I'd never use it ever. But still.

    I'm still not with you about strong typing "If you pass the wrong object type, and then try to manipulate it, you're going to bomb with strong typing or without it.". No. I don't get it. If my function is declared to accept only XYZObject and I pass it ABCObject, it won't compile. That's the whole point of strong typing. Bug averted.

    And my statement wasn't that loosely typed languages are evil, it was that loosley typed languages shouldn't do OOP. But close enough. Languages not doing oop is kind of evil in itself, so I'll go along.

    I'd like to get into Python and Ruby were it not for the whitespace thing. All my geek friends are pushing python on me since they know I'm loosing my religion with php and java, I'm very convertable right now. You can lead a horse to water...

  16. #16
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082
    Well, eventually that object you're passing into the function is going to be used somewhere, and when you call a nonexistant method or try to manipulate some data, you'll get a nice runtime error, full stack trace and state information, and probably a good idea of why you ran into the error in the first place. A compiler error doesn't help much; it tells you something is wrong, but rarely much beyond that at all. Knowing that I'm trying to pass the wrong object type into a function doesn't help me figure out where I'm casting an Object or interface reference to the wrong type or something similar. The call tree really does help a *lot* with bugs where you've got weird data floating around.

    It's a lot more work in a lot of situations, and I just don't see that it's worth the marginal benefit. Quite a bit of code is dedicated just to massaging references and similar such things, especially in GUI programming, and I firmly believe that the more lines of code you have, the higher chance that there are bugs in it, regardless of language. If I can write a 200 line Python application that performs the same task as a 1000 line Java program, I suspect the Python version has a few less bugs that are much more difficult to track down; errors in the algorithms and whatnot. The Python code would be much easier to read, faster to code, and less-likely overall to have catastrophic bugs in it.

    And why so averse to the whitespace thing? It's just one of those things you get used to, like C-style syntax. It actually ends up being less typing, and forces you to organize your code nicely (provided you use a proper editor). Hopefully you intent your control structures anyway? Ruby doesn't depend on whitespace either. It uses 'end' to signify the end of a control structure.

  17. #17
    lockbull,

    The TIOBE index (as well as the fact that there are lots of jobs for java techs) might indicate the success of the language overall. But if you're looking at the rankings and your only thinking web app penetration, you have to remember that PHP is a web-only language, pretty much. Every percent of PHP's score on the TIOBE index is measuring the penetration in the web applications sector. I mean, example: perl is up there pretty high too, but we both know perl has been on the decline for web app development for years. It's perl's other uses that are propping it up in the ranking. Well, or heck, C is the top of the list.

    I have no evidence "that LAMP is somehow 'crushing' Java now". (And actually, I said "will crush java", not "is crushing". Hard to have evidence of the future, eh?) But the fact that open source is unifying into something which leaves java out ought to be a bad omen.

    Really I think I'd be with you, my main gripe about what Sun (and you java guys) are thinking about java is your statement "for certain low end things Java will probably never get used". Why not? I don't understand how that thinking is a good strategy for Sun. I'm the guy on the sidelines watching the java tream freely giving this ground to other languages with little concern and without really even putting up a struggle to gain it. something like: "Oh that's just low-end stuff, they can have it".

    Java more and more seems like an ivory tower language, used in the universities, by financial, by medical. While php and company are scrappy, down-to-earth and realistic, growing like a swarm. It's like the elites vs the masses. The elite language is better, no question. And beta was better than vhs... macos better than windows...

    Anyway we'll remember this thread 5 years from now!

  18. #18
    Join Date
    Feb 2003
    Posts
    433
    What do you mean by "penetration" and exactly how does that relate back to the language?

    Obviously if you want to release an application, doing it in PHP/mySQL would benefit you the most because you can reach the widest audience with the product for the time spent on it..But other than that, if the application you are writing is in-house, or not intended for a wide release then choosing something like Java has its advantages (the "elite", enterprise features etc.).

    One problem that I had with Java is all the names and technologies (servlets, containers, Java this, Java that, Java Debugger JDB, JDBC, J2EE, JavaBeans, JSP, Sun Java studio Enterprise)..Honestly, I just got sick of hearing J, Java, and Sun

  19. #19
    Originally posted by error404
    Well, eventually that object you're passing into the function is going to be used somewhere, and when you call a nonexistant method or try to manipulate some data, you'll get a nice runtime error, full stack trace and state information, and probably a good idea of why you ran into the error in the first place. A compiler error doesn't help much; it tells you something is wrong, but rarely much beyond that at all. Knowing that I'm trying to pass the wrong object type into a function doesn't help me figure out where I'm casting an Object or interface reference to the wrong type or something similar. The call tree really does help a *lot* with bugs where you've got weird data floating around.
    You're arguing that run-time errors are easier for the programmer to debug.

    I'm arguing that I'd rather my program throws a compile time error that's harder to debug than a runtime error that's easier to debug.

    We agree on what we disagree about?

    EDIT: here, top paragraph of this page: http://www.artima.com/intv/strongweak4.html

    (and btw python can take my whitespace from my cold dead hands )
    Last edited by Rotwang; 05-23-2005 at 06:23 PM.

  20. #20
    Join Date
    Feb 2004
    Posts
    634
    Rotwang,

    As far as open source is concerned, I see a richness and variety in Java open source projects that I simply don't see in other languages. You have your choice of everything from multiple servlet containers, full blown J2EE application servers, frameworks, IDEs, code generators, middleware, etc. The constant bashing of Java by Eric Raymond and Richard Stallman doesn't seem to be slowing down the open source momentum behind it, and as I mentioned the Apache Foundation is working on an open source JVM so at that point they won't even have that issue. Open source technologies like Hibernate have made a significant impact in the persistence mechanism/OR mapping space, and that's being rewarded with it's author being asked to be on the JCP subcommittee to help draft the EJB 3.0 spec. I could list off dozens of quality open source technologies we've used in our projects.

    With power comes complexity (and Java is simply inelegant in some ways, which I'm sure we can all agree on), and there's no doubt that Java has a ways to go to be as easy to use as some other environments. Try using either Sun Java Studio Creator or the NetBeans IDE; while I won't argue that they are quite as polished as something like VisualStudio, for the beginner you could certainly do a lot worse. And if all you want to do is quick n' easy scripting for simple apps, as I mentioned in a previous post Java can accommodate that as well. That approach isn't particularly popular, but it's certainly possible. If you like Ruby or Ruby on Rails, there's JRuby and Trails. Pretty much every framework in PHP is self-admittedly a copy of a Java framework. And I think that's part of Java's main problem--it has so much to offer, and so many different approaches to the same problems, that it's hard to get a handle on it. Just think of something like the data access tier. Within that space alone, I can either chose to use JDBC, OR mapping (which includes Hibernate, iBatis, SQLMaps, TopLink, JDO, FireStorm, to name just a few), EJB, some custom inhouse solution, and god knows what else. And it doesnt' help that Sun's blueprints previously included some of the worst ways to develop Java applications, which was pretty much to use EJB everywhere.

    I totally agree with Emil...Java has WAY too many acronyms and terminology floating around, and it's certainly bewildering to a programmer just getting into Java. I suggest to those just getting involved to check something like Matt Raible's AppFuse, which collects together some popular open source frameworks and tools and bundles them together as one JAR, along with some sample applications to work through. It's a nice intro to some of the concepts of J2EE and the tools that can make coding in Java significantly easier and more robust (Spring, Hibernate, Velocity, etc.).

    I'm gonna stay out of the whole strong vs. loosely typed argument, except to say that there are several issues at play here, including semantics. The issue gets muddied when people confuse typing with binding and/or coupling. I really don't have a strong preference either way, except that as someone who routinely manages 10-20 developers working on a project, strong typing can be an advantage in keeping things in line and organized. In the so called "enterprise" world, I know there is some concern regarding the security implications of loosely typed languages, but I'm not fluent enough in that argument to really discuss it with any sort of depth.

  21. #21
    First of all I don't know why your pushing IDE's on me. Have I spent any time talking about java being hard to use for the beginner? And by the way, I'm not a java beginner. But if you want to talk bout beginners, ok, sure,

    The problem is not that java is hard to use and hard to learn. For the kind of stuff php does, the learning curve for jsp or the servlet api is comparable. The problem is it's hard to set up in a web hosting environment, (and here's the important part: ) and Sun apparently doesn't care, has spent no energy whatsoever in the past 5 years doing anything about the problem, except tangentially, indirectly, accidentally.

    The reason Java is "hard to get a handle on" isn't because there's so many acronyms and "so much going on", nor the "complexity that comes with it's power". My whole point in two sentences: The reason you don't see a lot of beginners using java isn't that java is too hard to use nor that it's "too powerful" for what they need. The reason is that java is unavailable.

  22. #22
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082
    Compared to PHP, Java is hard to use, though. Merely by forcing everything to be OO, it introduces an entire other layer to the learning curve. Instead of starting out by dropping a couple functions into your HTML here and there, you need to basically go from nothing to using full OO -- that's a steep curve. This is without a doubt a good thing for computer science people, and those that have a background in programming, but for amateurs it'll just turn them off the language. Even if Java were easy to set up and administer, I don't think we'd see any large-scale migration from PHP for low-end and amateur web development. It would definitely be nice for people trying to learn things though, to be able to 'graduate' to Java at some point, without shelling out the bucks for a VPS and learning how to administer a box (and go through the pain of trying to get an app server running properly).

    Combined, these two issues are what's holding Java back among the majority of small-scale web projects. If we're going to venture into the enterprise market, Java has a strong foothold, if not a leading position at the moment. There are clearly lots of jobs, a large available class library, and lots of further development in the works. .NET has it's place too, thanks largely to C#'s superiourity and Microsoft's viral marketing. I just don't think there's the same third-party codebase out there, and it's certainly the new kid on the block compared to Java. Python and Ruby are getting lots of press, and at least Python developers are actually in pretty high demand. Yahoo and Google are both using Python pretty heavily, and I think it'll be gaining on the others due to developer loyalty and the ease with which it's used. Ruby -- well, Rails is just amazing, but I'm still not totally sure how it'll fare in an enterprise setting, I haven't really seen any large-scale uses of it yet. It's a very promising framework though, and I wouldn't be surprised to see it gain market quickly. PHP -- well, it's PHP, it'll hold onto it's share for a long time to come, and probably gain some on Java once PHP5 is embraced by more people.

    Anyway, in short, I don't see anywhere for Java to go but down. And I don't mean that there'll be less Java code or less Java jobs (surely there will be more, the market is exploding again), but that their share of the market is only going to shrink. There are many technologies breaching the market right now that are clearly superiour, and given time to build a good free code repository comparable to Java's, I think one of them will probably emerge as the premier web technology in the next 5 years or so. Five years is a long time, an eternity in this business. Think; five years ago yesterday PHP4 was first released. Prior to that, PHP3 didn't have a significant marketshare of Perl/CGI. Look at the marketplace now; Perl/CGI is almost nonexistant and PHP4 has a large portion of it.

    Something will unseat Java; it was the first real viable solution of it's kind, and it has it's problems. There are better solutions that are viable today, and I don't think the industry will be blind to that.

  23. #23
    For strong typing you could choose a language of your choice and use CGI.

  24. #24
    Can java run as a cgi?

    Anyway, cgi is like insanely slow and non-scalable. But thanks anyway for the idea, I'm desperate.

  25. #25
    Well, it's not insanely slow, those are just rumors mainly. I know you've heard a lot of rumors about CGI.. but the sad thing is I've seen a lot of test that show php is slow vs cgi.

    Perl and PHP versions of CGI are a bit slower possibly, in comparison to the MOD_ versions...yes. CGI calls the interpreter and puts it into a process every time. But: A compiled Pascal or C or C++ application is extremely fast.

    There are benchmarks which may show CGI as slightly slower, but many that show it's fast too.

    For languages like Pascal and C++, cgi shows to be faster than PHP. Php has to call on about 12MB of libraries sometimes on each simple web request.. a cgi application might only be 300KB)

    Also, Ebay still uses CGI and look how huge they are...They seem to also use other things too along with CGI.

    For a strongly typed language, use Pascal or any language you can compile for CGI ;-) It's really flexible.. maybe not for Java, I'm not sure.. haven't looked into that.

    Well, it depends what you have had experience with. If you only know Java for your strongly typed language you wish to use, then maybe CGI wouldn't work.

    But the rumors you have heard about cgi being slow is just that, rumors. >mainly Perl cgi applications are slow because they put the entire Perl interpreter in the memory as a process, but then again I've seen benchmarks showing Perl cgi is fast to for larger applications.
    That's because to some extent a separate process can have advantages. But php is forked really the same way a CGI application is.. it's not as if one php interpreter instance handles 200 users at once.

    For scale-ability... I'm not sure.. what I'm experiencing right now is that my CGI applications in Pascal are scalable.. because every time I use PHP on a different server, someone always has different php.ini settings, you know? Magic quotes, and all sorts of other things.. that I really don't have control over some times.Whereas my CGI app works on any server that has CGI access, and I control my OWN ini files based on when I want to call them! Plus you can do remote CGI calls from different servers and many more things.

    I like a strongly typed language myself.. it's really a matter of taste. I see advantages of dynamic and static and strongly typed languages, and I see disadvantages too. I prefer though, as a matter of taste, a strongly typed language which is readable, elegant, clear, precise.

    There is also something called fastCGI, but I haven't even had time to look into that, because my plain CGI applications are fast enough.

  26. #26
    Here's one benchmark, but I'm looking for more.

    wrensoft.com/zoom/benchmarks.html#large1

  27. #27
    Join Date
    Dec 2002
    Location
    NY, NY
    Posts
    3,975
    Java hosting is all over, you just have to look for it.

    I have been with http://www.kgbinternet.com for a while now, and I must say, they are definetely worth it. [Note: not affiliated with them in any way, just a customer.]

  28. #28
    No, PHP hosting is "all over". Java you "have to look for it".

    Thanks for the recommendation.

  29. #29
    great debate here guys - very relevent!
    (it does boggle that java writes web scripters as a non-target)

  30. #30
    Join Date
    May 2005
    Location
    Roanoke, VA
    Posts
    36
    My problem with Java as compared to other web-development platforms is that its development cycles tend to be unbearably slow. One can generally run through three or four full cycles in a Ruby or Python project (and probably two or three in PHP) in the time it takes to do one iteration in Java.
    You cooin' with my bird?

  31. #31
    Join Date
    May 2005
    Location
    Chicago
    Posts
    31
    you are comparing apples to oranges here. I dont think java serlets were made for public web sites anyway. I have seen some very robust java apps and i know many huge compaines that rely on these but still do all there websites in asp or php.
    VPS Specialists. Dedicated. Colocation

  32. #32
    With few exceptions this thread demonstrates ones again the complete ignorance and technical incompetence of many participants on this forum. I feel really bad for your clients and customers.

    Now, about excessive coding in Java - as of few years, we (in Java space) prefer to generate code not to write it. Why, because we are mainly people with more than 10 years of programming experience and we are tired to write it. I repeat again, I will take your list of product descriptions and with XML file and one keystroke I will generate data base with all tables, code and after compilation - my application is ready. Try to do it in PHP.

    About popularity - check dice.com. I tried, PHP keyword get 500+ entries, Java - 11000+. Just to put it in prospective.

    Peter Kinev.
    Open Solution, Inc
    http://opensolution-us.com

  33. #33
    I will take your list of product descriptions and with XML file and one keystroke I will generate data base with all tables, code and after compilation
    what if the site reqs dont fit in to your magic xml template? and i certianly wouldnt want to hire someone whos motto is "we are tired". not to mention the fact that you missed the whole point of the argument :roll:

  34. #34
    Join Date
    May 2005
    Location
    Roanoke, VA
    Posts
    36
    Originally posted by pnorilsk
    I repeat again, I will take your list of product descriptions and with XML file and one keystroke I will generate data base with all tables, code and after compilation - my application is ready.
    Then why are there still programmers? If all you have to do is press a button and a magical Enterprise Java Application is completely and fully formed with no other interaction, there's no need for you; the manager can fire you, press the magic button himself, and take the profits as a bonus.
    You cooin' with my bird?

  35. #35
    Join Date
    Oct 2004
    Posts
    89
    Religion is for children. Unless you make your language choices on rational grounds, taking into account a sufficient amount of variables, it's useless to try to have a rational discussion about the alternatives.

    Myself, I've found that it's best to prototype large applications with weakly typed scripting languages such as Ruby, Python or PHP and actually implement them in strongly typed general purpose languages, such as Java.

    Currently, it's not responsible to recommend PHP or Python development in environments which require Oracle and LDAP integration, as the integration libraries provided are of extremely poor quality.

  36. #36
    Java and PHP are very different beasts.

    Java ( and C# (asp) ) provides you with a strongly typed language with a ton of libraries to allow you to achieve just about anything no matter how complex or fast the application.

    PHP is useful for fast development of websites that aren't too complex - but it does that very very well.

    The downside with Java is that you have to know exactly what you're doing and need years of experience to be able to do it as fast as php.

    The downside with PHP is you might find that your website is written as well as it could be in PHP but it still doesn't do everything you want to.

    Java is inherently faster if you know Exactly what you're doing. However, there are far more people in this world that think they know what they're doing than ones that actually do - hence its reputation for being slow - you can also screw up far more spectacurly if you get it wrong (i.e take the server down).

  37. #37
    Join Date
    Mar 2004
    Location
    New Zealand
    Posts
    533
    Originally posted by daveisme

    PHP is useful for fast development of websites that aren't too complex
    ...
    The downside with PHP is you might find that your website is written as well as it could be in PHP but it still doesn't do everything you want to.
    FUD, complete and utter FUD. Tell me one thing that you could write for the end user to use in Java that you could not do in PHP.

    I've never heard such a silly statement.

  38. #38
    One possible problem with PHP is you can't reuse all your existing code that you use for offline development. Unless of course you do develop offline applications in PHP (I heard there are some php compilers/bindings out there)

    The idea for me is: offline apps sometimes turn into online apps. I don't want to use PHP online, and then some other language for offline. I don't beleive in learning English, Japanese, German, French, and juggling them. I don't want to use Python on FreeBSD and then Perl on Linux. I want to use one language everywhere, if the language can handle it. Otherwise you just waste the time porting languageA code to languageB code, when you could have been doing something productive.

    So if there are php compilers or php offline software development methods, good.. then it's just a matter of language preference and taste.

  39. #39
    Join Date
    Mar 2004
    Location
    New Zealand
    Posts
    533
    Unless of course you do develop offline applications in PHP (I heard there are some php compilers/bindings out there)
    You can, there are bindings for popular gui toolkits, and of course you can write command line apps just fine. It's not the right tool for the job. But you can if you want to. I would say that Python is a better choice there though. RIGHT TOOL FOR THE RIGHT JOB, you don't take a hammer and try to use it as a screwdriver.

    This isn't the statement that "daveisme" made though, he said

    The downside with PHP is you might find that your website is written as well as it could be in PHP but it still doesn't do everything you want to.
    which is nothing to do with offline applications.

  40. #40
    Originally posted by gogocode


    This isn't the statement that "daveisme" made though, he said
    which is nothing to do with offline applications.
    I had to think for a bit to remember where I'd hit a brick wall with PHP

    ) I wanted a very large grid of data displayed in a webpage with an expandable outline and with sorting and dynamic filters.
    ) I wanted to build a very rich functionality on-line webpage editor for a community website.
    ) I found my php website which started out as just a few pages soon had a ton of pages and I needed to design it without it taking me a few weeks.
    ) I could not guarantee there were no bugs/breaks in the website.
    ) I wanted to create an Excel Spreadsheet on the fly for downloading.
    ) I wanted to create an online game but couldn't find a way to do 3d graphics.
    ) I wanted to track visitors paths through the site by storing the path in memory instead of waiting for a write to the damn database.
    ) I'm fed up waiting for the damn database to be accessed - why not just keep everything useful in memory.
    ) I wanted to do step through some code in a debugger that I didn't have to buy.
    ) I wanted to carry out Test Driven Development, but couldn't find any good php test frameworks.


    I do believe that PHP is definitely the best and fastest solution for your average website. However it has limitations. I bet some expert PHP programmers do know good solutions to some of the above, but I doubt they're half as easy to do or well known as the alternatives in Java and ASP (c#.net).

    I could go on forever, but most people will say you don't need that stuff in your average website, but I don't do 'average' websites.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •