As the title reads, what platform/language would you pick for the backend, and why? Taking into consideration development time, costs and maintainability. Given you/your team were/are equally experienced with all languages/platforms. Thanks!
For a 'large' webapp I would honestly go with Java. A good stack is Jetty for the http server, and Jersey/JAX-RS for the web framework. The JVM is unbeatable, and you will have an easy time onboarding people since everyone knows Java.<p>It's not as 'hip' as Rails/Django but you will be very productive and you will have the benefit of the plethora of Java libraries out there that are performant and reliable. Not to mention the great profiling tools.
I started my business exactly a year ago this month. My co-founder and I went with Java on the backend for a few reasons:<p>1. This is what we were most experienced in. It is important to use what you know in a lot of circumstances because otherwise you'll have a harder time getting off the ground with your projects. Sure, Java isn't hip/cool in a lot of circles, but it gets the job done and there is a ton of support for it. Libraries like Joda DateTime/Money and Jackson are lifesavers that you can't find anywhere else. Do you want to build a business or spend time working on your tooling?<p>2. When your is new, you pivot your code a lot as you figure out the best way to do things. I can't tell you how many times we've said: "Wow, so glad we used a language that is easily refactored". Being able to safely make huge sweeping changes across your entire codebase without worrying about whether or not you are going to have runtime errors is golden.<p>3. We are hosted on top of Google AppEngine using Objectify to talk to the datastore as our database. This is another <i>huge</i> win for us. We get unlimited scalability with all the benefits of never having to carry a pager, manage servers or databases. Deploying code takes 2-3 minutes and is super simple. This means more time for adding features, which is very important when you are just starting off. Python is another good choice here, but lacks #2.<p>I'm definitely not a huge fanboy of Java any longer. I do feel that it hasn't grown with the times and I think Java has too much stuff to type out (even with Eclipse doing most of it for me). That said, I do see Sunacle actively working on it and 3-5 years from now, I bet there will be a shift either back to Java (as Java8 starts to get more widely used and brings the language more current) or to another language like Ceylon, which unfortunately just isn't quite ready yet.
Python (Tornado or Twisted) + Riak.<p>Why? You can scale <i>very</i> easily, write code in a higher level language that has lots and lots of libraries, have map reduce out of the box, but you don't need to really worry about your DB dying on you.<p>Here is what you do need to worry about in this set up: Eventual consistency. But I would argue that <i>any</i> web app at scale needs to worry about it. So if you are coming from a company that already has lots of users and you are writing a new app that will be in the hands of lots of people very quickly, go with Riak + Tornado/Twisted. You'll probably want to set R = 1 or 2 and pay special attention to conflict resolution.
lein new noir myBigWebApp<p><a href="http://webnoir.org/" rel="nofollow">http://webnoir.org/</a><p>I think Clojure makes a lot of sense for the web, emphasis on immutability etc. I also am a sucker for lisps, and I think the Hiccup templating system is nice. Noir seems to do middleware well. Plus, real nerds get on that ClojureScript.<p>Then again, I kind of also believe that the back-end really shouldn't do much more than process CRUD commands, and that most of your serious application logic should happen on the client. So it doesn't really matter. Pick something with a DB adapter you're comfortable with and get to javascripting.
Pick what ever gives you and the people you are working with the greatest productivity. Chances are it will get rewritten later on to address the problems you encountered.
I like Ruby and Sinatra, but PHP with a decent Sinatra equivalent framework like Slim would be just as nice, or Python+flask/bottle, or Java/Scala and the Play framework. Honestly, it doesn't matter.<p>Use what you know and like and just build the app. Scaling is a nice problem to have, but don't solve it until you have it.
Ruby/Rails and Python/Django seem to be the most common choices among YC startups. They are pretty much interchangeable on the development time, costs and maintainability fronts.
First I would point out I'm not seeing testing frameworks being mentioned as part of these platforms ;)<p>I like Node.js + Mocha<p>* Development in Node is super fast<p>* Mocha makes TDD or its variants really fun<p>* Node feels natural for webapps (the Hello World example is an HTTP server)<p>* JavaScript is a really flexible and elegant language if you get past its minor quirks<p>* The community is fantastic<p>* The built-in package manager is fantastic<p>* The open-source libraries are fantastic (pick the right DB for the job, there are good drivers for all of them)<p>There's lots to say about Node. No language is perfect for every task.<p>EDIT: fixed spacing
Python/Django or Ruby on Rails. If you have to move fast and change ideas quick and timely. Pick on of them.<p>Given my current project where i am the sole developer i dont want to know how much more time i would have spent coding in e.g. PHP.
I'd choose Ruby in a service oriented architecture. Use HTTP/JSON for internal APIs between distinct systems. If performance becomes a business-limiting factor, you can investigate replacing a single part of the system with a lower-level language (Java, Haskell, Go, Erlang, etc).<p>Rails (and in particular the RailsApi gem) makes prototyping and putting together a SOA like this easy and fast. Except for the API client, which I don't yet have a good solution (ie, what ActiveResource was supposed to solve).
Use a higher level programming language and use a standard interface to communicate with the frontend. If you build a REST API for the backend it doesn't even matter what language it is written in. You can always swap parts out for faster performing versions later on. You can even split up parts in different programming languages.<p>If you want to decrease development cost go with an ecosystem that most of your developers have mastered. Python, PHP, Ruby, Java, .NET, whatever. Pretty much all these languages have great frameworks these days to allow for faster development.<p>I personally go with Ruby because they were pretty much first on the scene with their gem ecosystem (which is massive), they have a lot of cool and smart developers in the community and it's overal a great experience. Easy to pick up too with all the resources that are out there.<p>But whatever you do don't force a language along with it's ecosystem that your developers don't like. Listen to the dev team and know that every language has great potential. I'd come back and ask what frameworks should I use to build a high performance site as quickly & efficiently as possible given I work with language X. Maybe the dev team is unaware of recent awesome frameworks in the language they know & love.
'Building a large webapp today'<p>Do you mean starting to build a large webapp today?<p>I would recommend Ruby on Rails or Python/Django - they allow for fast prototyping and easy collaboration.
I gotta go in a sec, but I'll link you to previous comments of why I recommend Haskell [1] and/or Erlang [2] for a more massive backend architecture.<p>[1] <a href="http://news.ycombinator.com/item?id=4181223" rel="nofollow">http://news.ycombinator.com/item?id=4181223</a><p>[2] <a href="http://news.ycombinator.com/item?id=4341322" rel="nofollow">http://news.ycombinator.com/item?id=4341322</a>
I recommend Java the language and base platform running on Apache Tomcat frontended _not_ with mod_jk but with mod_proxy.<p>See my post here for specifics:
<a href="http://forum.linode.com/viewtopic.php?t=9230&p=53085#p53085" rel="nofollow">http://forum.linode.com/viewtopic.php?t=9230&p=53085#p53...</a><p>For the Web UI I recommend GWT by using Eclipse and the GWT Designer GUI web designer they bought from the excellent folks at Instantiations back in 2010.<p><a href="https://developers.google.com/web-toolkit/tools/gwtdesigner/" rel="nofollow">https://developers.google.com/web-toolkit/tools/gwtdesigner/</a>
<a href="https://developers.google.com/web-toolkit/tools/gwtdesigner/wizards/gwt/uibinder_composite" rel="nofollow">https://developers.google.com/web-toolkit/tools/gwtdesigner/...</a><p>If you have customers that demand a platform GUI application which accesses your web backend, Google donated WindowBuilder to Eclipse.<p><a href="http://www.eclipse.org/windowbuilder/" rel="nofollow">http://www.eclipse.org/windowbuilder/</a>
Personally, I'd go with PHP.<p>Why?<p>- It's easy to get things done fast.<p>- There are plenty of classes available online that'll make things even easier.<p>- It's easier to maintain (IMHO) than some other languages.<p>- It'll run on almost all web hosting services cheaply.<p>- It's scaleable.<p>If and when you need something more powerful, a seamless transition can be made over to another language.
Rails is nice, but it's really really slow. At my job we use Jetty as the server with Play or Lift as the framework -- I think most of the devs like Play better, though. Really easy to run as an unprivileged user and do backends through nginx as well.
Just to put this out there -- since nobody has really mentioned it -- ruby (as a language) doesn't have the greatest performance. You can do some tricks with GC to speed it up (Ruby EE might be a faster option), but you're still looking at 50x slower than C (python is 40x, Java 7 is around 2x, Javascript on V8 -- Node-- is 4x). So if you're planning on doing a lot on the backend, you might want to consider breaking off your logic/processing into java or lisp or something and using a rpc/mq system to send it tasks from your RoR/Django app....but then again...you might not want to start with too many moving parts :)
It is not a matter of the language so much. Use what your team is comfortable with. I find it super important how to structure the app. First design an API. Then implement it on the server with corresponding tests. Then build the frontend. Here is more to decide: server driven (server faces or server pages) or single paged (client side MVCs)
Go, for the same reasons as Java, but because Go is nicer than Java (to me.) The stdlib net/http library is also insanely fast, handling ~40,000 (dynamic, but not DB-backed) req/s without a sweat, and without requiring any kind of callback spaghetti.
I agree with the use what you know mantra unless you don't know anything. Then I would recommend Rails for the backed and Backbone.js for the front end. Choosing popular technologies is important because it will save you and your team a lot time.
You have a number of great choices. Much depends on the team building the app - if you want to be adventurous try: Clojure & Noir. Other options (in particular order):<p>* Groovy & Grails
* Ruby & Rails
* Python & Django
I don't know about everyone else, but I was always taught that analysis and design come before the implementation. It's not something you do in 10 minutes before you start making software.
What kind of site is it? Is there a lot of content to manage? Drupal/PHP might even be a good tool for the job, depending on what you're trying to accomplish. More info would be helpful.
Pick the the language your team most familiar with. If there are no one such language, pick Python/Django, Clojure/Noir or Ruby/Rail, and keep yourself far from PHP.