bruce.armstrong wrote: Somebody just said it better than I did, and with more chops to say it:
Open Letter to Mark Zuckerberg, Sheryl Sandberg & Facebook Mobile
Here is a question that I have been pondering on and off for quite a while: Why do "cool kids" choose Ruby or PHP to build websites instead of Java?
I have to admit that I do not have an answer.
Why do I even care? Because I am a Java developer. Like many Java developers, I get along with Java well. Not only the language itself, but the development environments (Eclipse for example), step-by-step debugging helper, wide availability of libraries and code snippets, and the readily accessible information on almost any technical question I may have on Java via Google. Last but not least, I go to JavaOne and see 10,000 people that talk and walk just like me.
The other reason that I ponder this question is that the power of Java is a perfect fit for the areas where websites may need more than markups or scripting, such as middleware logic. PHP and Ruby etc are cool for building pages, but they are not ideal candidates for building middleware logic. Given that Java covers the "high end" of the spectrum well (where sophisticated processing is needed), wouldn't it be great to use Java all the way?
Is it Java as a programming language too difficult to use, comparing with those scripting oriented interpreted languages? Yes, this maybe the reason. But there are 5 million Java developers out there already, and millions of developers make a living by write server side Java code. A lot of websites are built by these Java developers, and somehow they choose to use PHP or Ruby instead. Why? It is even more puzzling that I have seen quite a few Enterprise Java people decided against Java - when they decided to build their web 2.0 site, they went for PHP even though they have to learn PHP.
Is it the lack of tooling? I think there are more tools for Java than, say, Ruby.
Is it the lack of frameworks? I bet there are more Java frameworks than the population in China.
OK, a lot of websites are fairly simple, mainly composed of markup pages, scripts and some lightweight logic on the server side, where PHP and Ruby are good for. Java maybe an overkill for such websites. But there are a lot of websites that are much more sophisticated than "lightweight" logic on the server side. For example, FaceBook was relatively simple initially, but now with FaceBook API and Platform, its complexity is growing. Why not use Java for such websites?
So what is missing from the Java world? What is the ideal architecture to build a website using Java?
Option 1: JSP/Servlet with a Java Servlet engine (or even an application server): This is the dominant architecture for Enterprise web applications. But it clearly has not been appealing for building websites in comparison to PHP or Ruby;
Option 2: JavaServer Faces: JSF is the new kid on the block. Is it going to make building websites easier? Probably not. It is designed for simplifying building form-based applications.
Option 3: Using a Java based content management system (CMS)? I have come across many CMS systems over the last few years, and haven't been impressed by anyone of them.
So what is the ideal architecture for building a highly scalable, sophisticated (potentially. Your site will become sophisticated if your site is very successful), easy to build and easy to maintain website, while using Java?
About Coach Wei Coach Wei is founder and CEO of Yottaa, a web performance optimization company. He is also founder
and Chairman of Nexaweb, an enterprise application modernization software company. Coding, running,
magic, robot, big data, speed...are among his favorite list of things (not necessarily in that order. His
coding capability is really at PowerPoint level right now). Caffeine, doing something entrepreneurial and
getting out of sleeping are three reasons that he gets up in the morning and gets really excited.
Reader Feedback: Page 1 of 9
#132
raysea commented on 18 Nov 2009
Well, it's simply not a matter of being "cool," it's a matter of being expedient vs principled. As a long time software developer, I use both Java and occasionally PHP, but prefer Java. But, if someone wants to quickly get a dynamic site up and running, and scalable performance isn't an issue, then PHP or Ruby or some other scripting language, including Perl, would be a reasonable choice. But as complexity grows, the scripting languages falter. One need only look at applications such as facebook today vs facebook last year to see some of the issues being played out.
The second point is learning the development environment, including the language. The scripting languages are pretty easy to learn, and lack the complexity of Java (generics being an exquisite example of that). To learn Java, it's not like just picking up a book and having all you need to begin developing. This is the polar opposite of scripting languages, where a short book or online tutorial will provide all you need to begin. After all, many people would rather die than learn something new. And Java takes some effort to master. Whereas with a scripting language, the basics are easy and then one simply needs to learn about other "packages" or plug-ins.
My suggestion to everyone is to use an IDE (eclipse, netbeans, etc.) that can easily handle both scripting languages and more complex languages, such as Java. Then the environment becomes a non-issue. Additionally, as testing tools come along they are often incorporated into these wonderful IDEs. And if you think an IDE is too complex for your programming needs, I would suggest that programming is too complex for your attitude. As a famous person once said, the question "How can I learn to program, even though I don't like mathematics," is akin to asking "How can I learn to play the piano, even though I don't like music."
#131
rdgflex commented on 29 Jun 2009
I came to Java rather late in my career, only adding it to my web architecture a couple years back (2007). And so, I feel I can speak somewhat to the reasons as to why developers avoid Java and choose easier languages.
1) Entrance to the Java club seems almost insurmountable. There are SO many frameworks from which to choose. How do you choose a framework when you don't know Java? How do you learn Java if you don't choose a framework to begin the learning process?
2) Authors of Java books assume that every developer comes from a C/C++ background, making constant references to the latter when trying to explain Java. Sorry, but I came from a procedural language background (AS/400) and, therefore, Java books seemed very difficult to trudge through.
3) Authors of Java books on a particular framework often feel it's necessary to make contrasting comparisons to other Java frameworks, assuming the reader has experience with that other framework. Again, if you don't have the assumed background, you miss the point the author is trying to make. In particular, if you came to Java after EJB was widely discarded as a bad idea, but if the book constantly refers to how it was done under EJB, then again you're lost as to the point the author wishes to make.
4) It's not just a matter of learning the Java syntax, but becoming familiar with the ever-growing number of packages.
5) In my view, from a web developer's perspective, Java did not come into its own until the advent of frameworks like Spring, Apache CXF, JAXB, JAX-WS, and the addition of annotations and Java generics to the language. Prior to these additions, Java was simply to burdensome of a language to use.
6) Java has a big drawback for web developers, which is a lack of hosts that will support the Java language. This is especially true if need to tweak the JVM arguments or add a spring-agent jar to the tomcat\common\lib directory.
Granted, Java is much more scalable, allows for access to an abundance of freebies, such as iText for building PDF documents, or POI for creating Microsoft Office documents, etc, etc. The worldwide collaboration and contribution of valuable, time-saving source code can't be overestimated in its value to the developer. After all is said and done, I chose Java because of these two factors that Java offers: scalability and the number of freebies via open source packages developed by some very bright software engineers. However, I still just chose Java as the middleware solution, and opted for Flex on the client side. I don't feel Java can compete with Flex for the UI.
R. Grimes
#130
gcameo commented on 24 May 2009
I am a java developer who decided one day to give PHP a try. That same day I saw why no real enterprise system will ever be written in PHP. It is a just HTML with some way of adding dynamic content. You will never be able to do anything serious with that. java is a programming language. PHP is a scripting language. That is a serious difference that should never be disregarded
#129
brendanbaldwin commented on 22 May 2009
The frustrating thing about articles like this is that there was absolutely no exposition on the merits of any of the three radically different languages mentioned except to say Java is fast.
Well, so is Haskell. So is C++. So is ASM. Why do you use Java? Clearly the only reason is because that's where you are comfortable. The unfortunate side-effect of being comfortable is that you start to get lazy.
You might actually find you really enjoy learning again if you were to take the time and research a subject before you write about it.
As a managed cloud computing provider, I have the fortunate position of watching my customers bring their software products to life. I see many of the reasons you give for people not choosing Java, but one you didn't list was the personality of the architect/developer. I do believe that PHP and Ruby are easier to get started with than Java. Someone who thinks their project is "just a few thousand lines of code" and wants to use an extreme-programming "code and go" style of development where refactoring is a way of life, probably will be more likely to choose an "easy" language and start prototyping in it. Those customers of mine who have their architecture planned out in detail and realize the complexity of what they're trying to build seem more likely to choose Java because of the explicit support for complexity it provides. There are also performance considerations: the customers I have who use Java seem to have less niggling performance problems than those using PHP or Ruby. If performance isn't considered in advance, this could affect the choice of language.
#127
j.d wilson commented on 30 Jun 2008
does anyone else think this blogger is like a little stereotypical at all?
#126
Slurpie Dog commented on 26 Jun 2008
Let me sum up all these posts.
Java, like its creators at Sun, is anal retentive.
raysea wrote: Well, it's simply not a matter of being "cool," it's a matter of being expedient vs principled. As a long time software developer, I use both Java and occasionally PHP, but prefer Java. But, if someone wants to quickly get a dynamic site up and running, and scalable performance isn't an issue, then PHP or Ruby or some other scripting language, including Perl, would be a reasonable choice. But as complexity grows, the scripting languages falter. One need only look at applications such as facebook today vs facebook last year to see some of the issues being played out.
The second point is learning the development environment, including the language. The scripting languages are pretty easy to learn, and lack the complexity of Java (generics being an exquisite example of that). To learn Java, it's not like just picking up a book and having all you need to begin developing. This i...
rdgflex wrote: I came to Java rather late in my career, only adding it to my web architecture a couple years back (2007). And so, I feel I can speak somewhat to the reasons as to why developers avoid Java and choose easier languages.
1) Entrance to the Java club seems almost insurmountable. There are SO many frameworks from which to choose. How do you choose a framework when you don't know Java? How do you learn Java if you don't choose a framework to begin the learning process?
2) Authors of Java books assume that every developer comes from a C/C++ background, making constant references to the latter when trying to explain Java. Sorry, but I came from a procedural language background (AS/400) and, therefore, Java books seemed very difficult to trudge through.
3) Authors of Java books on a particular framework often feel it's necessary to make contrasting comparisons to other Java framework...
gcameo wrote: I am a java developer who decided one day to give PHP a try. That same day I saw why no real enterprise system will ever be written in PHP. It is a just HTML with some way of adding dynamic content. You will never be able to do anything serious with that. java is a programming language. PHP is a scripting language. That is a serious difference that should never be disregarded
brendanbaldwin wrote: The frustrating thing about articles like this is that there was absolutely no exposition on the merits of any of the three radically different languages mentioned except to say Java is fast.
Well, so is Haskell. So is C++. So is ASM. Why do you use Java? Clearly the only reason is because that's where you are comfortable. The unfortunate side-effect of being comfortable is that you start to get lazy.
You might actually find you really enjoy learning again if you were to take the time and research a subject before you write about it.
ericnovikoff wrote: As a managed cloud computing provider, I have the fortunate position of watching my customers bring their software products to life. I see many of the reasons you give for people not choosing Java, but one you didn't list was the personality of the architect/developer. I do believe that PHP and Ruby are easier to get started with than Java. Someone who thinks their project is "just a few thousand lines of code" and wants to use an extreme-programming "code and go" style of development where refactoring is a way of life, probably will be more likely to choose an "easy" language and start prototyping in it. Those customers of mine who have their architecture planned out in detail and realize the complexity of what they're trying to build seem more likely to choose Java because of the explicit support for complexity it provides. There are also performance considerations: the customers...
Not the One to Answerthis wrote: You know it if you really think about it.
Because Java plays as iut is FLOSS and it is not. So we go LAMP and say F)/= off!
And yeah, I just had Java this semester and it is true: Java SUCKS!
Next semester guess what I am taking? Python!
Long live LAMP (as in PHP right now, and PHP/Python by next year)
Stop writing crappy articles and DO Y OUR JOB! Go program some app in Java and see if anyone uses it.. And I'll gte my Google Apps account and make a Hello World over there and send you a link!
Peace
That's why!