Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am coming from a php background with some python as well. I want to start work

ID: 651540 • Letter: I

Question

I am coming from a php background with some python as well. I want to start working on a different language for both web and mobile development. I am also interested in real time apps dealing with games.

I am looking at node.js because I can use tools like titanium and/or phone gap to have my apps ported and compiled to native java code, or in a way that makes it runnable on mobile (web views). I like this path because I can use existing JS knowledge to build apps.

I am also looking at scala. I have done some C# as well as tinkered with Java about 5 years ago. And I do like that I can use scala to make native android apps. But unlike node/js which can be made to also work on other mobile os's, this only works on android. In a way, that doesn't really bother me. But scala seems like it would have much better performance for gaming that JS compiled to android. But I do not know how well.

Ine the end I want to focus on socket and REST based web apps for API's that users can have access to, as well as some mobile development. I want to get towards games and interactive apps.

The question is, what features of Scala would benefit me over the node/js side of things for making real time applications on web or mobile? I was looking at using frameworks like lift or play for web.

Node also makes real time easy with socket.io and node handles much of that in the background. This is why I think node could be a great choice. So I was hoping someone could give some insight on features in Node, that would have some benefit over scala. I don't really want to hear 'this is better cause its webscale or related things. I was hoping for more facts about features that would benefit what I want to do. I already understand why node is good. I just dont know much of anything about scala. Or how they may compare for what I want to accomplish.

Explanation / Answer

I am looking at node.js because I can use tools like titanium and/or phone gap to have my apps ported and compiled to native java code, or in a way that makes it runnable on mobile (web views). I like this path because I can use existing JS knowledge to build apps.

Node is a server-side technology. You shouldn't let your app-language decide your server-side language. Yes, there are some "synergies" to having your front-end and back-end in the same language. But it's no silver bullet, and can cause more headaches than it solves. In fact, the majority of application writers explicitly choose not to do this.

So I was hoping someone could give some insight on features in Node, that would have some benefit over scala.

One reason NOT to use Node is that JavaScript has a lot of warts. (Search for "JavaScript WTF".). If you want JS on the server, prepared to become a JavaScript expert (especially the warts). Also consider CoffeeScript which is helps shave off a few of the warts, but is easily turned into JS. JavaScript is also a scripting language, so tends to be less efficient than Scala.

Scala uses the JVM, and the server-side JVM story is much more mature than Node. But Scala is probably harder to get started in. I don't know anything about writing apps in Scala, but I'd imagine that's very immature.

Don't think of the question as either-or. You'll be a better developer if you try implementing in both languages. The more languages you know, the better you will program in your favorite language.