News for hackers. Stuff that matters.
Re:Scala vs. Node.js as a RESTful back end server (2015) by saosebastiao on Saturday April 23, 2016 @02:24PM (#11556697)
I've also been working with Play Framework and I'm pretty impressed at how awesome and easy to use everything is. The documentation is great, the performance is great.

I'm using it for just a web API, and I've had several scala developers tell me to use akka-http instead because it is simpler. I tried, but the route api is quite horrid in comparison to a simple file-based routing description, and the utilities (like the web service client) were a nightmare to work with and debug. And to top it off, the performance was still worse than play. Maybe all of that will get better, but as of right now, Play is hard to beat.

My only complaints so far:

1) Slick is bloated and kludgy and still produces bad SQL queries...I've resorted to using the plain SQL interface which is nice, but not great.

2) It could use some support for API description languages like swagger.

3) Testing your code using the dependency injection framework has been very unintuitive (I'm pretty new to dependency injection frameworks though, so maybe it's just me).

4) Action composition has been a lot harder than expected (for example: http://stackoverflow.com/questions/36683676/play-action-comp...)

5) I wish I didn't have to deal with an opaque SBT plugin, and that the project just used a regular SBT project structure. I realize there are reasons for needing a plugin (like codegen for routes, etc.), but at least document how to work with the plugin better. SBT is like working with a black box as it is, no need to make it worse.

Re:Scala vs. Node.js as a RESTful back end server (2015) by redtuesday on Saturday April 23, 2016 @06:16PM (#11557661)
> 1) Slick is bloated and kludgy and still produces bad SQL queries...I've resorted to using the plain SQL interface which is nice, but not great.

You could check out quill [1]. Haven't used it in a real application yet but the codebase seems easier to understand and the sql it produced seemed reasonable. virtualwhys could probaly tell you more - if I remember correctly he is a contributor for quill (and was/is (?) a longtime user of scalaquery/slick).

[1] http://getquill.io/

Re:Scala vs. Node.js as a RESTful back end server (2015) by neverminder on Saturday April 23, 2016 @02:41PM (#11556792)
Yes there are issues, but what framework doesn't have them? I am too annoyed by 22 element tuple limit in context of slick and other stuff, but when you look around there are no better alternatives without major downsides. Try to find a decent framework written in functional strictly typed well scalable language and you end up with Play.
Re:Scala vs. Node.js as a RESTful back end server (2015) by yareally on Saturday April 23, 2016 @06:00PM (#11557603)
> "I'm using it for just a web API, and I've had several scala developers tell me to use akka-http instead because it is simpler"

Have you tried Spray? It still uses akka for actors, but I consider it easier to use than akka-http.

http://spray.io/

Re:Scala vs. Node.js as a RESTful back end server (2015) by ARussell on Saturday April 23, 2016 @06:30PM (#11557697)
For some reason I've been thinking that Akka HTTP is basically Spray 2.0. Is that not right?
Re:Scala vs. Node.js as a RESTful back end server (2015) by yareally on Saturday April 23, 2016 @06:49PM (#11557751)
You're correct. Spray is being deprecated for akka-http and is really "spray 2.0."
Re:Scala vs. Node.js as a RESTful back end server (2015) by hhandoko on Sunday April 24, 2016 @05:09AM (#11559052)
Just a couple of comments:

On (2): There is a number of Play Swagger plugins (e.g. https://github.com/swagger-api/swagger-play), each with different approaches.

On (3): DI can actually be quite practical. Use different implementation via configuration (bind at startup), use fakes for testing, benchmark two implementations before swapping them, etc. Develop to an interface, not to an implementation :)

Re:Scala vs. Node.js as a RESTful back end server (2015) by dk8996 on Monday April 25, 2016 @10:58AM (#11564589)
Slick is good. Although we use the plain SQL interface because it offers the most flexibility. The docs for Slick should be much much better since it can get fairly complex. I would say its not very newbie friendly especially if you trying to learn Scala at the same time. When you figure out Slick it's very easy to use.