Node.JS or Scala for mobile and web apps [closed]

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.

7

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.

5

I agree with all that @BraveNewCurrency said. I’d like to add some comments.

Personally, I’d use Scala in the server and CoffeeScript in the client, AFAIK Play allows to integrate them in the development (placement of the folders, etc.), CoffeeScript has the same interoperability of Javascript and a nicer syntax and Scala has the same maturity and library availability of Java, with a nicer syntax (and semantics?).

On the other hand, if you don’t need the maturity and availability of libraries of Java then Node.js provides a uniform language for the development and you may be more confident with Javascript than Scala (and its ecosystem, like SBT or Maven, etc. when compared with npm, etc). It’s not a silver bullet for the system, but it may be comfortable for the developer. That really depends on the person. Personally I prefer to have types in the server, they help to use code written by other people that may not be the most disciplined or best programmers in the world, which statistically should happen quite often.

To wrap it up, for the client it’s either Javascript or Coffeescript. Scala wouldn’t make much sense there, it’s a no brainer.

In the server there are Node.js gurus doing impressive stuff, and it may be better suited for something quick (and “dirty”) if your kung fu is strong enough. On the other hand Scala is going to allow better integration into something big (and “enterprisey”) specially if you would like to collaborate with more people at some point. So that is more a matter of suitability for (a not yet specified) purpose and personal tastes.

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật