views:

489

answers:

10

Sorry if the title is misleading!

Take 3 web dev languages php, java and .net.

When will you choose php or java or .net for a project? Forget the cost factor! Does it depend on the complexity or does it depend on security or does it depend on the development process??

Do you have any set of questions or guidelines which you cross check before choosing a language for a project?

Update (after 1st anwswer) : Leave the exp part too! Think you have people with exp in all 3 languages :)

+7  A: 
  • the experience of the team with each language
  • the language of the existing codebase (if any)
  • technology we have to interact with (it's hard to write a javaclient, when the server uses .NET remoting)
pb
A: 

I would choose the one you and/or the development team knows best. Or if you know none of them, choose the easiest to learn (my opinion would be PHP).

Ben Hoffstein
A: 

I'd choose .net everytime ;)

Seriously though, the choice of language is less an issue than picking a decent team to do the development. Good developers outweigh the downfalls of a platform.

Martin
+2  A: 

As far as all the platforms are potent enough to support your app and to scale as needed, it does not matter which one you use.

What matters is what kind of expertise you have on hand.

If you have better Java programmers, use that. If you have people experienced in .net, use .net.

I personally would go with .net even though java is my fave language, because i have more experience creating useful projects in .net than in java.

Mostlyharmless
A: 

1) What does the development team know. 1a) What subtools of what they know do they know (e.g., Java->Tomcat->Struts/Hibernate/Spring/Plain Old Servlets/etc) 2) Is the deployment target software known (Tomcat, IIS, Apache, etc)

In most programming teams you will standardise on a single applications language and a scripting language. E.g., Java and Perl. This is to prevent someone on the team writing a Lisp/Haskell/etc tool and then leaving, with something the other developers cannot maintain easily.

JeeBee
+1  A: 

Hum, it depends on lot of factors! Obviously, most of the time, you don't make a choice, you take whatever the shop or project manager has chosen... If you are independent, or doing a personal project, or manager yourself, you have to make a choice, of course. An important factor is resource: basically the Web server where you will install the application (thus, somehow, the budget). If you have a low budget, you will probably take a shared host, with little power, and PHP is a probable choice. That's also what you get on some free hosts (like my own, Free.fr). Those offering .Net (or just good old ASP) are probably less common, and lot of low end hosts just discard Java as these applications tend to suck resources out of other projects sharing the server... (I re-read and see you don't what to ear about cost, sorry, although I think it is still relevant.)

Note also there is no reason to limit yourself to the three "languages" you mention: you can very well write your project in Python, Perl, Lisp, even Lua, or nearly any language able to handle stdin and stdout... Beside, another decision factor is the languages you know (or that your team masters!).

As for the language capabilities, I don't think security is a major choice factor, and even development processes/design are becoming close: .Net isn't unlike Java, and PHP5+ tries to catch up on the OO side.

So IMHO, it is more a question of resources, again, and mastery: you can write a very complex Web site in PHP (see deviantART.com for example) and make a crappy one in Java.

PhiLho
+9  A: 

It depends on the entire picture. There are a lot of issues to consider; the people, current technology, who's stuck maintaining it, fixing it, and paying for it...

  • Is the application to be deployed in an environment that is mostly Windows? If so, use .NET or ASP or Java/JSP, not PHP. If it is a *nix enviornment, use Java or PHP. That is, use a language that is meant to run with the server that will be used, don't try to hack Apache or BEA to support .NET.

  • Is it a small application or a large one? Large enterprise class applications must be extensible, scalable, and maintainable. That means Java or .NET. Medium applications can use nearly any language platform. Small ones, you are better off with the cheapest and easiest platform. Don't try to use ASP.NET MVC for a 3-page "about me" website. Don't try to use PHP for a financial trading application.

  • What's the budget for development AND MAINTENANCE? Will it be a hosted solution, or will they own the boxes? .NET requires Windows, which requires ongoing patches to the server, and hosts that provide .NET often cost more then, say, PHP hosting.

  • What's the timeline? Do the developers know the target language and platform? Do they need help? What's the budget? Can they hire help or use freelancers?

  • Is it an application that "fits in" with a slew of other applications on an intranet? Stick with the same couple of core languages and technologies for things that have to be shared. If every application in the house uses .NET, don't go switching to Java now for one lonely application without a seriously good reason. If the 2 people who knew Java left, who's going to fix bugs, extend the application, and so on?

Nikki9696
A: 

For me, i would go with the language your programmers enjoy the most. With the abundance of libraries/frameworks for almost every language i think most if not all short comings of anyone one language can/have been overcome. This i know is arguable but i believe it to be true and when it comes down to productivity i want to be happy, enjoy my job. If you and your team are using tools they feel comfortable with and enjoy using, your cultivating a creative and productive atmosphere. Thats what see as most important in make a language choice.

That said, rapid application development, or ease of updating should be taken into account as well. For those consideration i usually go with a scripting solution (php,ruby,perl) verses a compiled one such as java. If you need java libraries or otherwise want to utilize the power of java i would go with cfml (coldfusion) as an effective language for compiling java on the fly. Then you can store everything in the cache and it runs as though it were compiled java, only you used the flexability of cfml (coldfusion) to edit it.

ethyreal
+1  A: 
  1. What do you or your team already have experience with to be the most productive
  2. Given 1, what are you most enthusiastic about (the motivation factor) - it could be something you have no experience with but would make up for #1.
  3. The application your building, where will it run? Are there any constraints?
  4. Is there any integration to outside systems/interfaces? What are the constraints there? For example if you have to talk to Active Directory, the .Net Directory Services APIs are much better than JNDI for Java.

It's likely that you'll be using some framework or tools based in the language you select. What's the viability of those frameworks, how strong is the community, etc.

mbrevoort