4 ms·
I agree with your sentiment, but there is still a lot to be said for being able to use the same language on the server and client within a single application. I
by amouat 14y ago
I agree with your sentiment, but there is still a lot to be said for being able to use the same language on the server and client within a single application. I'm currently investigating ClojureScript for this very reason.
- PommeDeTerre 14y agoWhy do so many people consider using the same language on the server and on the client to be such an accomplishment? We had exactly that situation for many years. We'd write our server software in C or C++, and we'd write our client software in C or C++. A bit later on, and we saw Java become popular. Soon we were writing server-side code in Java, and accessing these servers using client apps written in Java. Some time after that, we saw people and organizations more in the Microsoft camp doing the same with VB.NET and C#. It's only with the relatively recent rise of web apps, and the inflexibility brought on by JavaScript being the only viable scripting language supported by the major browsers, that we've seen this issue arise. Having to use JavaScript on both the client-side and server-side shouldn't be seen as beneficial in any way. It's actually just a very negative side effect of JavaScript being the only option for client-side web development.
- amouat 14y agoI wouldn't use the word "accomplishment"; you're right - it's a side effect of JavaScript being the only option. But why complicate things with multiple languages if you can use one? Then all developers can understand and edit the codebase.
- stingraycharles 14y agoJavascript isn't the only language you can develop web applications on, in the same sense that assembly isn't the only language you can develop server software on. Javascript is what all browsers natively speak, and if you want your language to be understood by a browser, you must compile it down to javascript. The same can be said about assembly: it's the language that all CPUs speak, and if you want your application to be understood by a CPU, you must compile it down to ASM. In this way, you can see javascript as the bytecode of the internet. So this shouldn't be seen as something negative: it's great, actually, that javascript is evolving in this way. It will allow for more flexibility: you can write your server software in clojurescript, your client software in coffeescript, and still share some common libraries for functions you need to call on both client and server.