views:

379

answers:

10

I've been doing some research into taking my programming experience and moving into the java programming marketplace, due to a combination of personal interest and local market forces. As you can gather from the title, the vast majority of my experience has been in building web-based sites and applications, and I'd like to move as much of my previous experience as possible.

One thing that I've been unable to find a concrete answer for when should a website or web-based application designer look to going with a Java based solution, over other options currently on the market. What options would Java provide that would have a designer select Java as the basic coding language to base a project upon?

Thank you for any constructive replies that may arrive from this inquiry.

EDIT: I should have included the caveat of if other factors are equal, for example if hardware, software, developer skill in java is up to where they should be for such projects, and so forth.

+1  A: 

I believe that the conventional wisdom on this subject is that Java is better suited to very large systems that need the discipline of static typing. Also, on very busy sites, Java can use less memory and run faster than most interpreters.

(Right out of the box, Java wants lots of memory. But on a busy system Java has only one copy of all running code.)

There are also certain prosaic reasons to stick with Java, for specific sites. They might need back-office integration or some other big piece of existing code.

DigitalRoss
A poorly written app will fail in any language. Using Perl and memcached, we serve over 9 million pageviews a month, not because Perl is the schwa, but because our site's architecture and infrastructure are well-designed.
BryanH
I certainly agree.
DigitalRoss
@DigitalRoss, I edited your post to remove some typos, looks like your edit has restored them
Rich Seller
Heh, thanks. (Posting from my android phone, typing is a challenge. :-)
DigitalRoss
+11  A: 

The main factor is what your developers are adept in. If you've got a bunch of Java developers, go with Java.

Rich Seller
So true. Java and .Net are on par in this respect, both can do the job quite well and it just comes down to who you have available, the costs of hardware and software pale in comparison the cost of the development team.
Spence
if you care what language your developers are adept in, then you probably don't have that great of developers. A great developer will find the right tool for the right job and use that.
Zak
+2  A: 

Be sure to include a learning curve in the development time if developers aren't familiar with the chosen language.

Steven
Including time to fix cock-ups.
Tom Hawtin - tackline
+1  A: 

I would use Java if there was a library or framework that provided specific features that no other language did (or not as well).

For example, if I had an in-house-built java library for running our Gruntmaster rock crusher, then it naturally would make sense to use Java to build an app that needed to control the Gruntmaster.

Some might say that whatever one's shop's official language is the language one should use--I disagree with that rule, as in my experience a good developer can learn any language.

There is no hard and fast rule otherwise; each language has its own strengths and weaknesses. The fact that you are asking this question about Java tells me that you are not as familiar with it.

I'd suggest you go ahead and build an app or three in Java -- then you'll know. :)

BryanH
+2  A: 

For the most part, the best technology is the one you are already using.

If you have coders that know java, have system administrators that can configure java apps and know what to do when a java app stops working, and project managers who know how to accurately schedule and plan a java deployment, you would need a very, very compelling reason to pick something else like .NET for a new project, even if .NET is "better" (whatever that means).

There are, of course, exceptions; if you're using something obsolete and/or is not going to be supported in the future (like classic ASP), or you have no legacy systems, then it's time to use something new.

pjabbott
+1  A: 

There is very little separation between the capabilities of the various technologies available today for web programming.

Java at one time was the default choice since it far surpassed the abilities of the competing technologies, but that is no longer true.

The Microsoft answer has matured rapidly; the days of classic ASP are far gone with .Net now providing all the abilities and ease of programming that Java has offered.

New languages such as PHP and Ruby have arrived or become much more mainstream, and are also valid choices based on your programming needs.

So as many others are saying it boils down to what language you or your developers are familiar with.

Carlton Jenke
One main drawback of the Microsoft stack is still that it's bound exclusively to the Microsoft operating systems. One might or might not like Windows, but the ability to run on different operating systems is almost always an advantage.
Joachim Sauer
+3  A: 

Agreed with many of the previous posters, but one possible consideration is runtime speed.

If you are using a very basic LAMP stack server, running PHP4 or lower, Python or Perl, if you do not set pre-compilation, all of your scripts will have to be re-compiled at runtime. This can cause immense stress on the server for high intensity applications. If you're in the situation where you cannot enable pre-compiling for LAMP, but you can for Java (most Java servers require this), then this should be of concern. The disadvantage is that you may have to re-compile large chunks of your web application every time you edit it. I realize this is becoming less and less of an issue nowadays, but its something to check.

Moki
+3  A: 

Consider this also: Java tends to run on app servers where there is a persistent global program running, and separate threads/processes spawn off to service individual requests. However, if the main global VM croaks for some reason, your whole app can go down. The benefit of course is that you get application/system level resources that you can initialize and use continuously across all requests

Other environments like PHP basically tear down and rebuild the entire environment for each request. You can code in application level data persistence using a database, but you don't get it for free. On the other hand, if one php process croaks while processing app data, it won't kill the whole system , as the entire environment is just torn down/rebuilt for the next request.

Zak
A: 

Another aspect to consider, is the ability to use a vast eco-system of open source libraries.

Languages like PHP, Perl or Ruby have such lib market places (almost) built in. .Net is rather closed in that sense. Java on the other hand has a a very large, enterprise grade eco-system of libraries to choose from and communities to learn from as well.

PlanBForOpenOffice
A: 

Practically I agree with the guys about leveraging existing human infrastructure.

Technologically, Java is quite good for non-standard web things - like heavy use of AJAX (GWT, DWR, Comet spring to mind), Mobile (where you generally need lots of session data and less front-end bling), really simple things that are going to be put under immense load (it will definitely trounce Apache mod_XXX every time, the only thing faster in wide-spread use is native code).

Ramon