1. Advertising
    y u no do it?

    Advertising (learn more)

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

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

JAVA vs PHP

Discussion in 'Programming' started by Basoone, Dec 8, 2005.

  1. #1
    Which is better in web programming???
     
    Basoone, Dec 8, 2005 IP
  2. Nokia999

    Nokia999 Guest

    Messages:
    1,488
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Java works on desktop applications as well while php works on web only.And today php is used on web mostly.I think there is no comparison between different family of languages.
     
    Nokia999, Dec 8, 2005 IP
  3. alexn

    alexn Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You should use PHP. All lot of peoble disabled Java in the webbrowser, because it is safer without Java (and also JavaScript and ActiveX).
     
    alexn, Dec 8, 2005 IP
  4. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #4
    php is basically java that runs on the server. well kinda. you can't compare the two because they serve completely different purposes.
     
    mdvaldosta, Dec 8, 2005 IP
  5. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #5
    PHP can be used for desktop application coding, using various tools, but from what I hear it's rather on the slow side :(

    no matter which is better I'd go for php, it has more support :)
     
    relixx, Dec 8, 2005 IP
  6. tbarr60

    tbarr60 Notable Member

    Messages:
    3,455
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    210
    #6
    If you want to sit in an enterprise cubicle, draw six figure salary, and take a long time to create very little go with Java.

    If you want to work on your own stuff and use free apps someone else coded use PHP.

    If you want to be productive and use free applications, learn ColdFusion (productive) and get familiar with PHP (free stuff that can be tweaked to taste).
     
    tbarr60, Dec 8, 2005 IP
  7. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I won't argue with this analysis. Though I haven't noticed an extra few digits on my salary just from learning java. (Hint, hint, boss)

    Actually, from what I'm seeing just now, from that perspective, learn ASP. It's not like it takes much effort.

    relixx:
    But why would anyone bother? Unless you're too lazy to learn the (better) alternatives. For desktop application coding.

    IMO, PHP is great for doing simple web apps. Most desktop apps? I recommend python. I'd love to have a good argument if anyone has a worthwhile alternative perspective.

    I'm quoting this for completeness. ColdFusion might very well be the dream language I've been seeking all these years. Personally, I've always thought it was an ugly hack that just wasn't worth learning. Unless someone's willing to pay me about twice what I'd charge for coding perl. And even I have to admit (at least to other developers) that I'd jack the price sky-high for that. (Icck).

    Actually, most of the advice in this thread is crap. I'm sorry to say.

    Nokia999 got closest with this:
    Except PHP and Java aren't really in a different family. They're kissing cousins. (OK, as I read tonight in a different thread here, PHP's like the bastard child of a big orgy of other languages).

    Use PHP for basic stuff that's not quite brainless. Java's a sort of half-way language. Script-kiddies probably aren't smart enough to figure it out. You really don't spend much time thinking about what you're doing while you're writing Java code--after you figure out the language, it's mostly autopilot stuff. Plus, Java has a *huge* set of libraries out there to take care of almost any problem one can imagine. Sort of like perl, only less ugly.

    If you feel the urge to go beyond that basic criteria, it's time to learn something beyond java/php. (You know them both, right? If not, turn around and spend some time learning the other). I'd offer my opinions, but those and, crap--it's that expensive?!--a couple of dollars will buy you a cup of coffee. If you know java and php, you are starting to get a clue about which direction to go next.

    Pick your direction. If you know both languages, you have a feel for which direction you want to head. That's your next language to learn. Eventually, you'll come back (if you really want to learn about programming) and learn the next language in the other direction.

    Either way's cool. They'll both expand your mind, in different dimensions. Both are good ways to expand your way of thinking.

    Crap. I'm starting to sound like some sort of pot-head. Expand your mind, man. Hey, don't bogart that joint. Heh heh.

    The point is, it's all about you. There is no right or wrong answer. Java vs. PHP is apples and oranges. Actually, this whole topic was probably troll bait. I feel the sinker in the hook even as I type...

    But I'll answer anyway. (Mainly because I'd feel stupid just deleting this and admitting I fed the troll).

    Java's great for a certain set of problems. PHP's a great answer for a certain other set of problems. Which set of problems do you face?

    In a whole lot of ways, that question is the whole point. Tell me about your problems; I'll tell you the way to fix them.

    I run into *so* many people who hand me crap like "I want something written in MS Access that uses this table structure." Well fuck you!

    You want an application written? Great. Tell me what it's supposed to do. We can hash this out over bar-b-q. Or whatever.

    I'll figure out the database backend, based on load requirements. I'll decide about the database schema, normalization, and crap like that. That's the reason you're hiring me!

    (Everyone please cover their ears).

    AAAAAAAAAAAARRRRRRRRRRRGGGGGGGGGGGHHHHHHHHHHH!!!!!!!!!!!!!

    (It's safe to remove your ear protection now).

    I'm interested in feedback from others. Personally, on a job like this, I at least triple charge. How do the rest of you handle this situation?

    Regards,
    James
     
    jimrthy, Dec 8, 2005 IP
  8. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Java and PHP may be apples and oranges, but JSP and PHP is certainly apples and apples. My general idea of each: PHP for quick and dirty jobs, and Java (JSP) for large and complex jobs. JSP may have a steeper learning curve (you have to learn a large chunk of the language before you can do anything useful) but in the end it is a more powerful tool. If this is a kind of hobby at the moment then PHP might be a good start. If you're aiming for a job in big business then JSP is probably the best route.

    Though jimrthy probably had the best recommendation of learning both.
     
    FeelLikeANut, Dec 8, 2005 IP
  9. torunforever

    torunforever Peon

    Messages:
    414
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #9
    jimrthy, you're probably right the OP is troll bait, but I'll post my two cents anyway.

    First of all, to clarify something to alexn and mdvaldosta, who think that Java is only an applet technology. Just like PHP, you can use Java server side. In fact, that's where Java has found its calling. Not in applets.

    Usually someone who's going to use Java will have their own servers, and will be using it to create a multi-tiered web application. This is vastly different from the typical PHP user, who may just want a few scripts at their site to do things like feedback forms, message boards, etc.
     
    torunforever, Dec 8, 2005 IP
  10. Lpspider

    Lpspider Well-Known Member

    Messages:
    2,216
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    160
    #10
    From what I understand, Java is used more for bigger, number crunching things. Things that need a lot of firepower, whereas php can be used for a wider varity of things, espeically on the web.
     
    Lpspider, Dec 8, 2005 IP
  11. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I'm not sure I can agree with either of those statements. Number crunching? I'd say Java is used more for the organization, structure, and safety that the language provides. PHP for wider variety? Probably not. Java is certainly a more general purpose language than PHP and can do far more. All that PHP might provide is a shorthand way of doing the most Web typical jobs.
     
    FeelLikeANut, Dec 8, 2005 IP
  12. Basoone

    Basoone Peon

    Messages:
    544
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Tnx that really helps!!!!
     
    Basoone, Dec 9, 2005 IP
  13. Slayer6

    Slayer6 Peon

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    if you are paying for it yourself..use php. If you are billing someone else, suggest java
     
    Slayer6, Dec 9, 2005 IP
  14. flash_f

    flash_f Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You should use PHP. All lot of peoble disabled Java in the webbrowser
     
    flash_f, Dec 9, 2005 IP
  15. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I stand corrected :) I've never had a chance to do more than glance at JSP, and that was at least a couple of years ago.

    I don't know whether JSP is "the" choice for large complex jobs. (Really. I'm not arguing; I don't know). But I agree that PHP is not. I can't think of a single large-scale, complicated project in PHP that I consider successful. (I'm sure they exist. I just can't think of any off the top of my head).

    That's not a slam on PHP. I don't think it was intended for large-scale complicated projects. I think they're definitely heading more that direction with PHP 5. Honestly, I'm a little sad about this. I like PHP as a quick, simple, glue language.

    Or ASP. The kind of money the make is disgusting. Esp. with asp.net 2.0. I've said this before in other posts, but I feel so strongly about it that I don't mind repeating myself. I think this may be the most interesting/exciting/innovative thing microsoft has done in ages. And, looking at it now, it seems so obvious.

    Heh, thanks.
     
    jimrthy, Dec 9, 2005 IP
  16. torunforever

    torunforever Peon

    Messages:
    414
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I can imagine you didn't read my previous post, or you're just trying to troll.

    Java on the server side has nothing to do with Java on the client side. When it's server side, it doesn't matter if Java is disabled in the user's browser.

    I don't know either. Right now I'd say it's a toss up between Java and .NET.

    I wanted to mention that server side Java technology as a whole is called J2EE. You can get an idea of its intended use at Sun's J2EE FAQ, http://java.sun.com/j2ee/faq.html

    If you read through that FAQ, you'll realize it's nothing a typical webmaster needs to do. Granted, Java doesn't need to be only in complex situations. JSPs can be written as simple as you want, but even so, if that's what you're going for, you might as well stick with PHP.

    PHP is sufficient for most publicly available web sites, and has some powerful features also.
     
    torunforever, Dec 9, 2005 IP
  17. anton-io!

    anton-io! Active Member

    Messages:
    540
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #17
    web programming + publishing online + database interaction + great online support + numerous built in functions = PHP

    Security + OOP + structure = Java

    Unless you're building pogo chess games with Java, PHP should be nice and simple for web programming.
     
    anton-io!, Dec 10, 2005 IP
  18. cornelius

    cornelius Peon

    Messages:
    206
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #18
    By java i take it u refer to JSP part of Java.

    Yes PHP is easier to learn and nice for quick jobs

    but from personal experience programming PHP is like building a hut, programming in Java is like building a skyscraper

    i myself reached a limit with PHP, PHP Object Oriented support SUCKS
    i had to program a 30000line script in PHP (Which btw is making me a nice bit of cash) and i tell you it was a nightmare

    Definately go with Java if you have your own servers (like myself) and you want to make some serious money

    Lets just say if i knew my bank used PHP i will be quick at switching banks
     
    cornelius, Dec 10, 2005 IP
  19. gregadamson

    gregadamson Greenhorn

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #19
    The choice between .NET vs Java comes down to what your project requires. .NET is perfect for high-performance, Windows-based solutions with easy cloud integration, while Java offers versatility across multiple platforms. Both provide powerful frameworks for creating reliable, secure, and scalable software that meets modern business demands.
     
    gregadamson, Nov 7, 2024 IP