Why Java becoming not so popular?


I would like to ask you why java and specifically JSP is not so common these days? Most people seem to speak about PHP and .NET. What is the problem with Java nowadays? Is it dead?


Here is my opinion…

Java is not dead but… The main problem with Java is a slow learning curve. Also, I must admit that I’m losing interest in Java after Oracle bought Sun and after all this problem with Oracle vs Google…

JSP is popular, but maybe not in the way that you’re thinking.

JSP is only a very small part of Java web programming toolkit.

Pure JSP by itself has never been a good idea.

JSP coupled with Servlets, not so bad.

MVC projects like Spring, Struts, and Java Server Faces (JSF) are good.

MVC projects like Spring, Struts, and JSF that integrate with other templating technology besides just JSP? Even better.

The learning curve is quite high with java, but it is super powerful.

In theory, it’s great.

In practice, it can be very annoying to implement, deploy, and maintain the server services. Hosts typically offer LAMP or WAMP stacks…JSP hosts aren’t very common, so folks tend to end up hosting themselves–which isn’t something everyone can do.

Additionally, now that oracle bought sun (which included all things java), there’s some concern about what direction oracle is going to take java.

Java is not dead, it’s “Enterprise”, great for large teams doing big projects and it still gets used for this a lot. (yes I know I’m going to take some flack for this).

The trouble is, it’s a big heavy lumbering brute of a language compared to, say, Ruby, Python or even PHP5, so these tend to get used more by freelancers or those working in smaller teams.

There’s nothing wrong with it, Spring especially is really cool, and I don’t think it’s going away anytime soon, but you may not run into it so much in a place like SitePoint.

I have no idea where you guys think Java is dead!

First, anyone who says “JSP Project” don’t know Java
Second, Java is the #1 most sought IT jobs. Check monster or other job sites
Third, who can compete w/ Java w/ 10000000000’s of supported framework?

Good analogy would be PS3 vs Xbox 360. System wise, PS3 is superior but Xbox 360 is a better overall system. Why? because it has many great games than PS3. Can PHP/.NET/other language be greater than Java? Possibly. I don’t know since I can’t compare other languages. However, I do know that Java has the “most” supported third party and open source frameworks out there. psh…Java is dead? …hahaha

Java is not dead. However there is a lot of cry that it is not alive either. Some people think that a general purpose programming language must develop forever - I do not agree with that. At a certain point it is even better for a language to stop changing. The reason is that programmers are all different. Though 90% of them need in general same core language, out of that area their needs get pretty specific and that should better be covered by a rich enough set of specialized languages or independent extensions of the core language, but such that those who do not need them should not even suspect those extensions exist.

As to my taste Java should have better had stopped at 1.4. After that it fell into hands of pretty one-sided enthusiasts of … of keeping it in their hands.
Having more rigid type control is a good thing, but repeating 15 years old ideas from C++ is bad by default. 15 years is enough time to think of something more smart. Other 1.5 innovations also look raw. I would start rethinking Java from point 1.4 to a different direction. Anyway, I stay Java man. At least because the rest is even worse.

JSP is not only getting less popular. Maybe not everybody noticed that, but on Oracle site it is declared obsolete. And the ONLY other technology included into JavaEE according to same site is JSF (see above about hands). JSF is a pretty eclectic heap of old curiosities now Facelets incorporated into it.

I agree that JSP by itself is obsolete, but JSF + Facelets is not a good substitution to it at all. I strongly recommend to look at HybridJava instead.

I guess it’s true that PHP is more common. And I suppose you could also say (true or not, you could say it) that Andriod is less popular and maybe even a “dead app walking”. But the fact that Android is written in - yep, Java - says something IMHO.

Let me add an ‘old dogs’ thinking to this.

I programmed in Java (JSP / Servlets) exclusively up until three years ago. I avoided PHP like the plague because of it’s inherent security problems. With the release of PHP 5 much of those problems went away so I started using it and quickly realized using Java for simple to mid range web applications was like ‘killing flies with a howitzer’. Way too much overhead, way too much involved in system resources etc etc.

Don’t get me wrong, Java is a great language but to many it has become bloated beyond belief all while PHP has moved towards a solid OOP language with many of the same features with half the bloat.

Haven’t seen much of it yet but from what I hear when PHP 6 comes out Java could be in big trouble.

Just my 2 cents

I totally agree. I left the fold the moment I saw the way they’d done generics. Great for massive projects (though .Net is arguably better) but for anything small to medium sized it’s complete overkill.

I believe your 2 cents opinion is way too expensive. Of course this is just your opinion, but as I’m reading… I’m just shaking my head. What your saying is like a person who bought SLR camera thinking it’ll produce better picture than point and shoot. But then, he realize it’s too complicated and goes back to point and shoot camera. I’d consider PHP as point and shoot camera and Java as a SLR. People who come from PHP -> Java, they complain it’s too complex~ too many configuration~ why can’t I just press one button? For people who’s coming from Java -> PHP would say… why can’t I control the lighting at a precise point? why can’t I buy a new external flash and install it? why can’t I change the lense for different type of pictures?

Get the point? Also, once you master the SLR you can use this for any type of situations…meaning you can use Java Web from small to large scale because you already know how to use’em well. Even 3 years ago, you should have many great framework to use from like Struts/JSF/Spring MVC, Hibernate, and etc… Essentially, you’re just using the crappy lense that came w/ your SLR… which is Servlets/JSP.

You obviously haven’t seen PHP 5 and seen what they have done or you wouldn’t be saying that.

AND you are talking to a SCJP, and someone that not only spent years programming Java but also taught Java at the college level.

I know what Java can do and I also know what it requires to do x, y & z AND I also know what PHP can do and how easy it is to do x, y & z.

Lastly, let’s not even get into the frameworks thing. You don’t know me but some of the other ‘old timers’ do and trust me when I say that’s not a road we want to go down with me.

Interesting analogy, however an SLR gives responsibility and freedom, whereas my (several years in industry) experience of Java is that it’s locked down tight. You can’t change a class without inheritance, you can’t assume the existence of a method without writing an interface or abstract class, and once it’s compiled, you can’t readily extend it. I am aware I’m comparing apples with oranges on that last point.

I still say it has a place when you’re working with a largish team of mixed ability programmers who need to share code and you want everything locked down as tight as can be. However as a freelancer I’ve yet to encounter a problem I can’t solve far more quickly and elegantly using one of the newer languages, Ruby, Python, PHP5.

Why set up hoops for yourself? If you’re good, you don’t need that level of protection. :slight_smile:

Well said. An experienced programmer, one that truly knows what he (or she) is doing, one that looks at the scope and business rules of the application IN DETAIL before ever writing a line of code, one that know the ‘best practices’ and ‘pitfalls’ of one type of coding or another does NOT need someone (or something - e.g. compiler) ‘looking over his shoulder’ wagging their finger back and forth saying ‘no no no’

Yes, you’re right I don’t know PHP. All I said is that, I’m very much confident that Java has more support from third party or open source community. This gives tremendous power to the programming language. A great analogy would be xbox 360 vs PS3. System wise PS3 is much better system however it’s less popular than Xbox 360… why is that? Shouldn’t everyone buy a system that’ll display better graphics? They cost just about same. For game console, it comes down to the support of the games. Xbox has at least 2~3x more choices than PS3. Same w/ Java… it has I’m sure 10~20x more libraries than PHP. This gives TREMENDOUS power and the confidence of the programming language. Also, Java is not just about web and PHP is all about web. PHP obviously have hot spot in that area but “may” fall in short outside of that. Also, you having SCJP means nothing… I’m sure you also know that as well. Teaching Java 101 doesn’t make you senior developer. Still, let’s not get into PHP vs Java. I just wanted to express your opinion on Java and not on PHP.

You’re exactly right… you’re comparing w/ things that are fundamentally very different. What you’re saying is OOP vs Scripting Language. The structures are there for OOP to encourage better design by giving “restrictions”. In scripting language, you can super glue a lego block on someone’s eye ball. I don’t call that a “freedom”. I see what you’re saying though. Again… I’m not bashing PHP… I’m expressing his point of view on Java.

I totally agree, and again, I think it’s horses for courses. Java certainly does have a lot of libraries. We used to use Lucene quite a lot, and to my knowledge there’s nothing like that for Ruby or PHP. However for my purposes, small to medium sized webapps serving a few thousand pages a day built by small teams, Ruby is a better fit.

As I said before, if I was working in a larger mixed ability team over several locations, I would want everything locked down tight. However, I don’t personally feel the need to do that any more. Yes, Ruby lets you superglue a lego brick to your eyeball, but it also gives you the freedom to write concise code that really sings.

I would urge you to try a little project with Rails and see if you change your mind. :slight_smile:

I have~~ yes the scalfolding… I know enough to do a medium project. Toward the end, the language was fine but hated the IDE support. I like to know all methods that’s available… no IDE can be smart enough to do that for scripting languages.

That’s true, the IDE’s struggle with such an open language. I currently use RubyMine which does a fairly good job, it’s based on intelliJ IDEA and it works quite well. Most of the refactoring is there and it has a good debugger, but it’s still not a patch on a real Java IDE for obvious reasons.

Just curious - where can I look at JSP without Servlets?