views:

173

answers:

4

I want to create a web-interface for a project I had in mind for a while. I have been programming in C++ (plus HLSL) professionally for the past five years, and learned various others in university (Java, VHDL, numerous assembly languages).

I am searching for good resources to compare the different possibilities for web programming (javascript, php, python, ruby etc.). Performance and good APIs are my two main requirements. I want my project to scale and not have to write it again in another language as it gets bigger.

I try looking for open source projects that are close to mine and look at the code of mozilla bespin (the closest I found to my project), which is mostly done javascript. Any cues on tutorials aimed at advanced programmers would be appreciated. I don't need to learn ifs and fors, but I do need to learn the basics of what is specific to web programming.

A: 

You seem to be mixing two different concepts - back-end code (which can be any of the languages you listed - PHP, Ruby, Perl, Java) and which generates HTML/JavaScript to be sent to the web browser - sometimes coupled with back-end templating language allowing you to build easy dynamic HTML pages (which most of these languages have - e.g. JSP for Java, EmbPerl for Perl, etc...); and web client-side coding which is JavaScript (executed by the browser).

The latter you must do regardless of what your back-end is written in.

For the back-end, pretty much any language listed is scalable enough and has good libraries, so the choice is which one you feel more comfortable with, and which one has more libraries helpful to your specific problem domain.

As C++, you may have easier time with Perl since it is fairly easy for C/C++ person to pick up, but I'm not familiar enough with PHP/Ruby to know their up/downsides.

DVK
While it is true that you need JavaScript for most web apps, there are solutions such as Google Web Toolkit (http://code.google.com/webtoolkit/) and Pyjamas (http://pyjs.org/) to compile other languages to JS.
Matthew Flaschen
A: 

in additionto DVK's excellent suggestions, one way to start hacking on web apps is php and zend framework (quick start tutorial here). there's a tutorial based on developing a blog application here: A simple blog with Zend Framework 1.9

scala, asp.net, django, jsf, ruby on rails, are other great ways to go... not sure which to choose, i guess would depend on the app that's being developed. as for scalability, you should be good with any of the major frameworks, for instance facebook runs on php, linkedin on scala, twitter uses ruby on rails for part of the app, myspace asp.net just as an example.

there are Rich Internet Applications that use additional technology to present a more dynamic user experience, for example Flash (Actionscript), Silverlight, and DHTML or JavaScript UI libraries like ExtJs, YUI, Dojo, and jQuery UI.

+2  A: 

For web development, the choice of web framework is just as important as the language. Ruby has Rails, Python has Django and C# has ASP.NET MVC. Java has Servlets/JSP/JSF/Struts but I don't find them nearly as a productive or attractive as the previous options. PHP/Perl are quite good to create for simple CGI web pages but they don't really have a leading web framework.

If you care about performance than you probably don't want to be using an interpreted language. This rules out straight Ruby, Python, Perl, PHP. You can of course get 'compiled' versions of these languages targeting either the JVM or .NET runtimes, e.g.:

  • Ruby: JRuby, IronRuby.NET
  • Python: Jython, IronPython.NET
  • PHP: Phalanger

Twitter started out as a Ruby shop (which they mostly still are) except now they have re-written critical performing parts of their web apps in Scala (a modern functional like language targeting the JVM).

So your left with using either C#/.NET or a JVM targeted language like Scala, JRuby or Jython.

As a C++ programmer though you may also be interested in 'Go' (see: golang.org). It's a simple modern compiled language with garbage collection, native support for concurrency and very fast build times invented by Google (including Rob Pike and Ken Thompson one of the fathers of Unix).

You may also want to look at nodejs.org, a shiny and new web technology that's completely asynchronous, fast and highly scalable using Java Script and running on Google's very fast JavaScript engine - V8 (the same one used in chrome).

I wouldn't be too concerned with performance though as its something that can be solved with more hardware - it's more important for your application to scale. Google uses a lot of Python and Java, while Facebook and Yahoo use PHP. Stack Overflow uses C# and ASP.NET/MVC (which happens to be my preferred choice as well).

Also if you care about free hosting for your web applications than check out Google App Engine, it will host applications you develop with Python or Java for free.

mythz
+1  A: 

Don't forget about where your going to be hosting this thing. I do a lot of Java/Spring web service/application development at work and would be my first choice, except that I haven't yet found one reliable hosting provider for java web applications (although there is now Google's app engine which allows some, but haven't used it yet). If your using ASP.NET, than I would recomment MaximumASP.

Just about every web hosting service I've used over the years, allows PHP though. So that might factor into your choice.

Casey