I was tutoring someone in web app development recently, and the monumental task in front of him really hit me. He was trying to learn and use at least 9 "languages" at the same time.<p>This was just one possible stack, but in our case it was.<p>Ruby
- Rails
- MySQL
- Bash (command line usage)
- CSS
- HTML
- Javascript
- JQuery
- Git
- (Capistrano, Yaml, nginx, ??)<p>Even though these aren't all true languages, they appear this way to newcomers since they are each a new syntax to learn.<p>If you slowly built up these skills over 15 years, they are clearly separate concepts in your mind. But for a newcomer trying to use them, it's not even clear which are which.<p>Is that a Ruby method or a Rails method?<p>Is "script/server" a shell command or is "ls" part of rails?<p>Is <a href="..." onclick="..." style="..."></a> html, js, or css?<p>He made a comment along the lines of "wouldn't it be great if you could build all the pieces of a web app in one language", and I started thinking about it.<p>GWT (Google Website Toolkit), ActiveRecord, CoffeeScript, and Heroku are all steps in this direction. You could classify them generally as trying to "eliminate a language in the stack" or allowing you to do a piece of the stack in a language you already know.<p>Obviously there is a trade off here between power and simplicity, but I'm wondering - would it be possible or desirable to get an entire web app down to just one language? If not that how few could you use?<p>Btw, I think there are benefits to seasoned developers here as well. I remember Lars Rasmussen (creator of Google Maps and Wave) mentioned something to this effect at Google IO in 2009, that GWT allowed him to spend his mental CPU cycles at a higher level and be more creative (not having to worry about cross browser css or js). So the benefits may not only be for newcomers.
This is exactly why JavaScript is going to win. I'm using JavaScript back to front using CouchDB -> NodeJS -> client-side JavaScript. The cognitive overhead of switching from language to language is pretty much gone. Being able to serialize and deserialize objects in the same language is pretty cool. Doing REST calls to Couch spits out JSON stringified data, then a JSON.parse()->JSON.stringify in the middle, and then another JSON.parse() on the client.
There's also a language/tool called Monkey Coder which attempts something along these lines; though it's more aimed at creating apps for the different kind of platforms (iphone, android, html5, mac/pc/linux app, etc). I haven't played with it yet, so can't comment, but if you're interested, check it out here:
<a href="http://www.monkeycoder.co.nz/" rel="nofollow">http://www.monkeycoder.co.nz/</a>
Some of the lisp style stacks get very close as do some smalltalk environments (squeak). Of course this means generating the markup from code but seems to work well enough.<p>HN is an example (see hn challenge) as is teepeedee2 (<a href="http://john.freml.in" rel="nofollow">http://john.freml.in</a>). Maby clojure is worth a look.
There's XAML, which brings it down to just three languages (Batch, XAML, and C#), but I would not recommend Silverlight for web applications at the moment.
Well nodeJS is doing a decent job by having the same language on the server side as on the clientside.<p>css and html are both markup-lanugages and I find it very strange to add turing-completeness to a markup language.<p>well there are examples where this IS the case, look at LaTeX for example.<p>But having html as the frontend, and both clientside and serverside javascript as the backend is the closest that we can get at this moment.