Java Is So 90s
An anonymous reader writes "Some of you may recall last year's Java vs. LAMP Slashdot
flamewar. The fight has now "brewed" (couldn't resist) into the mainstream press at
BusinessWeek." From the article: "Yared says developers far and wide are creating a new generation of Internet-based applications with LAMP and related technologies rather than with Java. Can it possibly be that Java -- once the hippest of hip software -- has become a legacy technology, as old and out of style as IBM's (IBM) mainframe computers and SAP's corporate applications? Mounting evidence points to yes. Reports by Evans Data Corp., which does annual surveys of the activities of software developers, show Java use is slipping as LAMP and Microsoft's .NET technology gain traction."
When I think of the 90s, I think of my days designing in RIPterm and uploading and downloading warez while chatting with Bimodem while trying to figure out the best initialization string to take advantage of the V.42 modem I used.
I definitely do not think of Java as a 90s scripting/programming language -- although I do get very frustrated when Java apps don't run properly on my PDA. I do think that Java is an outdated language that always seemed unfriendly to users and caused a lot of extra cost/headache to my customers when every software company we supported seemed to attempt to create a Java app to access their software engines.
I think Java has (had?) some features that made it easier to program in, especially for not-so-wise programmers. The automatic garbage collection allowed my guys to make quick fixes without worrying about memory management (I am being sarcastic here, I had some real dumb asses subcontracting some of my work). The speed of Java was great too (still sarcastic), and the consistency of the output code was always a positive (yes, still sarcastic).
I guess my big concern with LAMP is what the hell is the P? PHP? Python? Perl? They're all very powerful and they all have their own positives and negatives in regards to quick scripting solutions, but all of them still allow bad programs to churn our badly written programs. I'm guessing that is the trade-off: the more complex programs you can write, the more likely you are to see badly written programs.
It is very hard not to be sarcastic when talking about Java. Every CEO of every company I consulted with loved to spew the big tech words, and Java haunted me for years. I'm glad I don't hear it anymore -- should I thank the dotbomb for that?
In the long run, I think the 90s client-server systems will come back into use. Software companies have every reason to move back to controlling their applications and charging for use rather than licensing the code out to end users. I seriously believe the push for faster cable modems and DSL to the home is through the software developers (and music and video publishers) in order to just stream everything rather than offer the user the ability of unlimited copying. Once you have 2MB WiFi nation wide, there is no need to ever store your programs or your media anymore, right?
The second sentence from the original article posted on /. Started as: "Not to start another PHP vs. Java flame war..."
And now begins the second flame war started by said article.
Gentlemen and nerds, prepare your flamethrowers and ectopacks (respectively)...
Begin!
When will I see a constructive article comparing and contrasting the two and inviting a civil conversation and an acknowledgement that there are fans on both sides?
Come on, it's not like this is a religious argument or (possibly worse) a Star Wars vrs. Star Trek argument.
My work here is dung.
Basic is reported as "So 80s".
Fat, drunk, and stupid is no way to go through life, son.
I thought no one would notice my coffee has gone cold!!!
...they mean Linux Apache Middleware PostgreSQL.
And when they say middleware, they mean Ruby!
The Army reading list
Here's my take. For most web sites, use PHP. If you need enterprise level stuff, use Java but don't let anyone tell you that PHP is not scalable, that is simply not true. Don't go to .NET - nothing you can really get on .NET then you can't get with Java. Enough said. Flame On.
Bradley Holt
Problem is that Java programmers have been bought up by big companies deploying enterprise applications and they really haven't been contributing to open source projects. With all the PHP projects out there that you can just download and deploy and tinker with it is no wonder why php is all over the web now. Java should be easier to deploy as .wars and just as easy to tinker with. But it just seems like every open source J2ee app out there dies on the vine, probably because the java developers got real jobs or else they decided they could sell their software as an "enterprise" product.
From the article summary:
Can it possibly be that Java -- once the hippest of hip software -- has become a legacy technology, as old and out of style as IBM's (IBM) mainframe computers and SAP's corporate applications?
I work for a company that uses IBM mainframes and SAP. I guess that means I should start brushing up on my Java so I'll be ready for its adoption here in about 5 years...
Oh, please.
Java is still in incredibly heavy use in larger-scale systems and internal applications. It doesn't need to be "hip", "trendy", or "LAMP". It just needs to do a job, do it well, and be maintainable. It does that (and more), has still proven fairly easy to scale from small projects to very large, and is still a decent (though not terrific) language.
It also plays well with many other solutions, by virtue of numerous scripting languages which target Java bytecodes, as well as native code integration if you simply cannot get by without some piece of C code (although, there goes easy portability - one of the major benefits).
These articles are just a joke. That they would even use the term "hip" shows that this is far from a serious study.
It's a strange world -- let's keep it that way
Can someone explain to me how .NET is so fundamentally different from Java that it could escape Java's fate?
.NET (C# really) just a Java rip-off?
.NET more attractive?
Isn't
I mean really, not long after MS dropped Java, C# "popped up"
It's clear that C# is only a repackaging of Java, why should its fate be any different?
What makes
I don't know the meaning of the word 'don't' - J
LAMP? This is even worse than AJAX as far as stupid new names go. I guess that "Web-based application" doesn't sound cool anymore, nor does "dynamic web page." I suppose it doesn't matter, really. Marketing writes the press releases and we call it whatever we hear the most of, eventually.
I will shut up and get back to coding this app in PHP, now.
Meanwhile, somewhere in Denmark, a graduate student is thinking "...I like Java, but not Sun's dictatorial stance on it... I think I'll come up with my own and call it Lava... (Pronounced "LooVa")
A feeling of having made the same mistake before: Deja Foobar
J2EE is a subset of Java, not the whole thing. Any conclusions drawn about J2EE's problems are not problems which spread to J2SE or J2ME. I work in J2SE every day, I think J2EE is overly complex with very little payoff, so I use other solutions where it would be.
J2EE is dying, long live Java
Here's a tip. Programming languages and platforms aren't sexy. They are tools. Use .NET if that's the tool that best fits what you need to do, or what your employer requires. Or use Java. Or use COBOL, if that's what fits. Under no circumstances should one use the above standard, which is about on the same level as some twelve year old girl deciding whose pictures are going to adorn her wall.
The world's burning. Moped Jesus spotted on I50. Details at 11.
The fight has now "brewed" (couldn't resist) into the mainstream press at BusinessWeek.
The author means "percolated," right? "Brewed into the mainstream press" makes absolutely no sense.
Perl significantly so, as it is from 1987 compared to Pyhton from 1990 and Java from 1991. Perl was probably the first significant "web application" programming language, so hearing it mentioned as a new breed of languages is kind of weird.
Perl was always a programmers tool, and never had the mainstream hype that surrounded Java from the start, so I kind understand why a journalist could get it mixed up.
I have to agree. Whenever I used to propose that C may be the best solution for a programming task, I would hear "But isn't C out of date?" from a host of "Hooray for Java and XML!" types. When I explained that different languages have different strengths and weaknesses they didn't seem to get it. They were all convinced some new "bleeding edge" technology would come along and solve every problem. It was like watching them eat soup with a fork, trying to explain a spoon to them, and getting the reply "Sure, THIS fork is bad, but wait for the NEXT fork! It will work just fine for soup!"
Wow, that was the most disjointed thing I have posted yet! I was about to delete it, but it is so confusing, I just can't. Enjoy.
Boys from the City. Not yet caught by the Whirlwind of Progress. Feed soda pop to the thirsty pigs.
not by a long shot.
My clients are very large financial instituions and I don't know one of them who is reducing mainframe capacity. In fact, almost all of them are increasing capacity.
Most managers find it troubling that their mainframe-centric data centers continue to be well managed, predictable facilities while their Open Systems (UNIX, Wintel, Linux) data centers are a mess. Horribly erratic power and space consumption and many other woes that make management and planning a nightmare. Blade servers have not solved these problems - in fact, they have intensified them (powering and cooling 1000+ W/sq' is much more difficult than 50-100 W/sq').
While style is subjective, age is not. There's nothing old about the new systems IBM recently announced. Also, if being in style leads to huge cost overruns or getting fired, many of might choose to be a little less stylish.
Quick! JAVA is the new BSD!
What worries me is that I teach at a community college. One of my colleagues subscribes to Business Week and takes them quite seriously. I'd rather not have to get into a curriculum battle over this. Business week just needs to STFU about technology in industry, because people who have limited contact with it (either by not interacting with the technology or not interacting with industry) will often take their ill-informed articles as Truth. (Incidentally, I left industry 4 years ago and am close friends with others still in various sectors. Even after only 4 years, I'm very suspicious of my own first thoughts on the way industry is going, and I always get first-hand input.
I bought Learn Java in 21 Days in like 1996 and I STILL can't program in Java. How do I get my money back?
This
wait... so the more jobs that are out there prove how much better Java is? it's corporate executive morons that made the decision to buy some Java app in the first place that cause these job openings to be there.
"No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
Yes they are, coding in Ruby or Python is actually geniuinely fun and rewarding. Not having the language go in the way and prevent you from thinking about the program (the forest) because you have to think about the code (the tree) is like discovering programmation over again. Being 5 times more productive with a third of the code lines without losing any clarity or expressiveness (quite the opposite in fact) is refreshing.
There is no reason for programming language to not be sexy but the ones you accept when you use crappy languages.
I perfectly agree with the "Use the right tool for the right job", you can't use high level interpreted language when performances and memory footpring are issues, but you won't use Java either anyway...
"The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
I'm a Python guy, and I think the advantages of Python, Ruby, and (do people still program in?) Perl, and (cough) PHP, are clear.
That said: I envy the Java guys their component research.
If you want to do anything really cool with components, you pretty much have to use Java. It's not because it's a better language. (It's not.) It's not because it's elegant. (It's not.) It's just because Java is where the people are. That's where just about all the component people are.
Java is hideous, Java is complicated, Java is large, Java is unwieldly, and there's nothing more unpleasant than waiting for a Java app to load. Than waiting for Eclipse to load. (shudder.) But you can't beat their components research.
Just about every single component project I know of, is just copying technique from the Java people. And usually far behind.
(off-mic:) Isn't Perl a fable, these days?
So, what do you want to do today; be correct or be productive?
"Can there be a Klein bottle that is an efficient and effective beer pitcher?"
Pick a language based on what is "hip". Actually, any technology - it doesn't have to just be a language.
(Digression: "hip"? Who says "hip" any more? It's so 1960s...)
Languages always have their places. It's important to see what's happening to Java. There was a point when every job description had Java in it. Java java java. Java was used for everything. Web applets. Full fledged GUI programs. Command line. Server side. I think people are finally realizing Java isn't good for everything. I think we are finally reaching an age which Java is finding it's place. It's meant for full fledged, cross platform, programs. GUI or command line. Programs that are meant to be kept open and running for awhile. This is where Java excels.
Java has had a terrible history. It's a lot of people's faults. PHB's, HR depts, Marketing, Bad programmers, Sun, companies releasing Java tools. I think most people on slashdot have a pretty strong opinion of Java. Love it or hate it, they have a strong opinion. The initial GUI implementation was awful. People were expeted by PHB's and Marketing to learn the new buzzword language in weeks, when in reality Java is the type of language you need to spend years studying. It's huge and complex. Just like C++. Java came into wide spread usage in the 90's, when computers were still a bit slow for it. It isn't until now that Java is really finding it's place. It's not as grand as the original plan for it was. If you talk to people, most of them have stale opinions of Java. Their view of Java is Java 8 years ago. And little will change their opinion.
If an officer ever threatens to taze you, say you have a pacemaker.
.NET is Microsoft's next attempt to gain control since the failure of passport.
.NET that makes PHP, Python, and Ruby so important. (notice I didn't list Perl...) .NET's biggest boon is it is easy to create with. (I've easliy trimed 80% of my development time switching from C/C++ to PHP to Python) I don't hate what .NET is. I think it's great. I just hate some of the motives behind it.
.NET, but it's got a lot of problems compared to LAMP and .NET also. Ease of the development cycle is a major issue comparatively.
It's
As for Java. It's not legacy yet. Sun attempting Microsoft type moves caused most of it's problems. Just like Solaris now. If they would have opened it up sooner, it wouldn't be quite so deep in the hole it's in now to other technologies. Java has a lot going for it that arn't strong points for LAMP and
Requiring a complier can be a feature in applications that are anything but simple. If you have a syntax error in an interpreted language, and that syntax error is in a branch that does not get executed frequently, you won't know about that error until later, much later, probably early on a Sunday morning. On the other hand, a compiled language will flag the error at compile time.
Interpreted languages are good for quick development, less complicated projects where run-time errors don't cost lots of dollars.
.Net may not be ideal but to say that it is dying away is simply wrong. My impression is that for not so mission/performance critical enterprise (yes enterprise) apps that Microsoft/.Net has been dominant. I think that among the more hardcore they are gaining a bit of ground (thanks in part to c#). Reuters now offers .net api in addition to there C api and just look at the number of .net components!
I think it is Java that never really lived up to the hype.
I feel java is one of the more flexible languages that i've worked in.
Swing components are plenty flexible. It's not hard to add checkboxes to trees, have spanning columns in tables etc...
Where do you feel java lacks flexibility?
The only thing i feel is that it's not ideal for quick and dirty tasks. I write little perl scripts all the time to accomplish one of tasks that would take 5x the time in java. But for real software development that's more or less a non-issue.
If you want to be able to code in the large sense, not specifically for the web, I'd advertise Python. Or Ruby. Both languages are really good to build offline applications, and just as good for online apps (websites or webapps). Clean, powerful, OO-based yet multiparadigm (the languages are OO, but you don't HAVE to use OO).
If all you want is build a quick website, PHP is the easiest but the ugliest.
Perl gives mixed feelings, the syntax is strange, the code (as in PHP) extremely easily turns into a gooey sticky mess (Perl is often described as a Write Only language), the OO is a hack, but Perl is unrivaled for a few hundred lines of heavy string manipulation. Beyond that, it's a pain to keep it readable.
"The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler
For the price, those "Learn something in (X)days" books suck. They are sort of like cheezy exercise equipment sold on late night infomercials -- they seem like a good idea, but in the end they lack the substance and you lack the will power to put up with the tedium and they end up as a clothes rack.
It takes a lot of practice to be a proficient programmer. Get a copy of Just Java 2 by Peter Van Der Linden. It's probably the best Java book out there and a fun read at that.
Read the book, put in the time and then get a job as a Java programmer.
$35 book + time = $70K per year.
You'll have your money back in no time.
I think being hip and trendy hurt Java more than it helped. People tried to use java where it wasn't appropiate. Java applets for web buttons that could be done in CSS really hurt it a lot (I can't even tell you how many websites were doing that at one point). The Java buzz is cooling off finally. It's finding its place. Java is nestled in the ranks of C and C++. You'd probably use Java in the same places you might consider C or C++. That doesn't mean Java is going away. It means people are getting their acts together and seeing Java for what it is. Not as a way to make cute navigation buttons. But as a way to make serious applications such as Sphinx4.
If an officer ever threatens to taze you, say you have a pacemaker.
Two points:
.NET, then great. I don't know the .NET ecosystem, so I don't know if there are any non-ms vendors pushing .NET based technologies.
.NET initiatives are growing and not shrinking as grandparent assumed. But, there is a natural evolution of Microsoft products that one must also pay attention to. Much of the developer attention to Microsoft technologies would have been there with visual studio 7 even if .NET didn't exist.
.NET developer. See? They haven't made Web developer mean ASP.NET, they haven't made Application programmer mean C# develoeper, etc.. As things stand, they can only hope to maintain their current business's migration cycle without too much bleeding. This may change with radical shifts in their business model, but as of today, MS can't expect .NET technologies to dominate the developer market.
1. Having Microsoft release more software that supports their platform doesn't make the platform's industry support any better intrinsicly. So unless you can say companys x, y, and z are all moving strongly behind
2. Just because I disagree with your argument, I do agree that Microsoft based
I think the 'more' interesting finding is that Microsoft has been unable to seriously penetrate these Java / Web markets as much as they'd have liked. All they've done is create a third fraction of the modern development market. Most coders these days fall into three buckets: Java developer, Web developer,
Bye!
After C/C++, Java ended a long nightmare of preprocessor abuse, ridiculous "APIs" (collections of warring header files with no-vowels function names that were never the same from computer to computer), especially GUI APIs (never failed to amaze me how someone could call Swing "stupid" and then go back to coding Win32 or Motif... Apple guys I can forgive :)... And then there was all the fun of the endless futility of "expecting" programmers to always get their own memory management right. That one really burns me.
;)
C/C++ never took the rap for billions upon billions of dollars in lost productivity because of all the bizarre failure modes of memory allocation failures (hey, there's garbage on the screen... or, hey... it's Tuesday, the full moon is out and the app segfaulted again... coincidence?) or having some clever sixteen year old shove 80k up your 256 byte buffer. You can't tell me wrestling with the garbage collector isn't an improvement on this, because it's ridiculous.
Java of course is within spitting distance of C++ already in one or two benchmarks, but in reality nobody cared either way because you got things in trade that made it a good deal even when it was still quite slow. Not sure what "consistency of the output code" means, but...
You got it right about LAMP. The problems were often that the higher level systems (well, PHP anyway) were great for making websites, but didn't enforce enough rules to be a good idea for projects above a certain size. Still and all, a great many companies in the 90's said "OK, we need 8-way oracle boxes with hot swap CPUs and a 50 disk RAID and Oracle and Weblogic, and... now, what are we going to build exactly?" Most of these places could and should have just used PHP on a few pentiums and saved themselves time and money and headaches. On the other hand, I saw plenty of places coast on a slick of Perl and human blood well past the point where they needed real "enterprise" (hate that word) software development.
It seems like Java was only ever a victim of its own success. No one ever wrote a shitty applet or misused the VM in some way, where the whole language didn't get blamed as a result. Basically, it's another tool in the toolbox, and though it drives C/C++ guys to conniptions, it's the right choice to replace many applications programming tasks right now. Not that I wouldn't throw a party to meet its succeesor.
Unlike many big languages past, Java is probably never going away. No one seems to have realized it yet, but as the VM-first-mover it's the ultimate langauge standard. I bet you people will be porting the Java VM long after we're dead.
Tired of Political Trolls? Opt Out!
I've been watching the local So. California programming job market for a while. And as of earlier this year, I started keeping track of the number of jobs available for specific programming languages. Throughout the past 9 months, Java has owned the market on number of available programming job.
Here's the spreadsheet that I put together. It's in no way scientific, but it is a good indicator that Java, C++, and Oracle own the programming jobs market.
http://www.timothytrimble.info/ForSlashDot.htm
If you don't believe me, then do the stats yourself. Go to HotJobs, Monster, Dice, CareerBuilder and find out for yourself. The stats don't lie!
Timothy Trimble The ART of Software Development
TheTiminator
I can't take this seriously after Java has recently taken over from C++ as the most popular language on sourceforge:
http://www.osnews.com/story.php?news_id=12778
Java is a popular and versatile language. Software development involves far more than the very restricted aspects covered by LAMP.
Over the years, as new technologies were added, the interpreter and the API were constantly augmented. Basically the new features were slapped on like coats of paint, but it was never reengineered nor refactored. Look how little of the old cruft of 'deprecated' stuff from JDK 1.0 or 1.1 has ever been removed. For example, why does Java still need 3 types of remote invocation, all flavors of the same thing: RMI, CORBA, and RMI-IIOP? Can't one be selected for the core API, and others be add-ons? Why are AWT and Swing still separate, and why do Swing classes still not implement Containers, as was the plan long ago?
I know that this is for backward compatibly, which is why I think it is time for JDK 2.0. The current J2SE/Java5 is really JDK 1.5. Let the old 1.x series be grandfathered out, but always be available for whoever needs it. Refactor, clean up, fix the things that have always needed to be fixed. Organize the API in a clean, logical and intuitive hierarchy. Make a JDK 2.x series with that new car smell. Market it as Java6 or whatever.
As an aside, I do not think that I will ever understand these "X is cool. Y sucks" arguments. A good developer selects the proper tool for the job, whatever it is. I haven't tried Ruby yet, but I have used all of the others. All have their qualities and drawbacks. For example, I really like PHP, but I don't think that MySQL- or Postgres-specific calls should be in the core; rather, the ODBC-like abstraction like can be found in PEAR.
Following the narrow path of a single language only limits a person's skills. Consider the different options not as opposing each other, but orthogonal to each other, adding new dimensions or degrees of freedom.
I'll grant that Java requires a significant learning curve.. But not for people that have been initiated into the computer-science field.. Java was specifically meant to have a low-learning curve... For EXISTING programmers of the langauges of it's day.. C, C++, and friends.
But this is a misnomer.. Take a person off the street and teach him a "hello world" program in python or basic.. He'll say "Wow, I'm a programmer now!!".
Then ask him to synchronize two credit card databases of different structures with it. Ops, learning curve!
It's a damn-simple thing to do, but you needed to learn an API, and a bunch of underlying concepts first.
Same thing with java.. It is designed rigidly so that the programmer can make assumptions that make their life easier. You have to explicitly manage errors for one.. Doing so means whenever you change the form of data, you are forced to think about it to make sure that the data has exchanged correctly. In Python, perl, numbers become strings become floats become triggers based on how you tickle the data (not necessarily access). These are simply two different assumptions about the significance of the data. If I wanted to have refactor a perl object definition (say change a method name), it would be damn near impossible to do. I couldn't just perform a text-search for the method name because it would probably overlap w/ other methods that had similar names.. But in Java, that rigidity means I can clearly know exactly who uses this exact method.
If you're writing small apps and your definitions are distinct enough this isn't a problem.. But in my 15 years of programming, I've had to do a lot of refactoring, and in c or perl-type languages, I almost always resorted to work-arounds instead of true data-migration; as it just wasn't worth it.
I perfectly agree w/ KISS.. But Simple and concise are not the same thing... Perl/Python/Ruby provides conciseness (saying a lot with a little), but at the expense of convoluted code (your rails project has the name of a method mean several different things). Java provides preciseness (and of course the ability to shoot yourself in the foot by being non simple, non-concise and non-precise). You are able to be concise in Java if you make use of rails-like-APIs.. Essentially modularize/aspectize your code so that the complexity is held elsewhere to define a type of work.. Then you concisely write the core of your application. Hibernate + xdoclet or attributes provides an example of this.. EJB provides a means of isolation of units-of-work in a way that is scaleable, clusterable, and safe all at once.. (Not that I ever use EJBs directly; but there are plenty of EJB-like services). This is not to say that RAILS can't be made similarly.. But to my knowledge you are still choosing a particular framework, and don't have a lot of flexibilty to alter those large units-of-work outside of the original author's inception.
I've regularly hooked together many open-source units-of-work in ways that I'd never seen done before, and Java has always made this not only easy, but reliable (providing thread-safe, classloader independent, order-of-execution-safe, work-flows out of the box). Of course almost all of my units of work live inside of a serlvet engine.. Rolling your own main means that your mileage may vary.
-Michael
I wholeheartedly agree. The biggest strengths of Java are its cross-platform compatibility, its garbage collection, and its multithreading support (since the introduction of version 1.5). It's also useful as a research platform for computer scientists/engineers, because it allows for full control over both software and the (virtual) machine that it's running on. You can't get that in any other production software environment.
Some people (including me, soon) are taking advantage of this flexibility to try to improve Java's speed: Sable Lab
Is this good engineering? Too many of the newbs out of school
have one language under their belt, so everything is solved using it,
even when it shouldn't be. Just my 2 cents
-- Programming with boost is like building a house with lego. It's a cool but I wouldn't want to live in it
By the time I seriously started playing with PHP I already knew Java, yet it felt compelling somehow. I think it's just because it seems simpler, because the default choice is to put everything right in the page, rather than writing some JSP, some servlets, some EJBs and so on.
Writing JSP pages isn't really that much different from writing PHP pages; you can write them in a PHP style. But Java people tend to be degreed software engineers moreso than PHP hackers, so they make things complicated and build up layer upon layer of infrastructure, and you need to know a lot more to be able to deal with all those layers effectively. (And you end up needing to use struts, or EJB, for example, not because it's easy, but because management or coworkers pressure you into it.) Alternatively you can just do your database queries right in the JSP pages, which is ugly in a design sense (schema changes can be harder to propagate through the whole system) but very PHPish, and at least the whole pile of code will be smaller and more manageable if you have fewer layers to deal with.
The myth of software engineering is "after I write this nifty abstraction layer I'm never going to think about this facet of the problem again" (whether it be hardware abstraction, dealing with the database, the GUI API, dealing with web-based transactions and user-specific "state", or anything along those lines that you don't enjoy and would like to box up and forget about). The reality is that every layer you write also requires some maintenance, so you cannot avoid having to think about any of those things again. PHP hackers are just more likely to suck it up and deal with these annoyances head-on, with as terse code as possible, rather than try to abstract them away.
But some of the abstraction layers that have been created for Java applications are really elegant. Some much more than others.
Another factor is that large projects, for which more people are hired than is really necessary, with too much management, tend to take the long way around, in the name of elegance and maintainability. If programmers are smart enough to invent really elegant abstractions, and they have the time to do it, most will do it. But if you're on a scrappy underfunded little project you just take the most direct path to get the job done.
I, for one, developed quite a bit for linux-apache-mysql-java. Right now, I'm developing for linux-apache-jboss-mysql-java. What is it with people not being able to compare apples to apples? Java is a language first and foremost. Secondly, it's a set of frameworks, starting from EJBS (IMO, an abomination) to things like Hibernate, to Struts, to whatever else. Comparing these things simply makes no sense.
...richie - It is a good day to code.
BusinessWeek is so last year, so, so... so one-point-oh. (I kid, I kid!)
The "hip" thing for ex-Java folks is not LAMP but Ruby on Rails. When Bruce Tate wrote Beyond Java, it seemed it was time to check it out- and after doing so I have to say he's on to something.
Seriously, if you like the whole direction of Spring / Hibernate / JUnit, you owe it to yourself to check out RoR. The speed and joy of LAMP with the architecture and cleanliness of the best Java solutions.
Information: "I want to be anthropomorphized"
I have read /. for the last few years without ever having replied to a post but the sheer stupidity of this one compelled me to.
"The big issue here is speed of development and ease of use. Java is a bitch to learn, it requires a compiler, and it has a syntax that's byzantine as hell"
What are you on about? Java is a bitch to learn - even the most fanatical Java hater would admit it is easy to learn. The documentation is absolutely brilliant.
"It requires a compiler" - so what. What has this got to do with anything? Seriously? I have no idea what you mean by this - the Java compiler is easy to use and quick. Even if you get into the most complex builds in java with RMI (which no longer requires special compilation now anyway since 1.5) it is still easy. You also never do it by hand anyway as ant/eclipse exist.
"For doing something like simple text process, Java's syntax just gets in the way" By this if you mean doing some scripting - then yes - use perl. Why were you scripting in Java anyway you muppet. You need to get the anti-patterns book and go look up Golden Hammer.
I hate these inane flame wars which inevitably end up in a horses for courses anwser. From the comments I see posted most people with any sense have little inclination to get involved. (Yes I see the irony). Yes people overuse J2EE. I avoid J2EE unless I absolutely need it - and I avoid weblogic like the plague.
And another thing on the speed of development issue - people rarely acknowledge the roles of IDE's in development when talking about languages. I had to do a multithreaded, distributed application with a gui - I used eclipse,jigloo,TogetherJ and the eclipse RMI plugin - its not just the language which aids productivity but the development tools and environment. No development environment I have come across comes close to eclipse - it all just works seamlessly and jigloo is a godsend. Yes the java language is more verbose than some (and less than others ie Ada) but the development environment negates this. It still annoys me that people are still pulling all the Java myths out of their ass from when they last tried it in 1996 using notepad/vi.
I have also looked at Java code written by C/Perl junkies who moan about Java - because they have not updated their skill sets and have written nonsense. They have this nasty habit of implementing data structures themselves as well. Ffs. Geez. The number of times I have seen someone write sorting algoritms in a java app.
People also dont look at beyond base functional (in-out) requirements. Yes I can hack out a perl script. Does it scale? Is it maintainable? Is it transactional? Is it safe? (As in safety-critical applications). Would you fly on an airplane with an avionics system written in perl? Why do you think AirBus/Boeing use Ada?
And dont get me started on all this LAMP crap. All industry Java applications I have worked with have been on Linux some have used MySQL.
Basically I think it boils down to people with Golden Hammer complex and genuinely feeling an emotional attachment to a technology. I hate working with anybody who is an 'X' zealot. Language wise I use Perl/Ada/B/Z/Java with JDO,Spring,Struts,Hibernate,JBoss,JUNG/C/Prolog dependent on what I am doing - and I mean I really think about what I am doing before I pick a technology. If something better comes along I have no attachment to any and will ditch any if it allows me to deliver a better product quicker to the user.
Eric Schmidt, the current CEO of Google, worked at Sun where he led the development of Java. He left Sun to be the CEO of Novell and retrained the programming staff on Java. He went from Novell to Google and still has ties with Sun, mostly recently with the joint venture with Sun in distributing the JRE with the Google Toolbar. Google is also purchasing Sun hardware possibly to obtain a better performance per watt. Eric Schmidt has also said that Google has several projects that use Java. Google is also a member of the Java Community Process.
So, it seems that Google has some serious management, business, and code ties with Java. That's to say nothing of IBM, Oracle, and others.
Reporters always make something out to be the end of the world or something drastic.
...or X is still around even though we wrote it off.
.NET. Whatever. I don't need to relearn logic everytime the technology changes, so just tell me what language we are using.
Gets eyeballs on stories. It's either Java dominates everything or Java does nothing. While the truth lies somewhere between those two extremes. But the truth in these type of stories makes for horrible reporting.
You'll also find that stories follow the following pattern: X is doing great, X stumbles/fails, X returns to glory
Next year they'll have an article about how Java is still being used all over the place.
Java can co-exist with other technologies. I programmed in Java. I program currently in
Except for ending slavery, the Nazis, communism, & securing American independence, war has never solved anything.
This is just stupid. People are wasting their energy arguing over completely different technologies designed for different purposes, with different strengths and weaknesses. If you think any one toolset is the right solution for every problem, you don't know enough about the all the options to have a valid opinion.
I've used most of the technologies people have mentioned here, some extensively. None of them are clearly all-around better than the others in all ways, and the statistics concerning toolset use are meaningless because technical merits are rarely the deciding factor in what tools or libraries a particular project ends up using. It's usually either the project team deciding to use what they're comfortable with (i.e. the I've-got-a-hammer-so-this-project-must-be-a-nail approach), or imposed top-down by management who were sold on the merits of one solution by a salesperson/article/more technically-savvy friend, etc.
Hell, the closest thing to an all-around great-for-most-anything tool for building web application was NeXT's old Objective-C based WebObjects which, despite the fact that Apple let it die a painful death, was years ahead of anything else on the market, and even now after not being developed or supported for several years, is still ahead of many solutions in some respects. But I'm not about to recommend to one of my clients that they should use it, even though I might think it's technically a better solution than something else. These decisions, even when made intelligently (which is rarely), are not, and should not be, made in a vacuum.
I've never understood how job openings on a job board give any indication of how popular a programming language is. If my company posts 10 .NET Programmer openings and 10 Java Programmer openings on Monster.com, and we have 6 .NET developers apply and get hired and have 2 Java developers apply and get hired; then you go out to Monster and run some sort of statistic on it, what do you see? 4 .NET openings and 8 Java openings. That must mean Java is more popular!?! Nope, just means it's harder to fill the positions because it's becoming less popular. (This is just one way to look at it, not saying .NET is more popular than Java or the other way around).
These discussions always get me.
On one side you have a bunch of people who have never seen the kind of problems java solves so well.
These people for some reason think it's a horrible thing and must die. This has never made sense to me. I dislike a lot of crap that fits other people's needs and I don't really feel the need to rant against them at every opportunity. What kind of inadequacy drives this crap?
On the other side, you have a bunch of people who need it as is to get their daily jobs done. They are scratching their heads trying to understand why there is even a discussion going on.
If you are on a project with one developer and it's a web project, Java probably isn't for you. In fact, if you are on ANY project where you are the sole developer, don't bother unless you just like Java's syntax or you have worked in groups before and prefer the consistency and clear code that Java offers.
If you are writing a tiny app meant to run on a PC, dump java and write it in C/C++. The VM issues are kind of annoying that.
If you are writing a large client/server app, creating your own protocols, working with a group of 5-50 people, interested in long-term reusable clean code AND willing to spend the extra design time required to make such code, you might consider Java.
Honestly, I think most of the people complaining are trying to use "Java" to write some web app on their home computer and wondering why it's so hard. Like "Why does driving a backhoe have to be so much harder than riding my bicycle?!?!?" This is really for the hard jobs! If you don't have a hard job, if you are making a web app or something, Use your bicycle. PHP works fine.
Java makes a lot of the traditionally difficult issues much simpler, but these little apps typically don't even HAVE difficult issues, so yeah, Java may be a little cumbersome for them. Why did they even choose it in the first place.
My job became immensely easier and more fun by switching from C++ to Java. If you hate java, it may not be the tool for you! Backhoes are not great for tours around the lake, learn C++, VB, PHP, or whatever gets you off and enjoy. Just don't put down that funky looking, fuel guzzling backhoe unless you've tried digging a hole for a pool with your bicycle!
LAMP may "take over", which would be a shame because it looks like what PERL would be if it was a web language.
Like candy, it is fast and easy. Like candy, if you use it for your meals it will make you fat and rot your teeth.
LAMP looks a quick and dirty approach for sites, that is easy enough to use to be seductive which will lead to a huge base of hard to maintain code the way PERL did.
I hate the articles that proclaim one technology dead because another supplants ONE USAGE of that technology. Web frameworks for Java are cumbersome and a pain in the ass. However, Java is really good for things and can work nicely side-by-side with AJAX, Flash, PHP or whatever other front-end technology you want to use.
The fact is, programming a stateful, multithreaded application on Java is extremely easy, and in certain circumstances, a stateful application with multithreaded capabilities comes in very handy. I'm thinking things like artificial intelligence applications, messaging, delayed database writes, etc.
I have programmed sites that are PHP, with a Java multithreaded application used to handle certain transactions or self-organization of graph structures.
I thought this whole Web 2.0 thing was about open interoperability?
Languages don't cause bad programs to be written -- bad programmers do! It's just a sign of the decline in pure programming skills.
Right and guns don't people, people kill people, but it's a lot easier to kill people if you've got a gun, non? I think it can be legitmately said that the nature of Java is better lended to well structured code. It doesn't mean you can't write well structured Perl, but on the average, people will write better code in Java than they will in Perl. Sure, a good programmer can write good stuctured code in any language, but you have to accept the reality that there's far more demand for code than there are top notch coders. That doesn't reflect a decline in pure programming skills, it reflects a vast increase in the need for people with any skill at all.
I find these language debates kinda dumb, frankly. Here's the thing, with everything being web based, it doesn't matter a lick what you run it on. If Java works best for you, great. If LAMP works best for you, great. Personally I prefer LTPJ (Linux, Tomcat, PostgreSQL, Java), but then I know Java a lot better and I know how to make it do neat tricks I'd have to learn over again in PHP. Besides, can you even write threads in PHP?
But if you all websites work with the same browsers and all websites communicate with eachother in the same way, the code could be running off of punch cards for all it matters. In the long run that openness will tend towards minimizing the influence of any one platform or company. People will go with the tools that suit them best.
Articles like this one are even more stupid than the debate because it's clear they do no understand the technology. They talk about people using Linux and Apache as though that means they couldn't be using Java. In the end, you can totally mix and match Apache, Linux, Java, PHP, etc, to best suit the environment you're working with. But of course that doesn't make for as interesting an article, does it?
This sig has been temporarily disconnected or is no longer in service
Yes they are, coding in Ruby or Python is actually geniuinely fun and rewarding. Not having the language go in the way and prevent you from thinking about the program (the forest) because you have to think about the code (the tree) is like discovering programmation over again.
This is absolutely true. After wanting to take a look at Python for a while, I finally wrote my first program in it this weekend. It's a simple script that finds all words in a Boggle grid. (Useful for cheating here). It took maybe an hour of looking up the proper syntax for reading files and creating lists and such (all of which are intuitive and easy to remember, unlike Perl), and it worked perfectly on the first run. It was only then that I realized how little code it had taken and how *pretty* it was: Java would have had loads of redundant code with classes and casts and explicit list creation and copying, and Perl would have had about the same line count but peppered with inane "@$" prefixes for the lists of lists.
Python is good. Check it out, even if you think the significant whitespace is silly. (I'm still undecided; I don't like being at the mercy of how text editors interpret spacing, but it does improve readability somewhat).
How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
I'll point out one place where Java has it all over the other webserver languages. When you issue a HTTP request to PHP (the 'P' in LAMP), what happens? Off-the-shelf, it's gotta tokenize the scripts (and in any decent-sized web app there are MANY), then it has to execute it. Then it loads all the data needed to regain the client's context. Finally, now your request can be serviced. HUGELY INEFFICIENT and a really poor design.
With Java, you can connect with a pre-compiled, already-running servlet or JSP page that's part of a *continuously* running system. Shazam! The data's already there! You've got a pool of objects, threads and database connections, all ready to roll.
Whatever minor inefficiencies you point out with JVMs, having a continuously-running website application scores first place. Perl has the potential for this, but then you're stuck with its obscure syntax (not a biggie, but..), limited object orientation and too-new threading feature. Java works better for server apps.
I'd like to see the Ruby crowd compare on this basis. (Not against Ruby, just not familiar enough.)
Cheers.
O lord, bless this thy holy hand grenade, that with it thou mayest blow thine enemies to tiny bits, in thy mercy.
Oh, man, do we have to do this again?
Java has theoretical limitations that mean it will always have difficulty keeping up with a well-optimised C++ program.
For a start, let's get over the Hotspot thing. It's an optimiser. C++ has had them for a year or two, now, I hear. If Hotspot had revolutionary new techniques, why haven't they been adopted en masse in the C++ world? Presumably you can cite patents or similar that would prevent this?
There is a theoretical possibility that a dynamically-optimised Java application could do better than something compiled with C++ on a given data set. However, recent advances like profile-guided optimisation in the C++ world suggest that data-based optimisation doesn't help that much.
Moreover, there are very significant overheads incurred in the monitoring and, if necessary, compilation and optimisation steps running in the background. A compiled C++ program instrumented for use with a profiler will typically run several times more slowly than the equivalent uninstrumented code, unless you're running on something like an Itanium that has handy hardware support for these things, and there's no silver bullet that allows a JVM to magically collect the equivalent data without overhead, nor to collect a much smaller set of data yet still optimise to the same extent based on it.
Right, now we've got the Hotspot stuff out of the way, let's do the inherent difficulties with GC. To release memory, sometime, somewhere, you have to update whatever tables you use to indicate what's allocated. That's it. Anything you can do with a flashy GC in Java, you can code up the same memory management algorithms in C++ if you really need it. In C++, you can also write more specialised alternatives for different data types, and of course many objects are simply allocated on the stack anyway. Java is just about catching up with the advantages of that one with techniques like escape analysis today, yet it's standard, chapter 1 fare in the C++ world.
And of course, there are still the same fundamental weaknesses in Java's design that there always have been...
Java doesn't have value types, so everything's dynamically allocated by default.
Not everything is an object, so you have boxing overheads even in simple things like containers unless you use generics.
Those generics have only just been introduced into the language, and are a poor imitation of C++ templates, offering few of the advantages that template metaprogramming has been providing to serious, high performance libraries in C++ for a few years now.
Java's floating point model is constrained by its portability requirements -- for a while it was even theoretically impossible for a JVM to meet them, IIRC -- which unavoidably prevents the use of many math optimisations.
I could go on, but I'm getting bored, so I'll leave the record straight enough and stop there.
One last thing: before you reply and tell me to do research rather than rant as you have with other posters, you should know that I write high-performance, highly portable code for a living, and I work with countless other people in the industry who do the same. If the Java evangelists were right, and Java really was rivalling the performance of C++ and easier/safer/more productive today, then it's strange that the entire industry I work in, with all its R&D, hasn't noticed.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Whenever I start solving a problem in Java, as its complexity increases, I can tackle this yb developing objects/components/frameworks/libraries to abstract a lot of the complexity away -- effectively creating a new "language" (my APIs) with which to solve the problem in. Java lends itself well to this sort of OOP solution development.
When I used to do simple JavaScripts, or simple ASP pages, or simple Perl scripts, a lot of my solutions also started very simple. Many of these languages did not lend themselves well to objects, so you end up creating a lot of functions and passing data around and doing strange things with the standar data types -- but they also offered a richer syntax which allowed you to more easily accomplish these things without needing to hide anything. Still, I would eventually reach the point where I wanted to start wrapping things up more (JavaScript, now ECMAScript, supports Objects, Perl added OO support, etc.).
My point is that these "LAMP" languages make it very easy to write not-too-complex programs rapidly. However, my personal feeling is that once you start to make that more and more complex, the problems become easier to manage in bite-size chunks with OOP concepts like encapsulation. Since Java naturally urges you to start out OO, evolving the OO is simple. BUt to start with a non-OO programa nd evolve it to OO can be... trying.